diff --git a/.release-please-manifest-individual.json b/.release-please-manifest-individual.json index cb4a64b1f991..4d29d8086e2b 100644 --- a/.release-please-manifest-individual.json +++ b/.release-please-manifest-individual.json @@ -2,7 +2,7 @@ "auth": "0.1.0", "auth/oauth2adapt": "0.1.0", "bigquery": "1.57.1", - "bigtable": "1.20.0", + "bigtable": "1.21.0", "datastore": "1.15.0", "errorreporting": "0.3.0", "firestore": "1.14.0", @@ -10,6 +10,6 @@ "profiler": "0.4.0", "pubsub": "1.33.0", "pubsublite": "1.8.1", - "spanner": "1.53.0", + "spanner": "1.53.1", "storage": "1.35.1" } diff --git a/.release-please-manifest-submodules.json b/.release-please-manifest-submodules.json index 0bc70d3ac5be..74dd7d1a57cf 100644 --- a/.release-please-manifest-submodules.json +++ b/.release-please-manifest-submodules.json @@ -20,7 +20,7 @@ "batch": "1.7.0", "beyondcorp": "1.0.3", "billing": "1.17.4", - "binaryauthorization": "1.7.3", + "binaryauthorization": "1.8.0", "certificatemanager": "1.7.4", "channel": "1.17.3", "cloudbuild": "1.15.0", @@ -45,7 +45,7 @@ "dataqna": "0.8.4", "datastream": "1.10.3", "deploy": "1.15.0", - "dialogflow": "1.45.0", + "dialogflow": "1.46.0", "discoveryengine": "1.2.3", "dlp": "1.11.1", "documentai": "1.23.6", diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f1afd6591f97..6d4c016ba403 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.110.10" + ".": "0.111.0" } diff --git a/CHANGES.md b/CHANGES.md index a418e2ee1cfb..acb4bc57072e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,17 @@ # Changes +## [0.111.0](https://github.com/googleapis/google-cloud-go/compare/v0.110.10...v0.111.0) (2023-11-29) + + +### Features + +* **internal/trace:** Add OpenTelemetry support ([#8655](https://github.com/googleapis/google-cloud-go/issues/8655)) ([7a46b54](https://github.com/googleapis/google-cloud-go/commit/7a46b5428f239871993d66be2c7c667121f60a6f)), refs [#2205](https://github.com/googleapis/google-cloud-go/issues/2205) + + +### Bug Fixes + +* **all:** Bump google.golang.org/api to v0.149.0 ([#8959](https://github.com/googleapis/google-cloud-go/issues/8959)) ([8d2ab9f](https://github.com/googleapis/google-cloud-go/commit/8d2ab9f320a86c1c0fab90513fc05861561d0880)) + ## [0.110.10](https://github.com/googleapis/google-cloud-go/compare/v0.110.9...v0.110.10) (2023-10-31) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 18f175dac99b..d07f81f1797f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -62,10 +62,14 @@ intend only to run integration tests on a single package. #### GCP Setup -To run the integrations tests, creation and configuration of two projects in +To run the integrations tests, creation and configuration of three projects in the Google Developers Console is required: one specifically for Firestore -integration tests, and another for all other integration tests. We'll refer to -these projects as "general project" and "Firestore project". +integration tests, one specifically for Bigtable integration tests, and another +for all other integration tests. We'll refer to these projects as +"Firestore project", "Bigtable project" and "general project". + +Note: You can skip setting up Bigtable project if you do not plan working on or running a few Bigtable +tests that require a secondary project After creating each project, you must [create a service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount) for each project. Ensure the project-level **Owner** @@ -118,7 +122,7 @@ Finally, in the general project, create an API key for the translate API: #### Local Setup -Once the two projects are created and configured, set the following environment +Once the three projects are created and configured, set the following environment variables: - `GCLOUD_TESTS_GOLANG_PROJECT_ID`: Developers Console project's ID (e.g. @@ -132,6 +136,7 @@ project's service account. - `GCLOUD_TESTS_GOLANG_FIRESTORE_KEY`: The path to the JSON key file of the Firestore project's service account. - `GCLOUD_TESTS_API_KEY`: API key for using the Translate API created above. +- `GCLOUD_TESTS_GOLANG_SECONDARY_BIGTABLE_PROJECT_ID`: Developers Console project's ID (e.g. doorway-cliff-677) for Bigtable optional secondary project. This can be same as Firestore project or any project other than the general project. As part of the setup that follows, the following variables will be configured: @@ -219,6 +224,9 @@ For instance, in `.zshrc`: # Developers Console project's ID (e.g. bamboo-shift-455) for the general project. export GCLOUD_TESTS_GOLANG_PROJECT_ID=your-project +# Developers Console project's ID (e.g. bamboo-shift-455) for the Bigtable project. +export GCLOUD_TESTS_GOLANG_SECONDARY_BIGTABLE_PROJECT_ID=your-bigtable-optional-secondary-project + # The path to the JSON key file of the general project's service account. export GCLOUD_TESTS_GOLANG_KEY=~/directory/your-project-abcd1234.json diff --git a/aiplatform/apiv1beta1/aiplatformpb/model.pb.go b/aiplatform/apiv1beta1/aiplatformpb/model.pb.go index ed5254241a0b..03cf9706c4c5 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/model.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/model.pb.go @@ -1076,6 +1076,16 @@ type ModelContainerSpec struct { // [`AIP_DEPLOYED_MODEL_ID` environment // variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) HealthRoute string `protobuf:"bytes,7,opt,name=health_route,json=healthRoute,proto3" json:"health_route,omitempty"` + // Immutable. List of ports to expose from the container. Vertex AI sends gRPC + // prediction requests that it receives to the first port on this list. Vertex + // AI also sends liveness and health checks to this port. + // + // If you do not specify this field, gRPC requests to the container will be + // disabled. + // + // Vertex AI does not use ports other than the first one listed. This field + // corresponds to the `ports` field of the Kubernetes Containers v1 core API. + GrpcPorts []*Port `protobuf:"bytes,9,rep,name=grpc_ports,json=grpcPorts,proto3" json:"grpc_ports,omitempty"` // Immutable. Deployment timeout. // Limit for deployment timeout is 2 hours. DeploymentTimeout *durationpb.Duration `protobuf:"bytes,10,opt,name=deployment_timeout,json=deploymentTimeout,proto3" json:"deployment_timeout,omitempty"` @@ -1169,6 +1179,13 @@ func (x *ModelContainerSpec) GetHealthRoute() string { return "" } +func (x *ModelContainerSpec) GetGrpcPorts() []*Port { + if x != nil { + return x.GrpcPorts + } + return nil +} + func (x *ModelContainerSpec) GetDeploymentTimeout() *durationpb.Duration { if x != nil { return x.DeploymentTimeout @@ -1794,7 +1811,7 @@ var file_google_cloud_aiplatform_v1beta1_model_proto_rawDesc = []byte{ 0x61, 0x55, 0x72, 0x69, 0x12, 0x37, 0x0a, 0x15, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x13, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x55, 0x72, 0x69, 0x22, 0xee, 0x04, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x55, 0x72, 0x69, 0x22, 0xb9, 0x05, 0x0a, 0x12, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x23, 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe0, 0x41, 0x02, 0xe0, 0x41, 0x05, 0x52, @@ -1815,73 +1832,77 @@ var file_google_cloud_aiplatform_v1beta1_model_proto_rawDesc = []byte{ 0x0c, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x0b, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x4d, 0x0a, 0x12, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, - 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 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, 0x42, 0x03, 0xe0, 0x41, - 0x05, 0x52, 0x11, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x12, 0x36, 0x0a, 0x15, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x6d, - 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6d, 0x62, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x12, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, - 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x4d, 0x62, 0x12, 0x50, 0x0a, 0x0d, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x75, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x05, - 0x52, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x4e, - 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x42, 0x03, 0xe0, 0x41, - 0x05, 0x52, 0x0b, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x22, 0x2d, - 0x0a, 0x04, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, - 0x6e, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, - 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x22, 0xfd, 0x01, - 0x0a, 0x0f, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x61, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 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, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x70, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x04, 0x63, 0x6f, 0x70, 0x79, 0x22, 0x73, 0x0a, 0x0f, 0x4d, 0x6f, 0x64, 0x65, - 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x1d, 0x4d, - 0x4f, 0x44, 0x45, 0x4c, 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, 0x0a, - 0x0a, 0x06, 0x41, 0x55, 0x54, 0x4f, 0x4d, 0x4c, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x55, - 0x53, 0x54, 0x4f, 0x4d, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x51, 0x4d, 0x4c, 0x10, 0x03, - 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x4f, 0x44, 0x45, 0x4c, 0x5f, 0x47, 0x41, 0x52, 0x44, 0x45, 0x4e, - 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x45, 0x4e, 0x49, 0x45, 0x10, 0x05, 0x22, 0xd6, 0x01, - 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x47, 0x0a, 0x04, 0x65, 0x78, 0x65, 0x63, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x2e, 0x45, 0x78, - 0x65, 0x63, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x04, 0x65, 0x78, 0x65, 0x63, - 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, - 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, - 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, - 0x1a, 0x26, 0x0a, 0x0a, 0x45, 0x78, 0x65, 0x63, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, - 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x62, - 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0xe1, 0x01, 0x0a, 0x23, 0x63, 0x6f, 0x6d, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, - 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, - 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, - 0x6f, 0x2f, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x61, 0x70, 0x69, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, - 0x72, 0x6d, 0x70, 0x62, 0x3b, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x70, - 0x62, 0xaa, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, - 0x2e, 0x41, 0x49, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x56, 0x31, 0x42, 0x65, - 0x74, 0x61, 0x31, 0xca, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, - 0x75, 0x64, 0x5c, 0x41, 0x49, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5c, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x22, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, - 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x49, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, - 0x6d, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x70, 0x6f, + 0x72, 0x74, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x72, 0x74, + 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x09, 0x67, 0x72, 0x70, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x73, + 0x12, 0x4d, 0x0a, 0x12, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 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, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x11, 0x64, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, + 0x36, 0x0a, 0x15, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6d, 0x62, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, + 0xe0, 0x41, 0x05, 0x52, 0x12, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x4d, 0x65, 0x6d, 0x6f, 0x72, + 0x79, 0x53, 0x69, 0x7a, 0x65, 0x4d, 0x62, 0x12, 0x50, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x75, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x0c, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x4e, 0x0a, 0x0c, 0x68, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, + 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x0b, 0x68, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x22, 0x2d, 0x0a, 0x04, 0x50, 0x6f, 0x72, + 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x70, + 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x61, + 0x69, 0x6e, 0x65, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x22, 0xfd, 0x01, 0x0a, 0x0f, 0x4d, 0x6f, 0x64, + 0x65, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x61, 0x0a, 0x0b, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 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, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x70, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x63, + 0x6f, 0x70, 0x79, 0x22, 0x73, 0x0a, 0x0f, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x1d, 0x4d, 0x4f, 0x44, 0x45, 0x4c, 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, 0x0a, 0x0a, 0x06, 0x41, 0x55, 0x54, + 0x4f, 0x4d, 0x4c, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x10, + 0x02, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x51, 0x4d, 0x4c, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x4d, + 0x4f, 0x44, 0x45, 0x4c, 0x5f, 0x47, 0x41, 0x52, 0x44, 0x45, 0x4e, 0x10, 0x04, 0x12, 0x09, 0x0a, + 0x05, 0x47, 0x45, 0x4e, 0x49, 0x45, 0x10, 0x05, 0x22, 0xd6, 0x01, 0x0a, 0x05, 0x50, 0x72, 0x6f, + 0x62, 0x65, 0x12, 0x47, 0x0a, 0x04, 0x65, 0x78, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x04, 0x65, 0x78, 0x65, 0x63, 0x12, 0x25, 0x0a, 0x0e, 0x70, + 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0d, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x53, 0x65, 0x63, 0x6f, 0x6e, + 0x64, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, + 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x1a, 0x26, 0x0a, 0x0a, 0x45, + 0x78, 0x65, 0x63, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x42, 0xe1, 0x01, 0x0a, 0x23, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, + 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x4d, 0x6f, 0x64, 0x65, 0x6c, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x69, 0x70, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x70, 0x62, 0x3b, + 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x70, 0x62, 0xaa, 0x02, 0x1f, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x41, 0x49, 0x50, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, + 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x49, + 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xea, 0x02, 0x22, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x3a, 0x3a, 0x41, 0x49, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1939,17 +1960,18 @@ var file_google_cloud_aiplatform_v1beta1_model_proto_depIdxs = []int32{ 11, // 14: google.cloud.aiplatform.v1beta1.Model.original_model_info:type_name -> google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo 19, // 15: google.cloud.aiplatform.v1beta1.ModelContainerSpec.env:type_name -> google.cloud.aiplatform.v1beta1.EnvVar 7, // 16: google.cloud.aiplatform.v1beta1.ModelContainerSpec.ports:type_name -> google.cloud.aiplatform.v1beta1.Port - 20, // 17: google.cloud.aiplatform.v1beta1.ModelContainerSpec.deployment_timeout:type_name -> google.protobuf.Duration - 9, // 18: google.cloud.aiplatform.v1beta1.ModelContainerSpec.startup_probe:type_name -> google.cloud.aiplatform.v1beta1.Probe - 9, // 19: google.cloud.aiplatform.v1beta1.ModelContainerSpec.health_probe:type_name -> google.cloud.aiplatform.v1beta1.Probe - 2, // 20: google.cloud.aiplatform.v1beta1.ModelSourceInfo.source_type:type_name -> google.cloud.aiplatform.v1beta1.ModelSourceInfo.ModelSourceType - 13, // 21: google.cloud.aiplatform.v1beta1.Probe.exec:type_name -> google.cloud.aiplatform.v1beta1.Probe.ExecAction - 1, // 22: google.cloud.aiplatform.v1beta1.Model.ExportFormat.exportable_contents:type_name -> google.cloud.aiplatform.v1beta1.Model.ExportFormat.ExportableContent - 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 + 7, // 17: google.cloud.aiplatform.v1beta1.ModelContainerSpec.grpc_ports:type_name -> google.cloud.aiplatform.v1beta1.Port + 20, // 18: google.cloud.aiplatform.v1beta1.ModelContainerSpec.deployment_timeout:type_name -> google.protobuf.Duration + 9, // 19: google.cloud.aiplatform.v1beta1.ModelContainerSpec.startup_probe:type_name -> google.cloud.aiplatform.v1beta1.Probe + 9, // 20: google.cloud.aiplatform.v1beta1.ModelContainerSpec.health_probe:type_name -> google.cloud.aiplatform.v1beta1.Probe + 2, // 21: google.cloud.aiplatform.v1beta1.ModelSourceInfo.source_type:type_name -> google.cloud.aiplatform.v1beta1.ModelSourceInfo.ModelSourceType + 13, // 22: google.cloud.aiplatform.v1beta1.Probe.exec:type_name -> google.cloud.aiplatform.v1beta1.Probe.ExecAction + 1, // 23: google.cloud.aiplatform.v1beta1.Model.ExportFormat.exportable_contents:type_name -> google.cloud.aiplatform.v1beta1.Model.ExportFormat.ExportableContent + 24, // [24:24] is the sub-list for method output_type + 24, // [24:24] is the sub-list for method input_type + 24, // [24:24] is the sub-list for extension type_name + 24, // [24:24] is the sub-list for extension extendee + 0, // [0:24] is the sub-list for field type_name } func init() { file_google_cloud_aiplatform_v1beta1_model_proto_init() } diff --git a/aiplatform/apiv1beta1/aiplatformpb/prediction_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/prediction_service.pb.go index eb9a1309045a..8e4a4195cc91 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/prediction_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/prediction_service.pb.go @@ -305,6 +305,261 @@ func (x *RawPredictRequest) GetHttpBody() *httpbody.HttpBody { return nil } +// Request message for +// [PredictionService.DirectPredict][google.cloud.aiplatform.v1beta1.PredictionService.DirectPredict]. +type DirectPredictRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the Endpoint requested to serve the prediction. + // Format: + // `projects/{project}/locations/{location}/endpoints/{endpoint}` + Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` + // The prediction input. + Inputs []*Tensor `protobuf:"bytes,2,rep,name=inputs,proto3" json:"inputs,omitempty"` + // The parameters that govern the prediction. + Parameters *Tensor `protobuf:"bytes,3,opt,name=parameters,proto3" json:"parameters,omitempty"` +} + +func (x *DirectPredictRequest) Reset() { + *x = DirectPredictRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DirectPredictRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DirectPredictRequest) ProtoMessage() {} + +func (x *DirectPredictRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_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 DirectPredictRequest.ProtoReflect.Descriptor instead. +func (*DirectPredictRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_prediction_service_proto_rawDescGZIP(), []int{3} +} + +func (x *DirectPredictRequest) GetEndpoint() string { + if x != nil { + return x.Endpoint + } + return "" +} + +func (x *DirectPredictRequest) GetInputs() []*Tensor { + if x != nil { + return x.Inputs + } + return nil +} + +func (x *DirectPredictRequest) GetParameters() *Tensor { + if x != nil { + return x.Parameters + } + return nil +} + +// Response message for +// [PredictionService.DirectPredict][google.cloud.aiplatform.v1beta1.PredictionService.DirectPredict]. +type DirectPredictResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The prediction output. + Outputs []*Tensor `protobuf:"bytes,1,rep,name=outputs,proto3" json:"outputs,omitempty"` + // The parameters that govern the prediction. + Parameters *Tensor `protobuf:"bytes,2,opt,name=parameters,proto3" json:"parameters,omitempty"` +} + +func (x *DirectPredictResponse) Reset() { + *x = DirectPredictResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DirectPredictResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DirectPredictResponse) ProtoMessage() {} + +func (x *DirectPredictResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1beta1_prediction_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 DirectPredictResponse.ProtoReflect.Descriptor instead. +func (*DirectPredictResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_prediction_service_proto_rawDescGZIP(), []int{4} +} + +func (x *DirectPredictResponse) GetOutputs() []*Tensor { + if x != nil { + return x.Outputs + } + return nil +} + +func (x *DirectPredictResponse) GetParameters() *Tensor { + if x != nil { + return x.Parameters + } + return nil +} + +// Request message for +// [PredictionService.DirectRawPredict][google.cloud.aiplatform.v1beta1.PredictionService.DirectRawPredict]. +type DirectRawPredictRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the Endpoint requested to serve the prediction. + // Format: + // `projects/{project}/locations/{location}/endpoints/{endpoint}` + Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` + // Fully qualified name of the API method being invoked to perform + // predictions. + // + // Format: + // `/namespace.Service/Method/` + // Example: + // `/tensorflow.serving.PredictionService/Predict` + MethodName string `protobuf:"bytes,2,opt,name=method_name,json=methodName,proto3" json:"method_name,omitempty"` + // The prediction input. + Input []byte `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"` +} + +func (x *DirectRawPredictRequest) Reset() { + *x = DirectRawPredictRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DirectRawPredictRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DirectRawPredictRequest) ProtoMessage() {} + +func (x *DirectRawPredictRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1beta1_prediction_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 DirectRawPredictRequest.ProtoReflect.Descriptor instead. +func (*DirectRawPredictRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_prediction_service_proto_rawDescGZIP(), []int{5} +} + +func (x *DirectRawPredictRequest) GetEndpoint() string { + if x != nil { + return x.Endpoint + } + return "" +} + +func (x *DirectRawPredictRequest) GetMethodName() string { + if x != nil { + return x.MethodName + } + return "" +} + +func (x *DirectRawPredictRequest) GetInput() []byte { + if x != nil { + return x.Input + } + return nil +} + +// Response message for +// [PredictionService.DirectRawPredict][google.cloud.aiplatform.v1beta1.PredictionService.DirectRawPredict]. +type DirectRawPredictResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The prediction output. + Output []byte `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"` +} + +func (x *DirectRawPredictResponse) Reset() { + *x = DirectRawPredictResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DirectRawPredictResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DirectRawPredictResponse) ProtoMessage() {} + +func (x *DirectRawPredictResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1beta1_prediction_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 DirectRawPredictResponse.ProtoReflect.Descriptor instead. +func (*DirectRawPredictResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_prediction_service_proto_rawDescGZIP(), []int{6} +} + +func (x *DirectRawPredictResponse) GetOutput() []byte { + if x != nil { + return x.Output + } + return nil +} + // Request message for // [PredictionService.StreamingPredict][google.cloud.aiplatform.v1beta1.PredictionService.StreamingPredict]. // @@ -330,7 +585,7 @@ type StreamingPredictRequest struct { func (x *StreamingPredictRequest) Reset() { *x = StreamingPredictRequest{} if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[3] + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -343,7 +598,7 @@ func (x *StreamingPredictRequest) String() string { func (*StreamingPredictRequest) ProtoMessage() {} func (x *StreamingPredictRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[3] + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -356,7 +611,7 @@ func (x *StreamingPredictRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamingPredictRequest.ProtoReflect.Descriptor instead. func (*StreamingPredictRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_aiplatform_v1beta1_prediction_service_proto_rawDescGZIP(), []int{3} + return file_google_cloud_aiplatform_v1beta1_prediction_service_proto_rawDescGZIP(), []int{7} } func (x *StreamingPredictRequest) GetEndpoint() string { @@ -396,7 +651,7 @@ type StreamingPredictResponse struct { func (x *StreamingPredictResponse) Reset() { *x = StreamingPredictResponse{} if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[4] + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -409,7 +664,7 @@ func (x *StreamingPredictResponse) String() string { func (*StreamingPredictResponse) ProtoMessage() {} func (x *StreamingPredictResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[4] + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -422,7 +677,7 @@ func (x *StreamingPredictResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamingPredictResponse.ProtoReflect.Descriptor instead. func (*StreamingPredictResponse) Descriptor() ([]byte, []int) { - return file_google_cloud_aiplatform_v1beta1_prediction_service_proto_rawDescGZIP(), []int{4} + return file_google_cloud_aiplatform_v1beta1_prediction_service_proto_rawDescGZIP(), []int{8} } func (x *StreamingPredictResponse) GetOutputs() []*Tensor { @@ -439,6 +694,143 @@ func (x *StreamingPredictResponse) GetParameters() *Tensor { return nil } +// Request message for +// [PredictionService.StreamingRawPredict][google.cloud.aiplatform.v1beta1.PredictionService.StreamingRawPredict]. +// +// The first message must contain +// [endpoint][google.cloud.aiplatform.v1beta1.StreamingRawPredictRequest.endpoint] +// and +// [method_name][google.cloud.aiplatform.v1beta1.StreamingRawPredictRequest.method_name] +// fields and optionally +// [input][google.cloud.aiplatform.v1beta1.StreamingRawPredictRequest.input]. +// The subsequent messages must contain +// [input][google.cloud.aiplatform.v1beta1.StreamingRawPredictRequest.input]. +// [method_name][google.cloud.aiplatform.v1beta1.StreamingRawPredictRequest.method_name] +// in the subsequent messages have no effect. +type StreamingRawPredictRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the Endpoint requested to serve the prediction. + // Format: + // `projects/{project}/locations/{location}/endpoints/{endpoint}` + Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` + // Fully qualified name of the API method being invoked to perform + // predictions. + // + // Format: + // `/namespace.Service/Method/` + // Example: + // `/tensorflow.serving.PredictionService/Predict` + MethodName string `protobuf:"bytes,2,opt,name=method_name,json=methodName,proto3" json:"method_name,omitempty"` + // The prediction input. + Input []byte `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"` +} + +func (x *StreamingRawPredictRequest) Reset() { + *x = StreamingRawPredictRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamingRawPredictRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamingRawPredictRequest) ProtoMessage() {} + +func (x *StreamingRawPredictRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1beta1_prediction_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 StreamingRawPredictRequest.ProtoReflect.Descriptor instead. +func (*StreamingRawPredictRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_prediction_service_proto_rawDescGZIP(), []int{9} +} + +func (x *StreamingRawPredictRequest) GetEndpoint() string { + if x != nil { + return x.Endpoint + } + return "" +} + +func (x *StreamingRawPredictRequest) GetMethodName() string { + if x != nil { + return x.MethodName + } + return "" +} + +func (x *StreamingRawPredictRequest) GetInput() []byte { + if x != nil { + return x.Input + } + return nil +} + +// Response message for +// [PredictionService.StreamingRawPredict][google.cloud.aiplatform.v1beta1.PredictionService.StreamingRawPredict]. +type StreamingRawPredictResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The prediction output. + Output []byte `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"` +} + +func (x *StreamingRawPredictResponse) Reset() { + *x = StreamingRawPredictResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamingRawPredictResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamingRawPredictResponse) ProtoMessage() {} + +func (x *StreamingRawPredictResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1beta1_prediction_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 StreamingRawPredictResponse.ProtoReflect.Descriptor instead. +func (*StreamingRawPredictResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_prediction_service_proto_rawDescGZIP(), []int{10} +} + +func (x *StreamingRawPredictResponse) GetOutput() []byte { + if x != nil { + return x.Output + } + return nil +} + // Request message for // [PredictionService.Explain][google.cloud.aiplatform.v1beta1.PredictionService.Explain]. type ExplainRequest struct { @@ -493,7 +885,7 @@ type ExplainRequest struct { func (x *ExplainRequest) Reset() { *x = ExplainRequest{} if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[5] + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -506,7 +898,7 @@ func (x *ExplainRequest) String() string { func (*ExplainRequest) ProtoMessage() {} func (x *ExplainRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[5] + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -519,7 +911,7 @@ func (x *ExplainRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ExplainRequest.ProtoReflect.Descriptor instead. func (*ExplainRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_aiplatform_v1beta1_prediction_service_proto_rawDescGZIP(), []int{5} + return file_google_cloud_aiplatform_v1beta1_prediction_service_proto_rawDescGZIP(), []int{11} } func (x *ExplainRequest) GetEndpoint() string { @@ -592,7 +984,7 @@ type ExplainResponse struct { func (x *ExplainResponse) Reset() { *x = ExplainResponse{} if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[6] + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -605,7 +997,7 @@ func (x *ExplainResponse) String() string { func (*ExplainResponse) ProtoMessage() {} func (x *ExplainResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[6] + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -618,7 +1010,7 @@ func (x *ExplainResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ExplainResponse.ProtoReflect.Descriptor instead. func (*ExplainResponse) Descriptor() ([]byte, []int) { - return file_google_cloud_aiplatform_v1beta1_prediction_service_proto_rawDescGZIP(), []int{6} + return file_google_cloud_aiplatform_v1beta1_prediction_service_proto_rawDescGZIP(), []int{12} } func (x *ExplainResponse) GetExplanations() []*Explanation { @@ -668,7 +1060,7 @@ type CountTokensRequest struct { func (x *CountTokensRequest) Reset() { *x = CountTokensRequest{} if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[7] + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -681,7 +1073,7 @@ func (x *CountTokensRequest) String() string { func (*CountTokensRequest) ProtoMessage() {} func (x *CountTokensRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[7] + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -694,7 +1086,7 @@ func (x *CountTokensRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CountTokensRequest.ProtoReflect.Descriptor instead. func (*CountTokensRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_aiplatform_v1beta1_prediction_service_proto_rawDescGZIP(), []int{7} + return file_google_cloud_aiplatform_v1beta1_prediction_service_proto_rawDescGZIP(), []int{13} } func (x *CountTokensRequest) GetEndpoint() string { @@ -728,7 +1120,7 @@ type CountTokensResponse struct { func (x *CountTokensResponse) Reset() { *x = CountTokensResponse{} if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[8] + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -741,7 +1133,7 @@ func (x *CountTokensResponse) String() string { func (*CountTokensResponse) ProtoMessage() {} func (x *CountTokensResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[8] + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -754,7 +1146,7 @@ func (x *CountTokensResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CountTokensResponse.ProtoReflect.Descriptor instead. func (*CountTokensResponse) Descriptor() ([]byte, []int) { - return file_google_cloud_aiplatform_v1beta1_prediction_service_proto_rawDescGZIP(), []int{8} + return file_google_cloud_aiplatform_v1beta1_prediction_service_proto_rawDescGZIP(), []int{14} } func (x *CountTokensResponse) GetTotalTokens() int32 { @@ -789,7 +1181,7 @@ type ExplainResponse_ConcurrentExplanation struct { func (x *ExplainResponse_ConcurrentExplanation) Reset() { *x = ExplainResponse_ConcurrentExplanation{} if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[10] + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -802,7 +1194,7 @@ func (x *ExplainResponse_ConcurrentExplanation) String() string { func (*ExplainResponse_ConcurrentExplanation) ProtoMessage() {} func (x *ExplainResponse_ConcurrentExplanation) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[10] + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -815,7 +1207,7 @@ func (x *ExplainResponse_ConcurrentExplanation) ProtoReflect() protoreflect.Mess // Deprecated: Use ExplainResponse_ConcurrentExplanation.ProtoReflect.Descriptor instead. func (*ExplainResponse_ConcurrentExplanation) Descriptor() ([]byte, []int) { - return file_google_cloud_aiplatform_v1beta1_prediction_service_proto_rawDescGZIP(), []int{6, 0} + return file_google_cloud_aiplatform_v1beta1_prediction_service_proto_rawDescGZIP(), []int{12, 0} } func (x *ExplainResponse_ConcurrentExplanation) GetExplanations() []*Explanation { @@ -893,7 +1285,45 @@ var file_google_cloud_aiplatform_v1beta1_prediction_service_proto_rawDesc = []by 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x31, 0x0a, 0x09, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, - 0x52, 0x08, 0x68, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x22, 0xeb, 0x01, 0x0a, 0x17, 0x53, + 0x52, 0x08, 0x68, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x22, 0xe8, 0x01, 0x0a, 0x14, 0x44, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x24, 0x0a, 0x22, 0x61, + 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x06, 0x69, + 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x65, + 0x6e, 0x73, 0x6f, 0x72, 0x52, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0xa3, 0x01, 0x0a, 0x15, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x41, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x52, + 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x98, 0x01, 0x0a, 0x17, + 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x61, 0x77, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x24, 0x0a, 0x22, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, + 0x1f, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x32, 0x0a, 0x18, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x52, 0x61, 0x77, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0xeb, 0x01, 0x0a, 0x17, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x24, @@ -915,220 +1345,279 @@ var file_google_cloud_aiplatform_v1beta1_prediction_service_proto_rawDesc = []by 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, - 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, - 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x73, 0x22, 0xad, 0x05, 0x0a, 0x0e, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x24, 0x0a, 0x22, - 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x09, - 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 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, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x69, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 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, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, - 0x74, 0x0a, 0x19, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x70, 0x65, 0x63, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x17, 0x65, 0x78, - 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x4f, 0x76, 0x65, - 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0xac, 0x01, 0x0a, 0x24, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x56, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x45, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x4f, - 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, - 0x01, 0x52, 0x21, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x70, - 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x4f, 0x76, 0x65, 0x72, - 0x72, 0x69, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, - 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x49, 0x64, - 0x1a, 0x8e, 0x01, 0x0a, 0x26, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, - 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x4f, 0x76, - 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4e, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, - 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, - 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x4f, 0x76, - 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x22, 0xd0, 0x04, 0x0a, 0x0f, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x6e, 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, 0x61, 0x69, 0x70, 0x6c, 0x61, - 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, - 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x6c, 0x61, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6e, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, + 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x73, 0x22, 0x9b, 0x01, 0x0a, 0x1a, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x52, + 0x61, 0x77, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x46, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x2a, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x24, 0x0a, 0x22, 0x61, 0x69, 0x70, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, + 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, + 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x22, + 0x35, 0x0a, 0x1b, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x77, 0x50, + 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0xad, 0x05, 0x0a, 0x0e, 0x45, 0x78, 0x70, 0x6c, 0x61, + 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x24, 0x0a, 0x22, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x12, 0x39, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, + 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, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x0a, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 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, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x12, 0x74, 0x0a, 0x19, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, + 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, + 0x65, 0x52, 0x17, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, + 0x65, 0x63, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0xac, 0x01, 0x0a, 0x24, 0x63, + 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x56, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6c, - 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x16, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x2a, 0x0a, 0x11, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x5f, 0x6d, 0x6f, 0x64, 0x65, - 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x70, 0x6c, - 0x6f, 0x79, 0x65, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x0b, 0x70, - 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 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, 0x0b, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x69, 0x0a, 0x15, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x50, - 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x6e, 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, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x1a, 0x91, 0x01, 0x0a, 0x1b, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, - 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x70, 0x65, 0x63, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x21, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, + 0x63, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x64, 0x65, 0x70, + 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x4d, 0x6f, + 0x64, 0x65, 0x6c, 0x49, 0x64, 0x1a, 0x8e, 0x01, 0x0a, 0x26, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x70, 0x65, 0x63, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x5c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x46, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x65, 0x79, 0x12, 0x4e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x78, - 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x22, 0x97, 0x01, 0x0a, 0x12, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x65, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xe0, - 0x41, 0x02, 0xfa, 0x41, 0x24, 0x0a, 0x22, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, - 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, - 0x18, 0x02, 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, 0x42, 0x03, - 0xe0, 0x41, 0x02, 0x52, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x74, - 0x0a, 0x13, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x5f, 0x62, 0x69, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x72, 0x61, - 0x63, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x17, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x42, 0x69, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x68, 0x61, 0x72, 0x61, 0x63, - 0x74, 0x65, 0x72, 0x73, 0x32, 0x89, 0x0c, 0x0a, 0x11, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa8, 0x02, 0x0a, 0x07, 0x50, - 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x12, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, - 0x6d, 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, 0xb9, 0x01, 0xda, 0x41, 0x1d, 0x65, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x73, 0x2c, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x92, 0x01, 0x3a, 0x01, 0x2a, 0x5a, 0x4d, 0x3a, 0x01, 0x2a, 0x22, 0x48, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 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, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, - 0x73, 0x2f, 0x2a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x70, 0x72, - 0x65, 0x64, 0x69, 0x63, 0x74, 0x22, 0x3e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x7b, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 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, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x70, 0x72, - 0x65, 0x64, 0x69, 0x63, 0x74, 0x12, 0x8d, 0x02, 0x0a, 0x0a, 0x52, 0x61, 0x77, 0x50, 0x72, 0x65, - 0x64, 0x69, 0x63, 0x74, 0x12, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x22, 0xb4, - 0x01, 0xda, 0x41, 0x12, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2c, 0x68, 0x74, 0x74, - 0x70, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x98, 0x01, 0x3a, 0x01, 0x2a, - 0x5a, 0x50, 0x3a, 0x01, 0x2a, 0x22, 0x4b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x7b, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 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, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x6d, 0x6f, - 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x61, 0x77, 0x50, 0x72, 0x65, 0x64, 0x69, - 0x63, 0x74, 0x22, 0x41, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x65, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 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, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x61, 0x77, 0x50, 0x72, - 0x65, 0x64, 0x69, 0x63, 0x74, 0x12, 0xc9, 0x02, 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, - 0x12, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x70, 0x65, 0x63, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd0, 0x04, 0x0a, 0x0f, 0x45, 0x78, 0x70, 0x6c, 0x61, + 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0c, 0x65, 0x78, + 0x70, 0x6c, 0x61, 0x6e, 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, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x65, 0x64, - 0x69, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, - 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb7, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xb0, 0x01, 0x3a, - 0x01, 0x2a, 0x5a, 0x5c, 0x3a, 0x01, 0x2a, 0x22, 0x57, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, + 0x65, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x85, 0x01, 0x0a, + 0x17, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x6c, + 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4c, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x70, 0x6c, 0x61, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x16, 0x63, 0x6f, + 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x49, 0x64, + 0x12, 0x38, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 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, 0x0b, 0x70, + 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x69, 0x0a, 0x15, 0x43, 0x6f, + 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x50, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x6e, 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, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6c, + 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x91, 0x01, 0x0a, 0x1b, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x6e, 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, 0x5c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x97, 0x01, 0x0a, 0x12, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x46, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x2a, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x24, 0x0a, 0x22, 0x61, 0x69, 0x70, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, + 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 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, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x73, 0x22, 0x74, 0x0a, 0x13, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x3a, 0x0a, + 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x69, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x17, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x69, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, + 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x73, 0x32, 0xe2, 0x11, 0x0a, 0x11, 0x50, 0x72, + 0x65, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0xa8, 0x02, 0x0a, 0x07, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x12, 0x2f, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, + 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 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, 0xb9, + 0x01, 0xda, 0x41, 0x1d, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2c, 0x69, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2c, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x92, 0x01, 0x3a, 0x01, 0x2a, 0x5a, 0x4d, 0x3a, 0x01, 0x2a, + 0x22, 0x48, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x65, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 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, 0x75, 0x62, 0x6c, + 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, + 0x2a, 0x7d, 0x3a, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x22, 0x3e, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 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, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x2f, + 0x2a, 0x7d, 0x3a, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x12, 0x8d, 0x02, 0x0a, 0x0a, 0x52, + 0x61, 0x77, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x12, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x61, 0x77, 0x50, + 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, + 0x6f, 0x64, 0x79, 0x22, 0xb4, 0x01, 0xda, 0x41, 0x12, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x98, 0x01, 0x3a, 0x01, 0x2a, 0x5a, 0x50, 0x3a, 0x01, 0x2a, 0x22, 0x4b, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 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, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, + 0x2f, 0x2a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x61, 0x77, + 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x22, 0x41, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 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, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, - 0x22, 0x4d, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 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, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x30, - 0x01, 0x12, 0xe9, 0x01, 0x0a, 0x07, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x12, 0x2f, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, - 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, + 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, + 0x72, 0x61, 0x77, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x12, 0xcf, 0x01, 0x0a, 0x0d, 0x44, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x12, 0x35, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x50, 0x72, 0x65, 0x64, + 0x69, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x49, 0x3a, 0x01, 0x2a, 0x22, 0x44, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x7b, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 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, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x64, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x12, 0xdb, 0x01, 0x0a, + 0x10, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x61, 0x77, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, + 0x74, 0x12, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x61, 0x77, 0x50, 0x72, 0x65, + 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x52, 0x61, 0x77, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4c, 0x3a, 0x01, + 0x2a, 0x22, 0x47, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 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, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x52, 0x61, 0x77, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x12, 0x8d, 0x01, 0x0a, 0x10, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x12, + 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, + 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x65, 0x64, 0x69, + 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0xc9, 0x02, 0x0a, 0x16, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x50, 0x72, + 0x65, 0x64, 0x69, 0x63, 0x74, 0x12, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, + 0x67, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, + 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x65, 0x64, 0x69, + 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb7, 0x01, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0xb0, 0x01, 0x3a, 0x01, 0x2a, 0x5a, 0x5c, 0x3a, 0x01, 0x2a, 0x22, 0x57, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 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, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, + 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x50, 0x72, + 0x65, 0x64, 0x69, 0x63, 0x74, 0x22, 0x4d, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x7b, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 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, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x65, + 0x64, 0x69, 0x63, 0x74, 0x30, 0x01, 0x12, 0x96, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x77, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x12, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x7b, 0xda, 0x41, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2c, 0x69, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2c, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x73, 0x2c, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x5f, 0x6d, 0x6f, 0x64, 0x65, - 0x6c, 0x5f, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x43, 0x3a, 0x01, 0x2a, 0x22, 0x3e, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 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, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x12, 0xb1, 0x02, - 0x0a, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x33, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, - 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 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, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb6, 0x01, 0xda, 0x41, 0x12, 0x65, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x9a, 0x01, 0x3a, 0x01, 0x2a, 0x5a, 0x51, 0x3a, 0x01, 0x2a, 0x22, - 0x4c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x65, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 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, 0x75, 0x62, 0x6c, 0x69, - 0x73, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x2a, - 0x7d, 0x3a, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x22, 0x42, 0x2f, + 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x77, 0x50, 0x72, 0x65, + 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x77, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, + 0xe9, 0x01, 0x0a, 0x07, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x12, 0x2f, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, + 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, + 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7b, + 0xda, 0x41, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2c, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2c, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x2c, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, + 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x43, 0x3a, 0x01, 0x2a, 0x22, 0x3e, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 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, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, + 0x2f, 0x2a, 0x7d, 0x3a, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x12, 0xb1, 0x02, 0x0a, 0x0b, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x33, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 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, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb6, 0x01, 0xda, 0x41, 0x12, 0x65, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x2c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x9a, 0x01, 0x3a, 0x01, 0x2a, 0x5a, 0x51, 0x3a, 0x01, 0x2a, 0x22, 0x4c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 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, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x73, 0x1a, 0x4d, 0xca, 0x41, 0x19, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 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, 0xed, 0x01, 0x0a, 0x23, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, - 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, 0x43, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, - 0x72, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x69, - 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x70, 0x62, 0x3b, 0x61, 0x69, 0x70, 0x6c, 0x61, - 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x70, 0x62, 0xaa, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x41, 0x49, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, - 0x6d, 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x49, 0x50, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x22, 0x47, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x49, 0x50, - 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, + 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x22, 0x42, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 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, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, + 0x2f, 0x2a, 0x7d, 0x3a, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x1a, + 0x4d, 0xca, 0x41, 0x19, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 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, 0xed, + 0x01, 0x0a, 0x23, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 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, 0x43, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x69, 0x70, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x70, 0x62, 0x3b, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x70, 0x62, 0xaa, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x41, 0x49, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, + 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x49, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, + 0x6d, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x22, 0x47, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x49, 0x50, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1143,62 +1632,80 @@ func file_google_cloud_aiplatform_v1beta1_prediction_service_proto_rawDescGZIP() return file_google_cloud_aiplatform_v1beta1_prediction_service_proto_rawDescData } -var file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes = make([]protoimpl.MessageInfo, 18) var file_google_cloud_aiplatform_v1beta1_prediction_service_proto_goTypes = []interface{}{ (*PredictRequest)(nil), // 0: google.cloud.aiplatform.v1beta1.PredictRequest (*PredictResponse)(nil), // 1: google.cloud.aiplatform.v1beta1.PredictResponse (*RawPredictRequest)(nil), // 2: google.cloud.aiplatform.v1beta1.RawPredictRequest - (*StreamingPredictRequest)(nil), // 3: google.cloud.aiplatform.v1beta1.StreamingPredictRequest - (*StreamingPredictResponse)(nil), // 4: google.cloud.aiplatform.v1beta1.StreamingPredictResponse - (*ExplainRequest)(nil), // 5: google.cloud.aiplatform.v1beta1.ExplainRequest - (*ExplainResponse)(nil), // 6: google.cloud.aiplatform.v1beta1.ExplainResponse - (*CountTokensRequest)(nil), // 7: google.cloud.aiplatform.v1beta1.CountTokensRequest - (*CountTokensResponse)(nil), // 8: google.cloud.aiplatform.v1beta1.CountTokensResponse - nil, // 9: google.cloud.aiplatform.v1beta1.ExplainRequest.ConcurrentExplanationSpecOverrideEntry - (*ExplainResponse_ConcurrentExplanation)(nil), // 10: google.cloud.aiplatform.v1beta1.ExplainResponse.ConcurrentExplanation - nil, // 11: google.cloud.aiplatform.v1beta1.ExplainResponse.ConcurrentExplanationsEntry - (*structpb.Value)(nil), // 12: google.protobuf.Value - (*httpbody.HttpBody)(nil), // 13: google.api.HttpBody - (*Tensor)(nil), // 14: google.cloud.aiplatform.v1beta1.Tensor - (*ExplanationSpecOverride)(nil), // 15: google.cloud.aiplatform.v1beta1.ExplanationSpecOverride - (*Explanation)(nil), // 16: google.cloud.aiplatform.v1beta1.Explanation + (*DirectPredictRequest)(nil), // 3: google.cloud.aiplatform.v1beta1.DirectPredictRequest + (*DirectPredictResponse)(nil), // 4: google.cloud.aiplatform.v1beta1.DirectPredictResponse + (*DirectRawPredictRequest)(nil), // 5: google.cloud.aiplatform.v1beta1.DirectRawPredictRequest + (*DirectRawPredictResponse)(nil), // 6: google.cloud.aiplatform.v1beta1.DirectRawPredictResponse + (*StreamingPredictRequest)(nil), // 7: google.cloud.aiplatform.v1beta1.StreamingPredictRequest + (*StreamingPredictResponse)(nil), // 8: google.cloud.aiplatform.v1beta1.StreamingPredictResponse + (*StreamingRawPredictRequest)(nil), // 9: google.cloud.aiplatform.v1beta1.StreamingRawPredictRequest + (*StreamingRawPredictResponse)(nil), // 10: google.cloud.aiplatform.v1beta1.StreamingRawPredictResponse + (*ExplainRequest)(nil), // 11: google.cloud.aiplatform.v1beta1.ExplainRequest + (*ExplainResponse)(nil), // 12: google.cloud.aiplatform.v1beta1.ExplainResponse + (*CountTokensRequest)(nil), // 13: google.cloud.aiplatform.v1beta1.CountTokensRequest + (*CountTokensResponse)(nil), // 14: google.cloud.aiplatform.v1beta1.CountTokensResponse + nil, // 15: google.cloud.aiplatform.v1beta1.ExplainRequest.ConcurrentExplanationSpecOverrideEntry + (*ExplainResponse_ConcurrentExplanation)(nil), // 16: google.cloud.aiplatform.v1beta1.ExplainResponse.ConcurrentExplanation + nil, // 17: google.cloud.aiplatform.v1beta1.ExplainResponse.ConcurrentExplanationsEntry + (*structpb.Value)(nil), // 18: google.protobuf.Value + (*httpbody.HttpBody)(nil), // 19: google.api.HttpBody + (*Tensor)(nil), // 20: google.cloud.aiplatform.v1beta1.Tensor + (*ExplanationSpecOverride)(nil), // 21: google.cloud.aiplatform.v1beta1.ExplanationSpecOverride + (*Explanation)(nil), // 22: google.cloud.aiplatform.v1beta1.Explanation } var file_google_cloud_aiplatform_v1beta1_prediction_service_proto_depIdxs = []int32{ - 12, // 0: google.cloud.aiplatform.v1beta1.PredictRequest.instances:type_name -> google.protobuf.Value - 12, // 1: google.cloud.aiplatform.v1beta1.PredictRequest.parameters:type_name -> google.protobuf.Value - 12, // 2: google.cloud.aiplatform.v1beta1.PredictResponse.predictions:type_name -> google.protobuf.Value - 12, // 3: google.cloud.aiplatform.v1beta1.PredictResponse.metadata:type_name -> google.protobuf.Value - 13, // 4: google.cloud.aiplatform.v1beta1.RawPredictRequest.http_body:type_name -> google.api.HttpBody - 14, // 5: google.cloud.aiplatform.v1beta1.StreamingPredictRequest.inputs:type_name -> google.cloud.aiplatform.v1beta1.Tensor - 14, // 6: google.cloud.aiplatform.v1beta1.StreamingPredictRequest.parameters:type_name -> google.cloud.aiplatform.v1beta1.Tensor - 14, // 7: google.cloud.aiplatform.v1beta1.StreamingPredictResponse.outputs:type_name -> google.cloud.aiplatform.v1beta1.Tensor - 14, // 8: google.cloud.aiplatform.v1beta1.StreamingPredictResponse.parameters:type_name -> google.cloud.aiplatform.v1beta1.Tensor - 12, // 9: google.cloud.aiplatform.v1beta1.ExplainRequest.instances:type_name -> google.protobuf.Value - 12, // 10: google.cloud.aiplatform.v1beta1.ExplainRequest.parameters:type_name -> google.protobuf.Value - 15, // 11: google.cloud.aiplatform.v1beta1.ExplainRequest.explanation_spec_override:type_name -> google.cloud.aiplatform.v1beta1.ExplanationSpecOverride - 9, // 12: google.cloud.aiplatform.v1beta1.ExplainRequest.concurrent_explanation_spec_override:type_name -> google.cloud.aiplatform.v1beta1.ExplainRequest.ConcurrentExplanationSpecOverrideEntry - 16, // 13: google.cloud.aiplatform.v1beta1.ExplainResponse.explanations:type_name -> google.cloud.aiplatform.v1beta1.Explanation - 11, // 14: google.cloud.aiplatform.v1beta1.ExplainResponse.concurrent_explanations:type_name -> google.cloud.aiplatform.v1beta1.ExplainResponse.ConcurrentExplanationsEntry - 12, // 15: google.cloud.aiplatform.v1beta1.ExplainResponse.predictions:type_name -> google.protobuf.Value - 12, // 16: google.cloud.aiplatform.v1beta1.CountTokensRequest.instances:type_name -> google.protobuf.Value - 15, // 17: google.cloud.aiplatform.v1beta1.ExplainRequest.ConcurrentExplanationSpecOverrideEntry.value:type_name -> google.cloud.aiplatform.v1beta1.ExplanationSpecOverride - 16, // 18: google.cloud.aiplatform.v1beta1.ExplainResponse.ConcurrentExplanation.explanations:type_name -> google.cloud.aiplatform.v1beta1.Explanation - 10, // 19: google.cloud.aiplatform.v1beta1.ExplainResponse.ConcurrentExplanationsEntry.value:type_name -> google.cloud.aiplatform.v1beta1.ExplainResponse.ConcurrentExplanation - 0, // 20: google.cloud.aiplatform.v1beta1.PredictionService.Predict:input_type -> google.cloud.aiplatform.v1beta1.PredictRequest - 2, // 21: google.cloud.aiplatform.v1beta1.PredictionService.RawPredict:input_type -> google.cloud.aiplatform.v1beta1.RawPredictRequest - 3, // 22: google.cloud.aiplatform.v1beta1.PredictionService.ServerStreamingPredict:input_type -> google.cloud.aiplatform.v1beta1.StreamingPredictRequest - 5, // 23: google.cloud.aiplatform.v1beta1.PredictionService.Explain:input_type -> google.cloud.aiplatform.v1beta1.ExplainRequest - 7, // 24: google.cloud.aiplatform.v1beta1.PredictionService.CountTokens:input_type -> google.cloud.aiplatform.v1beta1.CountTokensRequest - 1, // 25: google.cloud.aiplatform.v1beta1.PredictionService.Predict:output_type -> google.cloud.aiplatform.v1beta1.PredictResponse - 13, // 26: google.cloud.aiplatform.v1beta1.PredictionService.RawPredict:output_type -> google.api.HttpBody - 4, // 27: google.cloud.aiplatform.v1beta1.PredictionService.ServerStreamingPredict:output_type -> google.cloud.aiplatform.v1beta1.StreamingPredictResponse - 6, // 28: google.cloud.aiplatform.v1beta1.PredictionService.Explain:output_type -> google.cloud.aiplatform.v1beta1.ExplainResponse - 8, // 29: google.cloud.aiplatform.v1beta1.PredictionService.CountTokens:output_type -> google.cloud.aiplatform.v1beta1.CountTokensResponse - 25, // [25:30] is the sub-list for method output_type - 20, // [20:25] 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 + 18, // 0: google.cloud.aiplatform.v1beta1.PredictRequest.instances:type_name -> google.protobuf.Value + 18, // 1: google.cloud.aiplatform.v1beta1.PredictRequest.parameters:type_name -> google.protobuf.Value + 18, // 2: google.cloud.aiplatform.v1beta1.PredictResponse.predictions:type_name -> google.protobuf.Value + 18, // 3: google.cloud.aiplatform.v1beta1.PredictResponse.metadata:type_name -> google.protobuf.Value + 19, // 4: google.cloud.aiplatform.v1beta1.RawPredictRequest.http_body:type_name -> google.api.HttpBody + 20, // 5: google.cloud.aiplatform.v1beta1.DirectPredictRequest.inputs:type_name -> google.cloud.aiplatform.v1beta1.Tensor + 20, // 6: google.cloud.aiplatform.v1beta1.DirectPredictRequest.parameters:type_name -> google.cloud.aiplatform.v1beta1.Tensor + 20, // 7: google.cloud.aiplatform.v1beta1.DirectPredictResponse.outputs:type_name -> google.cloud.aiplatform.v1beta1.Tensor + 20, // 8: google.cloud.aiplatform.v1beta1.DirectPredictResponse.parameters:type_name -> google.cloud.aiplatform.v1beta1.Tensor + 20, // 9: google.cloud.aiplatform.v1beta1.StreamingPredictRequest.inputs:type_name -> google.cloud.aiplatform.v1beta1.Tensor + 20, // 10: google.cloud.aiplatform.v1beta1.StreamingPredictRequest.parameters:type_name -> google.cloud.aiplatform.v1beta1.Tensor + 20, // 11: google.cloud.aiplatform.v1beta1.StreamingPredictResponse.outputs:type_name -> google.cloud.aiplatform.v1beta1.Tensor + 20, // 12: google.cloud.aiplatform.v1beta1.StreamingPredictResponse.parameters:type_name -> google.cloud.aiplatform.v1beta1.Tensor + 18, // 13: google.cloud.aiplatform.v1beta1.ExplainRequest.instances:type_name -> google.protobuf.Value + 18, // 14: google.cloud.aiplatform.v1beta1.ExplainRequest.parameters:type_name -> google.protobuf.Value + 21, // 15: google.cloud.aiplatform.v1beta1.ExplainRequest.explanation_spec_override:type_name -> google.cloud.aiplatform.v1beta1.ExplanationSpecOverride + 15, // 16: google.cloud.aiplatform.v1beta1.ExplainRequest.concurrent_explanation_spec_override:type_name -> google.cloud.aiplatform.v1beta1.ExplainRequest.ConcurrentExplanationSpecOverrideEntry + 22, // 17: google.cloud.aiplatform.v1beta1.ExplainResponse.explanations:type_name -> google.cloud.aiplatform.v1beta1.Explanation + 17, // 18: google.cloud.aiplatform.v1beta1.ExplainResponse.concurrent_explanations:type_name -> google.cloud.aiplatform.v1beta1.ExplainResponse.ConcurrentExplanationsEntry + 18, // 19: google.cloud.aiplatform.v1beta1.ExplainResponse.predictions:type_name -> google.protobuf.Value + 18, // 20: google.cloud.aiplatform.v1beta1.CountTokensRequest.instances:type_name -> google.protobuf.Value + 21, // 21: google.cloud.aiplatform.v1beta1.ExplainRequest.ConcurrentExplanationSpecOverrideEntry.value:type_name -> google.cloud.aiplatform.v1beta1.ExplanationSpecOverride + 22, // 22: google.cloud.aiplatform.v1beta1.ExplainResponse.ConcurrentExplanation.explanations:type_name -> google.cloud.aiplatform.v1beta1.Explanation + 16, // 23: google.cloud.aiplatform.v1beta1.ExplainResponse.ConcurrentExplanationsEntry.value:type_name -> google.cloud.aiplatform.v1beta1.ExplainResponse.ConcurrentExplanation + 0, // 24: google.cloud.aiplatform.v1beta1.PredictionService.Predict:input_type -> google.cloud.aiplatform.v1beta1.PredictRequest + 2, // 25: google.cloud.aiplatform.v1beta1.PredictionService.RawPredict:input_type -> google.cloud.aiplatform.v1beta1.RawPredictRequest + 3, // 26: google.cloud.aiplatform.v1beta1.PredictionService.DirectPredict:input_type -> google.cloud.aiplatform.v1beta1.DirectPredictRequest + 5, // 27: google.cloud.aiplatform.v1beta1.PredictionService.DirectRawPredict:input_type -> google.cloud.aiplatform.v1beta1.DirectRawPredictRequest + 7, // 28: google.cloud.aiplatform.v1beta1.PredictionService.StreamingPredict:input_type -> google.cloud.aiplatform.v1beta1.StreamingPredictRequest + 7, // 29: google.cloud.aiplatform.v1beta1.PredictionService.ServerStreamingPredict:input_type -> google.cloud.aiplatform.v1beta1.StreamingPredictRequest + 9, // 30: google.cloud.aiplatform.v1beta1.PredictionService.StreamingRawPredict:input_type -> google.cloud.aiplatform.v1beta1.StreamingRawPredictRequest + 11, // 31: google.cloud.aiplatform.v1beta1.PredictionService.Explain:input_type -> google.cloud.aiplatform.v1beta1.ExplainRequest + 13, // 32: google.cloud.aiplatform.v1beta1.PredictionService.CountTokens:input_type -> google.cloud.aiplatform.v1beta1.CountTokensRequest + 1, // 33: google.cloud.aiplatform.v1beta1.PredictionService.Predict:output_type -> google.cloud.aiplatform.v1beta1.PredictResponse + 19, // 34: google.cloud.aiplatform.v1beta1.PredictionService.RawPredict:output_type -> google.api.HttpBody + 4, // 35: google.cloud.aiplatform.v1beta1.PredictionService.DirectPredict:output_type -> google.cloud.aiplatform.v1beta1.DirectPredictResponse + 6, // 36: google.cloud.aiplatform.v1beta1.PredictionService.DirectRawPredict:output_type -> google.cloud.aiplatform.v1beta1.DirectRawPredictResponse + 8, // 37: google.cloud.aiplatform.v1beta1.PredictionService.StreamingPredict:output_type -> google.cloud.aiplatform.v1beta1.StreamingPredictResponse + 8, // 38: google.cloud.aiplatform.v1beta1.PredictionService.ServerStreamingPredict:output_type -> google.cloud.aiplatform.v1beta1.StreamingPredictResponse + 10, // 39: google.cloud.aiplatform.v1beta1.PredictionService.StreamingRawPredict:output_type -> google.cloud.aiplatform.v1beta1.StreamingRawPredictResponse + 12, // 40: google.cloud.aiplatform.v1beta1.PredictionService.Explain:output_type -> google.cloud.aiplatform.v1beta1.ExplainResponse + 14, // 41: google.cloud.aiplatform.v1beta1.PredictionService.CountTokens:output_type -> google.cloud.aiplatform.v1beta1.CountTokensResponse + 33, // [33:42] is the sub-list for method output_type + 24, // [24:33] is the sub-list for method input_type + 24, // [24:24] is the sub-list for extension type_name + 24, // [24:24] is the sub-list for extension extendee + 0, // [0:24] is the sub-list for field type_name } func init() { file_google_cloud_aiplatform_v1beta1_prediction_service_proto_init() } @@ -1246,7 +1753,7 @@ func file_google_cloud_aiplatform_v1beta1_prediction_service_proto_init() { } } file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamingPredictRequest); i { + switch v := v.(*DirectPredictRequest); i { case 0: return &v.state case 1: @@ -1258,7 +1765,7 @@ func file_google_cloud_aiplatform_v1beta1_prediction_service_proto_init() { } } file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamingPredictResponse); i { + switch v := v.(*DirectPredictResponse); i { case 0: return &v.state case 1: @@ -1270,7 +1777,7 @@ func file_google_cloud_aiplatform_v1beta1_prediction_service_proto_init() { } } file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExplainRequest); i { + switch v := v.(*DirectRawPredictRequest); i { case 0: return &v.state case 1: @@ -1282,7 +1789,7 @@ func file_google_cloud_aiplatform_v1beta1_prediction_service_proto_init() { } } file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExplainResponse); i { + switch v := v.(*DirectRawPredictResponse); i { case 0: return &v.state case 1: @@ -1294,7 +1801,7 @@ func file_google_cloud_aiplatform_v1beta1_prediction_service_proto_init() { } } file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CountTokensRequest); i { + switch v := v.(*StreamingPredictRequest); i { case 0: return &v.state case 1: @@ -1306,7 +1813,19 @@ func file_google_cloud_aiplatform_v1beta1_prediction_service_proto_init() { } } file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CountTokensResponse); i { + switch v := v.(*StreamingPredictResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamingRawPredictRequest); i { case 0: return &v.state case 1: @@ -1318,6 +1837,66 @@ func file_google_cloud_aiplatform_v1beta1_prediction_service_proto_init() { } } file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamingRawPredictResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExplainRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExplainResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CountTokensRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CountTokensResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExplainResponse_ConcurrentExplanation); i { case 0: return &v.state @@ -1336,7 +1915,7 @@ func file_google_cloud_aiplatform_v1beta1_prediction_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_google_cloud_aiplatform_v1beta1_prediction_service_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 18, NumExtensions: 0, NumServices: 1, }, @@ -1376,9 +1955,19 @@ type PredictionServiceClient interface { // [DeployedModel][google.cloud.aiplatform.v1beta1.DeployedModel] that served // this prediction. RawPredict(ctx context.Context, in *RawPredictRequest, opts ...grpc.CallOption) (*httpbody.HttpBody, error) + // Perform an unary online prediction request for Vertex first-party products + // and frameworks. + DirectPredict(ctx context.Context, in *DirectPredictRequest, opts ...grpc.CallOption) (*DirectPredictResponse, error) + // Perform an online prediction request through gRPC. + DirectRawPredict(ctx context.Context, in *DirectRawPredictRequest, opts ...grpc.CallOption) (*DirectRawPredictResponse, error) + // Perform a streaming online prediction request for Vertex first-party + // products and frameworks. + StreamingPredict(ctx context.Context, opts ...grpc.CallOption) (PredictionService_StreamingPredictClient, error) // Perform a server-side streaming online prediction request for Vertex // LLM streaming. ServerStreamingPredict(ctx context.Context, in *StreamingPredictRequest, opts ...grpc.CallOption) (PredictionService_ServerStreamingPredictClient, error) + // Perform a streaming online prediction request through gRPC. + StreamingRawPredict(ctx context.Context, opts ...grpc.CallOption) (PredictionService_StreamingRawPredictClient, error) // Perform an online explanation. // // If @@ -1421,8 +2010,57 @@ func (c *predictionServiceClient) RawPredict(ctx context.Context, in *RawPredict return out, nil } +func (c *predictionServiceClient) DirectPredict(ctx context.Context, in *DirectPredictRequest, opts ...grpc.CallOption) (*DirectPredictResponse, error) { + out := new(DirectPredictResponse) + err := c.cc.Invoke(ctx, "/google.cloud.aiplatform.v1beta1.PredictionService/DirectPredict", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *predictionServiceClient) DirectRawPredict(ctx context.Context, in *DirectRawPredictRequest, opts ...grpc.CallOption) (*DirectRawPredictResponse, error) { + out := new(DirectRawPredictResponse) + err := c.cc.Invoke(ctx, "/google.cloud.aiplatform.v1beta1.PredictionService/DirectRawPredict", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *predictionServiceClient) StreamingPredict(ctx context.Context, opts ...grpc.CallOption) (PredictionService_StreamingPredictClient, error) { + stream, err := c.cc.NewStream(ctx, &_PredictionService_serviceDesc.Streams[0], "/google.cloud.aiplatform.v1beta1.PredictionService/StreamingPredict", opts...) + if err != nil { + return nil, err + } + x := &predictionServiceStreamingPredictClient{stream} + return x, nil +} + +type PredictionService_StreamingPredictClient interface { + Send(*StreamingPredictRequest) error + Recv() (*StreamingPredictResponse, error) + grpc.ClientStream +} + +type predictionServiceStreamingPredictClient struct { + grpc.ClientStream +} + +func (x *predictionServiceStreamingPredictClient) Send(m *StreamingPredictRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *predictionServiceStreamingPredictClient) Recv() (*StreamingPredictResponse, error) { + m := new(StreamingPredictResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + func (c *predictionServiceClient) ServerStreamingPredict(ctx context.Context, in *StreamingPredictRequest, opts ...grpc.CallOption) (PredictionService_ServerStreamingPredictClient, error) { - stream, err := c.cc.NewStream(ctx, &_PredictionService_serviceDesc.Streams[0], "/google.cloud.aiplatform.v1beta1.PredictionService/ServerStreamingPredict", opts...) + stream, err := c.cc.NewStream(ctx, &_PredictionService_serviceDesc.Streams[1], "/google.cloud.aiplatform.v1beta1.PredictionService/ServerStreamingPredict", opts...) if err != nil { return nil, err } @@ -1453,6 +2091,37 @@ func (x *predictionServiceServerStreamingPredictClient) Recv() (*StreamingPredic return m, nil } +func (c *predictionServiceClient) StreamingRawPredict(ctx context.Context, opts ...grpc.CallOption) (PredictionService_StreamingRawPredictClient, error) { + stream, err := c.cc.NewStream(ctx, &_PredictionService_serviceDesc.Streams[2], "/google.cloud.aiplatform.v1beta1.PredictionService/StreamingRawPredict", opts...) + if err != nil { + return nil, err + } + x := &predictionServiceStreamingRawPredictClient{stream} + return x, nil +} + +type PredictionService_StreamingRawPredictClient interface { + Send(*StreamingRawPredictRequest) error + Recv() (*StreamingRawPredictResponse, error) + grpc.ClientStream +} + +type predictionServiceStreamingRawPredictClient struct { + grpc.ClientStream +} + +func (x *predictionServiceStreamingRawPredictClient) Send(m *StreamingRawPredictRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *predictionServiceStreamingRawPredictClient) Recv() (*StreamingRawPredictResponse, error) { + m := new(StreamingRawPredictResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + func (c *predictionServiceClient) Explain(ctx context.Context, in *ExplainRequest, opts ...grpc.CallOption) (*ExplainResponse, error) { out := new(ExplainResponse) err := c.cc.Invoke(ctx, "/google.cloud.aiplatform.v1beta1.PredictionService/Explain", in, out, opts...) @@ -1487,9 +2156,19 @@ type PredictionServiceServer interface { // [DeployedModel][google.cloud.aiplatform.v1beta1.DeployedModel] that served // this prediction. RawPredict(context.Context, *RawPredictRequest) (*httpbody.HttpBody, error) + // Perform an unary online prediction request for Vertex first-party products + // and frameworks. + DirectPredict(context.Context, *DirectPredictRequest) (*DirectPredictResponse, error) + // Perform an online prediction request through gRPC. + DirectRawPredict(context.Context, *DirectRawPredictRequest) (*DirectRawPredictResponse, error) + // Perform a streaming online prediction request for Vertex first-party + // products and frameworks. + StreamingPredict(PredictionService_StreamingPredictServer) error // Perform a server-side streaming online prediction request for Vertex // LLM streaming. ServerStreamingPredict(*StreamingPredictRequest, PredictionService_ServerStreamingPredictServer) error + // Perform a streaming online prediction request through gRPC. + StreamingRawPredict(PredictionService_StreamingRawPredictServer) error // Perform an online explanation. // // If @@ -1516,9 +2195,21 @@ func (*UnimplementedPredictionServiceServer) Predict(context.Context, *PredictRe func (*UnimplementedPredictionServiceServer) RawPredict(context.Context, *RawPredictRequest) (*httpbody.HttpBody, error) { return nil, status.Errorf(codes.Unimplemented, "method RawPredict not implemented") } +func (*UnimplementedPredictionServiceServer) DirectPredict(context.Context, *DirectPredictRequest) (*DirectPredictResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DirectPredict not implemented") +} +func (*UnimplementedPredictionServiceServer) DirectRawPredict(context.Context, *DirectRawPredictRequest) (*DirectRawPredictResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DirectRawPredict not implemented") +} +func (*UnimplementedPredictionServiceServer) StreamingPredict(PredictionService_StreamingPredictServer) error { + return status.Errorf(codes.Unimplemented, "method StreamingPredict not implemented") +} func (*UnimplementedPredictionServiceServer) ServerStreamingPredict(*StreamingPredictRequest, PredictionService_ServerStreamingPredictServer) error { return status.Errorf(codes.Unimplemented, "method ServerStreamingPredict not implemented") } +func (*UnimplementedPredictionServiceServer) StreamingRawPredict(PredictionService_StreamingRawPredictServer) error { + return status.Errorf(codes.Unimplemented, "method StreamingRawPredict not implemented") +} func (*UnimplementedPredictionServiceServer) Explain(context.Context, *ExplainRequest) (*ExplainResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Explain not implemented") } @@ -1566,6 +2257,68 @@ func _PredictionService_RawPredict_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _PredictionService_DirectPredict_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DirectPredictRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PredictionServiceServer).DirectPredict(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.aiplatform.v1beta1.PredictionService/DirectPredict", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PredictionServiceServer).DirectPredict(ctx, req.(*DirectPredictRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PredictionService_DirectRawPredict_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DirectRawPredictRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PredictionServiceServer).DirectRawPredict(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.aiplatform.v1beta1.PredictionService/DirectRawPredict", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PredictionServiceServer).DirectRawPredict(ctx, req.(*DirectRawPredictRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PredictionService_StreamingPredict_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(PredictionServiceServer).StreamingPredict(&predictionServiceStreamingPredictServer{stream}) +} + +type PredictionService_StreamingPredictServer interface { + Send(*StreamingPredictResponse) error + Recv() (*StreamingPredictRequest, error) + grpc.ServerStream +} + +type predictionServiceStreamingPredictServer struct { + grpc.ServerStream +} + +func (x *predictionServiceStreamingPredictServer) Send(m *StreamingPredictResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *predictionServiceStreamingPredictServer) Recv() (*StreamingPredictRequest, error) { + m := new(StreamingPredictRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + func _PredictionService_ServerStreamingPredict_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(StreamingPredictRequest) if err := stream.RecvMsg(m); err != nil { @@ -1587,6 +2340,32 @@ func (x *predictionServiceServerStreamingPredictServer) Send(m *StreamingPredict return x.ServerStream.SendMsg(m) } +func _PredictionService_StreamingRawPredict_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(PredictionServiceServer).StreamingRawPredict(&predictionServiceStreamingRawPredictServer{stream}) +} + +type PredictionService_StreamingRawPredictServer interface { + Send(*StreamingRawPredictResponse) error + Recv() (*StreamingRawPredictRequest, error) + grpc.ServerStream +} + +type predictionServiceStreamingRawPredictServer struct { + grpc.ServerStream +} + +func (x *predictionServiceStreamingRawPredictServer) Send(m *StreamingRawPredictResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *predictionServiceStreamingRawPredictServer) Recv() (*StreamingRawPredictRequest, error) { + m := new(StreamingRawPredictRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + func _PredictionService_Explain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ExplainRequest) if err := dec(in); err != nil { @@ -1635,6 +2414,14 @@ var _PredictionService_serviceDesc = grpc.ServiceDesc{ MethodName: "RawPredict", Handler: _PredictionService_RawPredict_Handler, }, + { + MethodName: "DirectPredict", + Handler: _PredictionService_DirectPredict_Handler, + }, + { + MethodName: "DirectRawPredict", + Handler: _PredictionService_DirectRawPredict_Handler, + }, { MethodName: "Explain", Handler: _PredictionService_Explain_Handler, @@ -1645,11 +2432,23 @@ var _PredictionService_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{ + { + StreamName: "StreamingPredict", + Handler: _PredictionService_StreamingPredict_Handler, + ServerStreams: true, + ClientStreams: true, + }, { StreamName: "ServerStreamingPredict", Handler: _PredictionService_ServerStreamingPredict_Handler, ServerStreams: true, }, + { + StreamName: "StreamingRawPredict", + Handler: _PredictionService_StreamingRawPredict_Handler, + ServerStreams: true, + ClientStreams: true, + }, }, Metadata: "google/cloud/aiplatform/v1beta1/prediction_service.proto", } diff --git a/aiplatform/apiv1beta1/gapic_metadata.json b/aiplatform/apiv1beta1/gapic_metadata.json index 94282e08cf6b..290542048295 100644 --- a/aiplatform/apiv1beta1/gapic_metadata.json +++ b/aiplatform/apiv1beta1/gapic_metadata.json @@ -4221,6 +4221,16 @@ "DeleteOperation" ] }, + "DirectPredict": { + "methods": [ + "DirectPredict" + ] + }, + "DirectRawPredict": { + "methods": [ + "DirectRawPredict" + ] + }, "Explain": { "methods": [ "Explain" @@ -4271,6 +4281,16 @@ "SetIamPolicy" ] }, + "StreamingPredict": { + "methods": [ + "StreamingPredict" + ] + }, + "StreamingRawPredict": { + "methods": [ + "StreamingRawPredict" + ] + }, "TestIamPermissions": { "methods": [ "TestIamPermissions" @@ -4301,6 +4321,16 @@ "DeleteOperation" ] }, + "DirectPredict": { + "methods": [ + "DirectPredict" + ] + }, + "DirectRawPredict": { + "methods": [ + "DirectRawPredict" + ] + }, "Explain": { "methods": [ "Explain" @@ -4351,6 +4381,16 @@ "SetIamPolicy" ] }, + "StreamingPredict": { + "methods": [ + "StreamingPredict" + ] + }, + "StreamingRawPredict": { + "methods": [ + "StreamingRawPredict" + ] + }, "TestIamPermissions": { "methods": [ "TestIamPermissions" diff --git a/aiplatform/apiv1beta1/prediction_client.go b/aiplatform/apiv1beta1/prediction_client.go index 0d86c910af43..ca886a34d4b8 100755 --- a/aiplatform/apiv1beta1/prediction_client.go +++ b/aiplatform/apiv1beta1/prediction_client.go @@ -50,7 +50,11 @@ var newPredictionClientHook clientHook type PredictionCallOptions struct { Predict []gax.CallOption RawPredict []gax.CallOption + DirectPredict []gax.CallOption + DirectRawPredict []gax.CallOption + StreamingPredict []gax.CallOption ServerStreamingPredict []gax.CallOption + StreamingRawPredict []gax.CallOption Explain []gax.CallOption CountTokens []gax.CallOption GetLocation []gax.CallOption @@ -83,7 +87,11 @@ func defaultPredictionCallOptions() *PredictionCallOptions { gax.WithTimeout(5000 * time.Millisecond), }, RawPredict: []gax.CallOption{}, + DirectPredict: []gax.CallOption{}, + DirectRawPredict: []gax.CallOption{}, + StreamingPredict: []gax.CallOption{}, ServerStreamingPredict: []gax.CallOption{}, + StreamingRawPredict: []gax.CallOption{}, Explain: []gax.CallOption{ gax.WithTimeout(5000 * time.Millisecond), }, @@ -107,7 +115,11 @@ func defaultPredictionRESTCallOptions() *PredictionCallOptions { gax.WithTimeout(5000 * time.Millisecond), }, RawPredict: []gax.CallOption{}, + DirectPredict: []gax.CallOption{}, + DirectRawPredict: []gax.CallOption{}, + StreamingPredict: []gax.CallOption{}, ServerStreamingPredict: []gax.CallOption{}, + StreamingRawPredict: []gax.CallOption{}, Explain: []gax.CallOption{ gax.WithTimeout(5000 * time.Millisecond), }, @@ -132,7 +144,11 @@ type internalPredictionClient interface { Connection() *grpc.ClientConn Predict(context.Context, *aiplatformpb.PredictRequest, ...gax.CallOption) (*aiplatformpb.PredictResponse, error) RawPredict(context.Context, *aiplatformpb.RawPredictRequest, ...gax.CallOption) (*httpbodypb.HttpBody, error) + DirectPredict(context.Context, *aiplatformpb.DirectPredictRequest, ...gax.CallOption) (*aiplatformpb.DirectPredictResponse, error) + DirectRawPredict(context.Context, *aiplatformpb.DirectRawPredictRequest, ...gax.CallOption) (*aiplatformpb.DirectRawPredictResponse, error) + StreamingPredict(context.Context, ...gax.CallOption) (aiplatformpb.PredictionService_StreamingPredictClient, error) ServerStreamingPredict(context.Context, *aiplatformpb.StreamingPredictRequest, ...gax.CallOption) (aiplatformpb.PredictionService_ServerStreamingPredictClient, error) + StreamingRawPredict(context.Context, ...gax.CallOption) (aiplatformpb.PredictionService_StreamingRawPredictClient, error) Explain(context.Context, *aiplatformpb.ExplainRequest, ...gax.CallOption) (*aiplatformpb.ExplainResponse, error) CountTokens(context.Context, *aiplatformpb.CountTokensRequest, ...gax.CallOption) (*aiplatformpb.CountTokensResponse, error) GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) @@ -202,12 +218,38 @@ func (c *PredictionClient) RawPredict(ctx context.Context, req *aiplatformpb.Raw return c.internalClient.RawPredict(ctx, req, opts...) } +// DirectPredict perform an unary online prediction request for Vertex first-party products +// and frameworks. +func (c *PredictionClient) DirectPredict(ctx context.Context, req *aiplatformpb.DirectPredictRequest, opts ...gax.CallOption) (*aiplatformpb.DirectPredictResponse, error) { + return c.internalClient.DirectPredict(ctx, req, opts...) +} + +// DirectRawPredict perform an online prediction request through gRPC. +func (c *PredictionClient) DirectRawPredict(ctx context.Context, req *aiplatformpb.DirectRawPredictRequest, opts ...gax.CallOption) (*aiplatformpb.DirectRawPredictResponse, error) { + return c.internalClient.DirectRawPredict(ctx, req, opts...) +} + +// StreamingPredict perform a streaming online prediction request for Vertex first-party +// products and frameworks. +// +// This method is not supported for the REST transport. +func (c *PredictionClient) StreamingPredict(ctx context.Context, opts ...gax.CallOption) (aiplatformpb.PredictionService_StreamingPredictClient, error) { + return c.internalClient.StreamingPredict(ctx, opts...) +} + // ServerStreamingPredict perform a server-side streaming online prediction request for Vertex // LLM streaming. func (c *PredictionClient) ServerStreamingPredict(ctx context.Context, req *aiplatformpb.StreamingPredictRequest, opts ...gax.CallOption) (aiplatformpb.PredictionService_ServerStreamingPredictClient, error) { return c.internalClient.ServerStreamingPredict(ctx, req, opts...) } +// StreamingRawPredict perform a streaming online prediction request through gRPC. +// +// This method is not supported for the REST transport. +func (c *PredictionClient) StreamingRawPredict(ctx context.Context, opts ...gax.CallOption) (aiplatformpb.PredictionService_StreamingRawPredictClient, error) { + return c.internalClient.StreamingRawPredict(ctx, opts...) +} + // Explain perform an online explanation. // // If @@ -474,6 +516,57 @@ func (c *predictionGRPCClient) RawPredict(ctx context.Context, req *aiplatformpb return resp, nil } +func (c *predictionGRPCClient) DirectPredict(ctx context.Context, req *aiplatformpb.DirectPredictRequest, opts ...gax.CallOption) (*aiplatformpb.DirectPredictResponse, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "endpoint", url.QueryEscape(req.GetEndpoint()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).DirectPredict[0:len((*c.CallOptions).DirectPredict):len((*c.CallOptions).DirectPredict)], opts...) + var resp *aiplatformpb.DirectPredictResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.predictionClient.DirectPredict(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *predictionGRPCClient) DirectRawPredict(ctx context.Context, req *aiplatformpb.DirectRawPredictRequest, opts ...gax.CallOption) (*aiplatformpb.DirectRawPredictResponse, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "endpoint", url.QueryEscape(req.GetEndpoint()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).DirectRawPredict[0:len((*c.CallOptions).DirectRawPredict):len((*c.CallOptions).DirectRawPredict)], opts...) + var resp *aiplatformpb.DirectRawPredictResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.predictionClient.DirectRawPredict(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *predictionGRPCClient) StreamingPredict(ctx context.Context, opts ...gax.CallOption) (aiplatformpb.PredictionService_StreamingPredictClient, error) { + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...) + var resp aiplatformpb.PredictionService_StreamingPredictClient + opts = append((*c.CallOptions).StreamingPredict[0:len((*c.CallOptions).StreamingPredict):len((*c.CallOptions).StreamingPredict)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.predictionClient.StreamingPredict(ctx, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + func (c *predictionGRPCClient) ServerStreamingPredict(ctx context.Context, req *aiplatformpb.StreamingPredictRequest, opts ...gax.CallOption) (aiplatformpb.PredictionService_ServerStreamingPredictClient, error) { hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "endpoint", url.QueryEscape(req.GetEndpoint()))} @@ -492,6 +585,21 @@ func (c *predictionGRPCClient) ServerStreamingPredict(ctx context.Context, req * return resp, nil } +func (c *predictionGRPCClient) StreamingRawPredict(ctx context.Context, opts ...gax.CallOption) (aiplatformpb.PredictionService_StreamingRawPredictClient, error) { + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...) + var resp aiplatformpb.PredictionService_StreamingRawPredictClient + opts = append((*c.CallOptions).StreamingRawPredict[0:len((*c.CallOptions).StreamingRawPredict):len((*c.CallOptions).StreamingRawPredict)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.predictionClient.StreamingRawPredict(ctx, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + func (c *predictionGRPCClient) Explain(ctx context.Context, req *aiplatformpb.ExplainRequest, opts ...gax.CallOption) (*aiplatformpb.ExplainResponse, error) { hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "endpoint", url.QueryEscape(req.GetEndpoint()))} @@ -888,6 +996,137 @@ func (c *predictionRESTClient) RawPredict(ctx context.Context, req *aiplatformpb return resp, nil } +// DirectPredict perform an unary online prediction request for Vertex first-party products +// and frameworks. +func (c *predictionRESTClient) DirectPredict(ctx context.Context, req *aiplatformpb.DirectPredictRequest, opts ...gax.CallOption) (*aiplatformpb.DirectPredictResponse, 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:directPredict", req.GetEndpoint()) + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "endpoint", url.QueryEscape(req.GetEndpoint()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).DirectPredict[0:len((*c.CallOptions).DirectPredict):len((*c.CallOptions).DirectPredict)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.DirectPredictResponse{} + 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 := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DirectRawPredict perform an online prediction request through gRPC. +func (c *predictionRESTClient) DirectRawPredict(ctx context.Context, req *aiplatformpb.DirectRawPredictRequest, opts ...gax.CallOption) (*aiplatformpb.DirectRawPredictResponse, 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:directRawPredict", req.GetEndpoint()) + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "endpoint", url.QueryEscape(req.GetEndpoint()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).DirectRawPredict[0:len((*c.CallOptions).DirectRawPredict):len((*c.CallOptions).DirectRawPredict)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.DirectRawPredictResponse{} + 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 := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// StreamingPredict perform a streaming online prediction request for Vertex first-party +// products and frameworks. +// +// This method is not supported for the REST transport. +func (c *predictionRESTClient) StreamingPredict(ctx context.Context, opts ...gax.CallOption) (aiplatformpb.PredictionService_StreamingPredictClient, error) { + return nil, fmt.Errorf("StreamingPredict not yet supported for REST clients") +} + // ServerStreamingPredict perform a server-side streaming online prediction request for Vertex // LLM streaming. func (c *predictionRESTClient) ServerStreamingPredict(ctx context.Context, req *aiplatformpb.StreamingPredictRequest, opts ...gax.CallOption) (aiplatformpb.PredictionService_ServerStreamingPredictClient, error) { @@ -990,6 +1229,13 @@ func (c *serverStreamingPredictRESTClient) RecvMsg(m interface{}) error { return fmt.Errorf("this method is not implemented, use Recv") } +// StreamingRawPredict perform a streaming online prediction request through gRPC. +// +// This method is not supported for the REST transport. +func (c *predictionRESTClient) StreamingRawPredict(ctx context.Context, opts ...gax.CallOption) (aiplatformpb.PredictionService_StreamingRawPredictClient, error) { + return nil, fmt.Errorf("StreamingRawPredict not yet supported for REST clients") +} + // Explain perform an online explanation. // // If diff --git a/aiplatform/apiv1beta1/prediction_client_example_test.go b/aiplatform/apiv1beta1/prediction_client_example_test.go index 9396c3444ccd..0b70fb1796a8 100644 --- a/aiplatform/apiv1beta1/prediction_client_example_test.go +++ b/aiplatform/apiv1beta1/prediction_client_example_test.go @@ -18,6 +18,7 @@ package aiplatform_test import ( "context" + "io" aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" aiplatformpb "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb" @@ -86,6 +87,56 @@ func ExamplePredictionClient_CountTokens() { _ = resp } +func ExamplePredictionClient_DirectPredict() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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. + } + defer c.Close() + + req := &aiplatformpb.DirectPredictRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#DirectPredictRequest. + } + resp, err := c.DirectPredict(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExamplePredictionClient_DirectRawPredict() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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. + } + defer c.Close() + + req := &aiplatformpb.DirectRawPredictRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#DirectRawPredictRequest. + } + resp, err := c.DirectRawPredict(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + func ExamplePredictionClient_Explain() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. @@ -161,6 +212,86 @@ func ExamplePredictionClient_RawPredict() { _ = resp } +func ExamplePredictionClient_StreamingPredict() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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. + } + defer c.Close() + stream, err := c.StreamingPredict(ctx) + if err != nil { + // TODO: Handle error. + } + go func() { + reqs := []*aiplatformpb.StreamingPredictRequest{ + // 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 ExamplePredictionClient_StreamingRawPredict() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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. + } + defer c.Close() + stream, err := c.StreamingRawPredict(ctx) + if err != nil { + // TODO: Handle error. + } + go func() { + reqs := []*aiplatformpb.StreamingRawPredictRequest{ + // 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 ExamplePredictionClient_GetLocation() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. diff --git a/bigtable/CHANGES.md b/bigtable/CHANGES.md index 93615b5cc4fd..b28a8e45b0a0 100644 --- a/bigtable/CHANGES.md +++ b/bigtable/CHANGES.md @@ -1,5 +1,22 @@ # Changes +## [1.21.0](https://github.com/googleapis/google-cloud-go/compare/bigtable/v1.20.0...bigtable/v1.21.0) (2023-12-04) + + +### Features + +* **bigtable:** Add support for reverse scans ([#8755](https://github.com/googleapis/google-cloud-go/issues/8755)) ([244d135](https://github.com/googleapis/google-cloud-go/commit/244d1357cb1b6ce3b971d367693f6cb6090018d4)) +* **bigtable:** Support copy backup in admin client ([#9005](https://github.com/googleapis/google-cloud-go/issues/9005)) ([834c47f](https://github.com/googleapis/google-cloud-go/commit/834c47fb3bd9e8a21082325780b2dcfd4c6d52c6)) + + +### Bug Fixes + +* **bigtable:** Bump google.golang.org/api to v0.149.0 ([8d2ab9f](https://github.com/googleapis/google-cloud-go/commit/8d2ab9f320a86c1c0fab90513fc05861561d0880)) +* **bigtable:** Return cluster error for Update when populated ([#8657](https://github.com/googleapis/google-cloud-go/issues/8657)) ([2105434](https://github.com/googleapis/google-cloud-go/commit/2105434f27a16ac05790c40b74d3a251ec584527)) +* **bigtable:** Update golang.org/x/net to v0.17.0 ([174da47](https://github.com/googleapis/google-cloud-go/commit/174da47254fefb12921bbfc65b7829a453af6f5d)) +* **bigtable:** Update grpc-go to v1.56.3 ([343cea8](https://github.com/googleapis/google-cloud-go/commit/343cea8c43b1e31ae21ad50ad31d3b0b60143f8c)) +* **bigtable:** Update grpc-go to v1.59.0 ([81a97b0](https://github.com/googleapis/google-cloud-go/commit/81a97b06cb28b25432e4ece595c55a9857e960b7)) + ## [1.20.0](https://github.com/googleapis/google-cloud-go/compare/bigtable/v1.19.0...bigtable/v1.20.0) (2023-10-02) diff --git a/bigtable/admin.go b/bigtable/admin.go index d606110465bb..b988b7075090 100644 --- a/bigtable/admin.go +++ b/bigtable/admin.go @@ -113,7 +113,11 @@ func (ac *AdminClient) Close() error { } func (ac *AdminClient) instancePrefix() string { - return fmt.Sprintf("projects/%s/instances/%s", ac.project, ac.instance) + return instancePrefix(ac.project, ac.instance) +} + +func instancePrefix(project, instance string) string { + return fmt.Sprintf("projects/%s/instances/%s", project, instance) } func (ac *AdminClient) backupPath(cluster, instance, backup string) string { @@ -1920,6 +1924,27 @@ func (ac *AdminClient) CreateBackup(ctx context.Context, table, cluster, backup return longrunning.InternalNewOperation(ac.lroClient, op).Wait(ctx, &resp) } +// CopyBackup copies the specified source backup with the user-provided expire time. +func (ac *AdminClient) CopyBackup(ctx context.Context, sourceCluster, sourceBackup, + destProject, destInstance, destCluster, destBackup string, expireTime time.Time) error { + ctx = mergeOutgoingMetadata(ctx, ac.md) + sourceBackupPath := ac.backupPath(sourceCluster, ac.instance, sourceBackup) + destPrefix := instancePrefix(destProject, destInstance) + req := &btapb.CopyBackupRequest{ + Parent: destPrefix + "/clusters/" + destCluster, + BackupId: destBackup, + SourceBackup: sourceBackupPath, + ExpireTime: timestamppb.New(expireTime), + } + + op, err := ac.tClient.CopyBackup(ctx, req) + if err != nil { + return err + } + resp := btapb.Backup{} + return longrunning.InternalNewOperation(ac.lroClient, op).Wait(ctx, &resp) +} + // Backups returns a BackupIterator for iterating over the backups in a cluster. // To list backups across all of the clusters in the instance specify "-" as the cluster. func (ac *AdminClient) Backups(ctx context.Context, cluster string) *BackupIterator { @@ -1991,6 +2016,7 @@ func newBackupInfo(backup *btapb.Backup) (*BackupInfo, error) { bi := BackupInfo{ Name: name, SourceTable: tableID, + SourceBackup: backup.SourceBackup, SizeBytes: backup.SizeBytes, StartTime: startTime, EndTime: endTime, @@ -2030,6 +2056,7 @@ func (it *BackupIterator) Next() (*BackupInfo, error) { type BackupInfo struct { Name string SourceTable string + SourceBackup string SizeBytes int64 StartTime time.Time EndTime time.Time diff --git a/bigtable/admin_test.go b/bigtable/admin_test.go index bd3225f2aff6..95f864029514 100644 --- a/bigtable/admin_test.go +++ b/bigtable/admin_test.go @@ -21,11 +21,14 @@ import ( "testing" "time" + "cloud.google.com/go/internal/pretty" + "cloud.google.com/go/internal/testutil" longrunning "cloud.google.com/go/longrunning/autogen/longrunningpb" "github.com/google/go-cmp/cmp" btapb "google.golang.org/genproto/googleapis/bigtable/admin/v2" "google.golang.org/grpc" "google.golang.org/protobuf/types/known/anypb" + "google.golang.org/protobuf/types/known/timestamppb" ) type mockTableAdminClock struct { @@ -35,6 +38,9 @@ type mockTableAdminClock struct { updateTableReq *btapb.UpdateTableRequest createTableResp *btapb.Table updateTableError error + + copyBackupReq *btapb.CopyBackupRequest + copyBackupError error } func (c *mockTableAdminClock) CreateTable( @@ -56,6 +62,14 @@ func (c *mockTableAdminClock) UpdateTable( }, c.updateTableError } +func (c *mockTableAdminClock) CopyBackup( + ctx context.Context, in *btapb.CopyBackupRequest, opts ...grpc.CallOption, +) (*longrunning.Operation, error) { + c.copyBackupReq = in + c.copyBackupError = fmt.Errorf("Mock error from client API") + return nil, c.copyBackupError +} + func setupTableClient(t *testing.T, ac btapb.BigtableTableAdminClient) *AdminClient { ctx := context.Background() c, err := NewAdminClient(ctx, "my-cool-project", "my-cool-instance") @@ -123,6 +137,28 @@ func TestTableAdmin_CreateTableFromConf_ChangeStream_Valid(t *testing.T) { } } +func TestTableAdmin_CopyBackup_ErrorFromClient(t *testing.T) { + mock := &mockTableAdminClock{} + c := setupTableClient(t, mock) + + currTime := time.Now() + err := c.CopyBackup(context.Background(), "source-cluster", "source-backup", "dest-project", "dest-instance", "dest-cluster", "dest-backup", currTime) + if err == nil { + t.Errorf("CopyBackup got: nil, want: non-nil error") + } + + got := mock.copyBackupReq + want := &btapb.CopyBackupRequest{ + Parent: "projects/dest-project/instances/dest-instance/clusters/dest-cluster", + BackupId: "dest-backup", + SourceBackup: "projects/my-cool-project/instances/my-cool-instance/clusters/source-cluster/backups/source-backup", + ExpireTime: timestamppb.New(currTime), + } + if diff := testutil.Diff(got, want, cmp.AllowUnexported(btapb.CopyBackupRequest{})); diff != "" { + t.Errorf("CopyBackupRequest \ngot:\n%v,\nwant:\n%v,\ndiff:\n%v", pretty.Value(got), pretty.Value(want), diff) + } +} + func TestTableAdmin_CreateTableFromConf_ChangeStream_Disable(t *testing.T) { mock := &mockTableAdminClock{} c := setupTableClient(t, mock) diff --git a/bigtable/export_test.go b/bigtable/export_test.go index 254003e2d902..99a45734ba01 100644 --- a/bigtable/export_test.go +++ b/bigtable/export_test.go @@ -54,6 +54,7 @@ func init() { flag.StringVar(&c.AdminEndpoint, "it.admin-endpoint", "", "Admin api host and port") flag.StringVar(&c.DataEndpoint, "it.data-endpoint", "", "Data api host and port") flag.StringVar(&c.Project, "it.project", "", "Project to use for integration test") + flag.StringVar(&c.Project2, "it.project2", "", "Optional secondary project to use for copy backup integration test") flag.StringVar(&c.Instance, "it.instance", "", "Bigtable instance to use") flag.StringVar(&c.Cluster, "it.cluster", "", "Bigtable cluster to use") flag.StringVar(&c.Table, "it.table", "", "Bigtable table to create") @@ -83,6 +84,7 @@ type IntegrationTestConfig struct { AdminEndpoint string DataEndpoint string Project string + Project2 string Instance string Cluster string Table string @@ -94,6 +96,7 @@ type IntegrationTestConfig struct { // The environment can be implemented using production or an emulator type IntegrationEnv interface { Config() IntegrationTestConfig + AdminClientOptions() (context.Context, []option.ClientOption, error) // Client options to be used in creating client NewAdminClient() (*AdminClient, error) // NewInstanceAdminClient will return nil if instance administration is unsupported in this environment NewInstanceAdminClient() (*InstanceAdminClient, error) @@ -110,6 +113,9 @@ func NewIntegrationEnv() (IntegrationEnv, error) { if c.Project == "" { c.Project = os.Getenv("GCLOUD_TESTS_GOLANG_PROJECT_ID") } + if c.Project2 == "" { + c.Project2 = os.Getenv("GCLOUD_TESTS_GOLANG_SECONDARY_BIGTABLE_PROJECT_ID") + } if c.Instance == "" { c.Instance = os.Getenv("GCLOUD_TESTS_BIGTABLE_INSTANCE") } @@ -188,11 +194,10 @@ func (e *EmulatedEnv) Config() IntegrationTestConfig { var headersInterceptor = testutil.DefaultHeadersEnforcer() -// NewAdminClient builds a new connected admin client for this environment -func (e *EmulatedEnv) NewAdminClient() (*AdminClient, error) { +func (e *EmulatedEnv) AdminClientOptions() (context.Context, []option.ClientOption, error) { o, err := btopt.DefaultClientOptions(e.server.Addr, e.server.Addr, AdminScope, clientUserAgent) if err != nil { - return nil, err + return nil, nil, err } // Add gRPC client interceptors to supply Google client information. // @@ -208,11 +213,18 @@ func (e *EmulatedEnv) NewAdminClient() (*AdminClient, error) { o = append(o, option.WithGRPCDialOption(grpc.WithBlock())) conn, err := gtransport.DialInsecure(ctx, o...) if err != nil { - return nil, err + return nil, nil, err } + return ctx, []option.ClientOption{option.WithGRPCConn(conn)}, nil +} - return NewAdminClient(ctx, e.config.Project, e.config.Instance, - option.WithGRPCConn(conn)) +// NewAdminClient builds a new connected admin client for this environment +func (e *EmulatedEnv) NewAdminClient() (*AdminClient, error) { + ctx, options, err := e.AdminClientOptions() + if err != nil { + return nil, err + } + return NewAdminClient(ctx, e.config.Project, e.config.Instance, options...) } // NewInstanceAdminClient returns nil for the emulated environment since the API is not implemented. @@ -287,22 +299,30 @@ func (e *ProdEnv) Config() IntegrationTestConfig { return e.config } -// NewAdminClient builds a new connected admin client for this environment -func (e *ProdEnv) NewAdminClient() (*AdminClient, error) { +func (e *ProdEnv) AdminClientOptions() (context.Context, []option.ClientOption, error) { clientOpts := headersInterceptor.CallOptions() if endpoint := e.config.AdminEndpoint; endpoint != "" { clientOpts = append(clientOpts, option.WithEndpoint(endpoint)) } - return NewAdminClient(context.Background(), e.config.Project, e.config.Instance, clientOpts...) + return context.Background(), clientOpts, nil +} + +// NewAdminClient builds a new connected admin client for this environment +func (e *ProdEnv) NewAdminClient() (*AdminClient, error) { + ctx, options, err := e.AdminClientOptions() + if err != nil { + return nil, err + } + return NewAdminClient(ctx, e.config.Project, e.config.Instance, options...) } // NewInstanceAdminClient returns a new connected instance admin client for this environment func (e *ProdEnv) NewInstanceAdminClient() (*InstanceAdminClient, error) { - clientOpts := headersInterceptor.CallOptions() - if endpoint := e.config.AdminEndpoint; endpoint != "" { - clientOpts = append(clientOpts, option.WithEndpoint(endpoint)) + ctx, options, err := e.AdminClientOptions() + if err != nil { + return nil, err } - return NewInstanceAdminClient(context.Background(), e.config.Project, clientOpts...) + return NewInstanceAdminClient(ctx, e.config.Project, options...) } // NewClient builds a connected data client for this environment diff --git a/bigtable/integration_test.go b/bigtable/integration_test.go index 20d4b2ddff4a..023763445beb 100644 --- a/bigtable/integration_test.go +++ b/bigtable/integration_test.go @@ -3002,6 +3002,196 @@ func TestIntegration_InstanceUpdate(t *testing.T) { } } +func createInstance(ctx context.Context, testEnv IntegrationEnv, iAdminClient *InstanceAdminClient) (string, string, error) { + diffInstanceId := uid.NewSpace(prefixOfInstanceResources, &uid.Options{Short: true}) + diffInstance := diffInstanceId.New() + diffCluster := testEnv.Config().Cluster + "-d" + conf := &InstanceConf{ + InstanceId: diffInstance, + ClusterId: diffCluster, + DisplayName: "different test sourceInstance", + Zone: instanceToCreateZone2, + InstanceType: DEVELOPMENT, + Labels: map[string]string{"test-label-key-diff": "test-label-value-diff"}, + } + if err := iAdminClient.CreateInstance(ctx, conf); err != nil { + return "", "", fmt.Errorf("CreateInstance: %v", err) + } + return diffInstance, diffCluster, nil +} + +func TestIntegration_AdminCopyBackup(t *testing.T) { + testEnv, err := NewIntegrationEnv() + if err != nil { + t.Fatalf("IntegrationEnv: %v", err) + } + defer testEnv.Close() + + if !testEnv.Config().UseProd { + t.Skip("emulator doesn't support backups") + } + + timeout := 15 * time.Minute + ctx, cancel := context.WithTimeout(context.Background(), timeout) + defer cancel() + + // Create source clients + srcAdminClient, err := testEnv.NewAdminClient() + if err != nil { + t.Fatalf("NewAdminClient: %v", err) + } + defer srcAdminClient.Close() + srcIAdminClient, err := testEnv.NewInstanceAdminClient() + if err != nil { + t.Fatalf("NewInstanceAdminClient: %v", err) + } + defer srcIAdminClient.Close() + + // Create table + tblConf := TableConf{ + TableID: testEnv.Config().Table, + Families: map[string]GCPolicy{ + "fam1": MaxVersionsPolicy(1), + "fam2": MaxVersionsPolicy(2), + }, + } + defer deleteTable(ctx, t, srcAdminClient, tblConf.TableID) + if err := srcAdminClient.CreateTableFromConf(ctx, &tblConf); err != nil { + t.Fatalf("Creating table from TableConf: %v", err) + } + + // Create source backup + copyBackupUID := uid.NewSpace(prefixOfInstanceResources, &uid.Options{}) + backupUID := uid.NewSpace(prefixOfInstanceResources, &uid.Options{}) + srcBackupName := backupUID.New() + srcCluster := testEnv.Config().Cluster + defer srcAdminClient.DeleteBackup(ctx, srcCluster, srcBackupName) + if err = srcAdminClient.CreateBackup(ctx, tblConf.TableID, srcCluster, srcBackupName, time.Now().Add(100*time.Hour)); err != nil { + t.Fatalf("Creating backup: %v", err) + } + wantSourceBackup := srcAdminClient.instancePrefix() + "/clusters/" + srcCluster + "/backups/" + srcBackupName + + destProj1 := testEnv.Config().Project + destProj1Inst1 := testEnv.Config().Instance // 1st instance in 1st destination project + destProj1Inst1Cl1 := srcCluster // 1st cluster in 1st instance in 1st destination project + destIAdminClient1 := srcIAdminClient + + // Create a 2nd cluster in 1st destination project + clusterUID := uid.NewSpace("c-", &uid.Options{Short: true}) + destProj1Inst1Cl2 := clusterUID.New() + defer destIAdminClient1.DeleteCluster(ctx, destProj1Inst1, destProj1Inst1Cl2) + err = destIAdminClient1.CreateCluster(ctx, &ClusterConfig{ + InstanceID: destProj1Inst1, + ClusterID: destProj1Inst1Cl2, + Zone: instanceToCreateZone2, + NumNodes: 1, + StorageType: SSD, + }) + if err != nil { + t.Fatalf("CreateCluster: %v", err) + } + + // Create a 2nd instance in 1st destination project + destProj1Inst2, destProj1Inst2Cl1, err := createInstance(ctx, testEnv, destIAdminClient1) + if err != nil { + t.Fatalf("CreateInstance: %v", err) + } + defer destIAdminClient1.DeleteInstance(ctx, destProj1Inst2) + + type testcase struct { + desc string + destProject string + destInstance string + destCluster string + } + testcases := []testcase{ + { + desc: "Copy backup to same project, same instance, same cluster", + destProject: destProj1, + destInstance: destProj1Inst1, + destCluster: destProj1Inst1Cl1, + }, + { + desc: "Copy backup to same project, same instance, different cluster", + destProject: destProj1, + destInstance: destProj1Inst1, + destCluster: destProj1Inst1Cl2, + }, + { + desc: "Copy backup to same project, different instance", + destProject: destProj1, + destInstance: destProj1Inst2, + destCluster: destProj1Inst2Cl1, + }, + } + + if testEnv.Config().Project2 != "" { + // Create admin client for 2nd project in test environment + destProj2 := testEnv.Config().Project2 + ctx, options, err := testEnv.AdminClientOptions() + if err != nil { + t.Fatalf("AdminClientOptions: %v", err) + } + destIAdminClient2, err := NewInstanceAdminClient(ctx, destProj2, options...) + if err != nil { + t.Fatalf("NewInstanceAdminClient: %v", err) + } + defer destIAdminClient2.Close() + + // Create instance in 2nd project + destProj2Inst1, destProj2Inst1Cl1, err := createInstance(ctx, testEnv, destIAdminClient2) + if err != nil { + t.Fatalf("CreateInstance: %v", err) + } + defer destIAdminClient2.DeleteInstance(ctx, destProj2Inst1) + testcases = append(testcases, testcase{ + desc: "Copy backup to different project", + destProject: destProj2, + destInstance: destProj2Inst1, + destCluster: destProj2Inst1Cl1, + }) + } else { + t.Logf("WARNING: Secondary project not set, skipping copy backup to different project testing") + } + + for _, testcase := range testcases { + // Create destination client + destCtx, destOpts, err := testEnv.AdminClientOptions() + if err != nil { + t.Fatalf("%v: AdminClientOptions: %v", testcase.desc, err) + } + + desc := testcase.desc + destProject := testcase.destProject + destInstance := testcase.destInstance + destCluster := testcase.destCluster + + destAdminClient, err := NewAdminClient(destCtx, destProject, destInstance, destOpts...) + if err != nil { + t.Fatalf("%v: NewAdminClient: %v", desc, err) + } + defer destAdminClient.Close() + + // Copy Backup + destBackupName := copyBackupUID.New() + defer destAdminClient.DeleteBackup(destCtx, destCluster, destBackupName) + err = srcAdminClient.CopyBackup(destCtx, srcCluster, srcBackupName, destProject, destInstance, destCluster, + destBackupName, time.Now().Add(24*time.Hour)) + if err != nil { + t.Fatalf("%v: CopyBackup: %v", desc, err) + } + + // Verify source backup field in backup info + gotBackupInfo, err := destAdminClient.BackupInfo(ctx, destCluster, destBackupName) + if err != nil { + t.Fatalf("%v: BackupInfo: %v", desc, err) + } + if gotBackupInfo.SourceBackup != wantSourceBackup { + t.Fatalf("%v: SourceBackup: got: %v, want: %v", desc, gotBackupInfo.SourceBackup, wantSourceBackup) + } + } +} + func TestIntegration_AdminBackup(t *testing.T) { testEnv, err := NewIntegrationEnv() if err != nil { @@ -3044,23 +3234,13 @@ func TestIntegration_AdminBackup(t *testing.T) { t.Fatalf("NewInstanceAdminClient: %v", err) } defer iAdminClient.Close() - prefix := "bt-it" - diffInstanceId := uid.NewSpace(prefix, &uid.Options{Short: true}) - diffInstance := diffInstanceId.New() - diffCluster := sourceCluster + "-d" - conf := &InstanceConf{ - InstanceId: diffInstance, - ClusterId: diffCluster, - DisplayName: "different test sourceInstance", - Zone: instanceToCreateZone2, - InstanceType: DEVELOPMENT, - Labels: map[string]string{"test-label-key": "test-label-value"}, - } - defer iAdminClient.DeleteInstance(ctx, diffInstance) + // Create different instance to restore table. - if err := iAdminClient.CreateInstance(ctx, conf); err != nil { + diffInstance, diffCluster, err := createInstance(ctx, testEnv, iAdminClient) + if err != nil { t.Fatalf("CreateInstance: %v", err) } + defer iAdminClient.DeleteInstance(ctx, diffInstance) list := func(cluster string) ([]*BackupInfo, error) { infos := []*BackupInfo(nil) diff --git a/bigtable/internal/version.go b/bigtable/internal/version.go index 0b0f0e914120..b1672963f6c5 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.20.0" +const Version = "1.21.0" diff --git a/binaryauthorization/CHANGES.md b/binaryauthorization/CHANGES.md index 8b6ebcc6eb87..f931cd1d25f6 100644 --- a/binaryauthorization/CHANGES.md +++ b/binaryauthorization/CHANGES.md @@ -1,6 +1,13 @@ # Changes +## [1.8.0](https://github.com/googleapis/google-cloud-go/compare/binaryauthorization/v1.7.3...binaryauthorization/v1.8.0) (2023-11-29) + + +### Features + +* **binaryauthorization:** Add container_name, container_type fields to Continuous Validation Logs ([#9047](https://github.com/googleapis/google-cloud-go/issues/9047)) ([d0f9ff0](https://github.com/googleapis/google-cloud-go/commit/d0f9ff0515eae660f100fd27e258580af4601374)) + ## [1.7.3](https://github.com/googleapis/google-cloud-go/compare/binaryauthorization/v1.7.2...binaryauthorization/v1.7.3) (2023-11-01) diff --git a/binaryauthorization/internal/version.go b/binaryauthorization/internal/version.go index c7da07ea6b49..0ad9373b3b59 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.7.3" +const Version = "1.8.0" diff --git a/dialogflow/CHANGES.md b/dialogflow/CHANGES.md index a60e94a03ccc..d9fb1b82e114 100644 --- a/dialogflow/CHANGES.md +++ b/dialogflow/CHANGES.md @@ -1,5 +1,12 @@ # Changes +## [1.46.0](https://github.com/googleapis/google-cloud-go/compare/dialogflow/v1.45.0...dialogflow/v1.46.0) (2023-11-29) + + +### Features + +* **dialogflow/cx:** Added Generator API ([#9055](https://github.com/googleapis/google-cloud-go/issues/9055)) ([c844d8e](https://github.com/googleapis/google-cloud-go/commit/c844d8e294c188a2e9ac35dd4df081862da30510)) + ## [1.45.0](https://github.com/googleapis/google-cloud-go/compare/dialogflow/v1.44.3...dialogflow/v1.45.0) (2023-11-27) diff --git a/dialogflow/cx/apiv3/auxiliary.go b/dialogflow/cx/apiv3/auxiliary.go index df97ea19a4ac..b20ee06328e6 100755 --- a/dialogflow/cx/apiv3/auxiliary.go +++ b/dialogflow/cx/apiv3/auxiliary.go @@ -1460,6 +1460,53 @@ func (it *FlowIterator) takeBuf() interface{} { return b } +// GeneratorIterator manages a stream of *cxpb.Generator. +type GeneratorIterator struct { + items []*cxpb.Generator + 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 []*cxpb.Generator, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *GeneratorIterator) 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 *GeneratorIterator) Next() (*cxpb.Generator, error) { + var item *cxpb.Generator + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *GeneratorIterator) bufLen() int { + return len(it.items) +} + +func (it *GeneratorIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + // IntentIterator manages a stream of *cxpb.Intent. type IntentIterator struct { items []*cxpb.Intent diff --git a/dialogflow/cx/apiv3/cxpb/audio_config.pb.go b/dialogflow/cx/apiv3/cxpb/audio_config.pb.go index c029fc1ac97c..dfac18085fe8 100755 --- a/dialogflow/cx/apiv3/cxpb/audio_config.pb.go +++ b/dialogflow/cx/apiv3/cxpb/audio_config.pb.go @@ -544,8 +544,8 @@ type InputAudioConfig struct { 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. + // explicitly specified, then Dialogflow auto-selects a model based on other + // parameters in the InputAudioConfig and Agent settings. // 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. @@ -558,7 +558,12 @@ type InputAudioConfig struct { // // - phone_call (best for Agent Assist and telephony) // - latest_short (best for Dialogflow non-telephony) - // - command_and_search (best for very short utterances and commands) + // - command_and_search + // + // Leave this field unspecified to use + // [Agent Speech + // settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech) + // for model selection. Model string `protobuf:"bytes,7,opt,name=model,proto3" json:"model,omitempty"` // Optional. Which variant of the [Speech // model][google.cloud.dialogflow.cx.v3.InputAudioConfig.model] to use. diff --git a/dialogflow/cx/apiv3/cxpb/generator.pb.go b/dialogflow/cx/apiv3/cxpb/generator.pb.go new file mode 100755 index 000000000000..a745468358e3 --- /dev/null +++ b/dialogflow/cx/apiv3/cxpb/generator.pb.go @@ -0,0 +1,1257 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS 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.31.0 +// protoc v4.23.2 +// source: google/cloud/dialogflow/cx/v3/generator.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) +) + +// Generators contain prompt to be sent to the LLM model to generate text. The +// prompt can contain parameters which will be resolved before calling the +// model. It can optionally contain banned phrases to ensure the model responses +// are safe. +type Generator struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique identifier of the generator. + // Must be set for the + // [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3.Generators.UpdateGenerator] + // method. [Generators.CreateGenerate][] populates the name automatically. + // Format: `projects//locations//agents//generators/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The human-readable name of the generator, unique within the + // agent. The prompt contains pre-defined parameters such as $conversation, + // $last-user-utterance, etc. populated by Dialogflow. It can also contain + // custom placeholders which will be resolved during fulfillment. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Required. Prompt for the LLM model. + PromptText *Phrase `protobuf:"bytes,3,opt,name=prompt_text,json=promptText,proto3" json:"prompt_text,omitempty"` + // Optional. List of custom placeholders in the prompt text. + Placeholders []*Generator_Placeholder `protobuf:"bytes,5,rep,name=placeholders,proto3" json:"placeholders,omitempty"` +} + +func (x *Generator) Reset() { + *x = Generator{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Generator) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Generator) ProtoMessage() {} + +func (x *Generator) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3_generator_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 Generator.ProtoReflect.Descriptor instead. +func (*Generator) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3_generator_proto_rawDescGZIP(), []int{0} +} + +func (x *Generator) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Generator) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Generator) GetPromptText() *Phrase { + if x != nil { + return x.PromptText + } + return nil +} + +func (x *Generator) GetPlaceholders() []*Generator_Placeholder { + if x != nil { + return x.Placeholders + } + return nil +} + +// Text input which can be used for prompt or banned phrases. +type Phrase struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Text input which can be used for prompt or banned phrases. + Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` +} + +func (x *Phrase) Reset() { + *x = Phrase{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Phrase) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Phrase) ProtoMessage() {} + +func (x *Phrase) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3_generator_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 Phrase.ProtoReflect.Descriptor instead. +func (*Phrase) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3_generator_proto_rawDescGZIP(), []int{1} +} + +func (x *Phrase) GetText() string { + if x != nil { + return x.Text + } + return "" +} + +// The request message for +// [Generators.ListGenerators][google.cloud.dialogflow.cx.v3.Generators.ListGenerators]. +type ListGeneratorsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The agent to list all generators for. + // Format: `projects//locations//agents/`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The language to list generators for. + 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 *ListGeneratorsRequest) Reset() { + *x = ListGeneratorsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListGeneratorsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGeneratorsRequest) ProtoMessage() {} + +func (x *ListGeneratorsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3_generator_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 ListGeneratorsRequest.ProtoReflect.Descriptor instead. +func (*ListGeneratorsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3_generator_proto_rawDescGZIP(), []int{2} +} + +func (x *ListGeneratorsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListGeneratorsRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +func (x *ListGeneratorsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListGeneratorsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// The response message for +// [Generators.ListGenerators][google.cloud.dialogflow.cx.v3.Generators.ListGenerators]. +type ListGeneratorsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of generators. There will be a maximum number of items returned + // based on the page_size field in the request. + Generators []*Generator `protobuf:"bytes,1,rep,name=generators,proto3" json:"generators,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 *ListGeneratorsResponse) Reset() { + *x = ListGeneratorsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListGeneratorsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGeneratorsResponse) ProtoMessage() {} + +func (x *ListGeneratorsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3_generator_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 ListGeneratorsResponse.ProtoReflect.Descriptor instead. +func (*ListGeneratorsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3_generator_proto_rawDescGZIP(), []int{3} +} + +func (x *ListGeneratorsResponse) GetGenerators() []*Generator { + if x != nil { + return x.Generators + } + return nil +} + +func (x *ListGeneratorsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// The request message for +// [Generators.GetGenerator][google.cloud.dialogflow.cx.v3.Generators.GetGenerator]. +type GetGeneratorRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the generator. + // Format: `projects//locations//agents//generators/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The language to list generators for. + LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` +} + +func (x *GetGeneratorRequest) Reset() { + *x = GetGeneratorRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGeneratorRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGeneratorRequest) ProtoMessage() {} + +func (x *GetGeneratorRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3_generator_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 GetGeneratorRequest.ProtoReflect.Descriptor instead. +func (*GetGeneratorRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3_generator_proto_rawDescGZIP(), []int{4} +} + +func (x *GetGeneratorRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetGeneratorRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +// The request message for +// [Generators.CreateGenerator][google.cloud.dialogflow.cx.v3.Generators.CreateGenerator]. +type CreateGeneratorRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The agent to create a generator for. + // Format: `projects//locations//agents/`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The generator to create. + Generator *Generator `protobuf:"bytes,2,opt,name=generator,proto3" json:"generator,omitempty"` + // The language to create generators for the following fields: + // * `Generator.prompt_text.text` + // If not specified, the agent's default language is used. + LanguageCode string `protobuf:"bytes,3,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` +} + +func (x *CreateGeneratorRequest) Reset() { + *x = CreateGeneratorRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateGeneratorRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateGeneratorRequest) ProtoMessage() {} + +func (x *CreateGeneratorRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3_generator_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 CreateGeneratorRequest.ProtoReflect.Descriptor instead. +func (*CreateGeneratorRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3_generator_proto_rawDescGZIP(), []int{5} +} + +func (x *CreateGeneratorRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateGeneratorRequest) GetGenerator() *Generator { + if x != nil { + return x.Generator + } + return nil +} + +func (x *CreateGeneratorRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +// The request message for +// [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3.Generators.UpdateGenerator]. +type UpdateGeneratorRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The generator to update. + Generator *Generator `protobuf:"bytes,1,opt,name=generator,proto3" json:"generator,omitempty"` + // The language to list generators for. + 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 *UpdateGeneratorRequest) Reset() { + *x = UpdateGeneratorRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateGeneratorRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateGeneratorRequest) ProtoMessage() {} + +func (x *UpdateGeneratorRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3_generator_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 UpdateGeneratorRequest.ProtoReflect.Descriptor instead. +func (*UpdateGeneratorRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3_generator_proto_rawDescGZIP(), []int{6} +} + +func (x *UpdateGeneratorRequest) GetGenerator() *Generator { + if x != nil { + return x.Generator + } + return nil +} + +func (x *UpdateGeneratorRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +func (x *UpdateGeneratorRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// The request message for +// [Generators.DeleteGenerator][google.cloud.dialogflow.cx.v3.Generators.DeleteGenerator]. +type DeleteGeneratorRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the generator to delete. + // Format: `projects//locations//agents//generators/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // This field has no effect for generators not being used. + // For generators that are used by pages/flows/transition route groups: + // + // * If `force` is set to false, an error will be returned with message + // indicating the referenced resources. + // * If `force` is set to true, Dialogflow will remove the generator, as well + // as any references to the generator (i.e. + // [Generator][Fulfillment.generator]) in fulfillments. + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` +} + +func (x *DeleteGeneratorRequest) Reset() { + *x = DeleteGeneratorRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteGeneratorRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteGeneratorRequest) ProtoMessage() {} + +func (x *DeleteGeneratorRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3_generator_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 DeleteGeneratorRequest.ProtoReflect.Descriptor instead. +func (*DeleteGeneratorRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3_generator_proto_rawDescGZIP(), []int{7} +} + +func (x *DeleteGeneratorRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DeleteGeneratorRequest) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +// Represents a custom placeholder in the prompt text. +type Generator_Placeholder struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Unique ID used to map custom placeholder to parameters in fulfillment. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Custom placeholder value in the prompt text. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *Generator_Placeholder) Reset() { + *x = Generator_Placeholder{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Generator_Placeholder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Generator_Placeholder) ProtoMessage() {} + +func (x *Generator_Placeholder) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3_generator_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 Generator_Placeholder.ProtoReflect.Descriptor instead. +func (*Generator_Placeholder) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3_generator_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Generator_Placeholder) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Generator_Placeholder) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +var File_google_cloud_dialogflow_cx_v3_generator_proto protoreflect.FileDescriptor + +var file_google_cloud_dialogflow_cx_v3_generator_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, 0x2f, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x1d, 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, 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, 0x9f, 0x03, 0x0a, 0x09, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x4b, 0x0a, 0x0b, 0x70, 0x72, + 0x6f, 0x6d, 0x70, 0x74, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x25, 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, 0x2e, + 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x70, 0x72, 0x6f, + 0x6d, 0x70, 0x74, 0x54, 0x65, 0x78, 0x74, 0x12, 0x5d, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x63, 0x65, + 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 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, 0x2e, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x68, 0x6f, 0x6c, + 0x64, 0x65, 0x72, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x68, + 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x31, 0x0a, 0x0b, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x68, + 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 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, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x6f, 0x72, 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, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x7d, 0x22, 0x21, 0x0a, 0x06, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 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, 0x22, 0xbd, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x8a, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x48, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x0a, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 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, 0x7b, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x6f, 0x72, 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, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x6f, 0x72, 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, + 0xcf, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x6f, 0x72, 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, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x4b, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0xc7, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x09, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x2e, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x6f, 0x0a, 0x16, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, + 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, 0xe9, 0x08, 0x0a, + 0x0a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0xc7, 0x01, 0x0a, 0x0e, + 0x4c, 0x69, 0x73, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0xda, 0x41, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x12, 0x37, 0x2f, 0x76, + 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, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0xb4, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x6f, 0x72, 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, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x6f, 0x72, 0x22, 0x46, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x39, 0x12, 0x37, 0x2f, 0x76, 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, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xd1, 0x01, 0x0a, + 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, + 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, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, + 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, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x22, 0x5d, 0xda, 0x41, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x44, 0x3a, 0x09, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x37, 0x2f, 0x76, 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, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, + 0x12, 0xe0, 0x01, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x6f, 0x72, 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, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x6f, 0x72, 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, 0x2e, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x6c, 0xda, 0x41, 0x15, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x6f, 0x72, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x4e, 0x3a, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, + 0x32, 0x41, 0x2f, 0x76, 0x33, 0x2f, 0x7b, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, + 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, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, + 0x2f, 0x2a, 0x7d, 0x12, 0xa8, 0x01, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 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, 0x46, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x2a, 0x37, 0x2f, 0x76, 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, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 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, 0x90, 0x01, 0x0a, 0x21, 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, 0x42, 0x0e, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x31, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x2f, 0x63, 0x78, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x33, 0x2f, 0x63, 0x78, 0x70, 0x62, 0x3b, 0x63, + 0x78, 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x02, 0x44, 0x46, 0xaa, 0x02, 0x1d, 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, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_dialogflow_cx_v3_generator_proto_rawDescOnce sync.Once + file_google_cloud_dialogflow_cx_v3_generator_proto_rawDescData = file_google_cloud_dialogflow_cx_v3_generator_proto_rawDesc +) + +func file_google_cloud_dialogflow_cx_v3_generator_proto_rawDescGZIP() []byte { + file_google_cloud_dialogflow_cx_v3_generator_proto_rawDescOnce.Do(func() { + file_google_cloud_dialogflow_cx_v3_generator_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_dialogflow_cx_v3_generator_proto_rawDescData) + }) + return file_google_cloud_dialogflow_cx_v3_generator_proto_rawDescData +} + +var file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_google_cloud_dialogflow_cx_v3_generator_proto_goTypes = []interface{}{ + (*Generator)(nil), // 0: google.cloud.dialogflow.cx.v3.Generator + (*Phrase)(nil), // 1: google.cloud.dialogflow.cx.v3.Phrase + (*ListGeneratorsRequest)(nil), // 2: google.cloud.dialogflow.cx.v3.ListGeneratorsRequest + (*ListGeneratorsResponse)(nil), // 3: google.cloud.dialogflow.cx.v3.ListGeneratorsResponse + (*GetGeneratorRequest)(nil), // 4: google.cloud.dialogflow.cx.v3.GetGeneratorRequest + (*CreateGeneratorRequest)(nil), // 5: google.cloud.dialogflow.cx.v3.CreateGeneratorRequest + (*UpdateGeneratorRequest)(nil), // 6: google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest + (*DeleteGeneratorRequest)(nil), // 7: google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest + (*Generator_Placeholder)(nil), // 8: google.cloud.dialogflow.cx.v3.Generator.Placeholder + (*fieldmaskpb.FieldMask)(nil), // 9: google.protobuf.FieldMask + (*emptypb.Empty)(nil), // 10: google.protobuf.Empty +} +var file_google_cloud_dialogflow_cx_v3_generator_proto_depIdxs = []int32{ + 1, // 0: google.cloud.dialogflow.cx.v3.Generator.prompt_text:type_name -> google.cloud.dialogflow.cx.v3.Phrase + 8, // 1: google.cloud.dialogflow.cx.v3.Generator.placeholders:type_name -> google.cloud.dialogflow.cx.v3.Generator.Placeholder + 0, // 2: google.cloud.dialogflow.cx.v3.ListGeneratorsResponse.generators:type_name -> google.cloud.dialogflow.cx.v3.Generator + 0, // 3: google.cloud.dialogflow.cx.v3.CreateGeneratorRequest.generator:type_name -> google.cloud.dialogflow.cx.v3.Generator + 0, // 4: google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest.generator:type_name -> google.cloud.dialogflow.cx.v3.Generator + 9, // 5: google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest.update_mask:type_name -> google.protobuf.FieldMask + 2, // 6: google.cloud.dialogflow.cx.v3.Generators.ListGenerators:input_type -> google.cloud.dialogflow.cx.v3.ListGeneratorsRequest + 4, // 7: google.cloud.dialogflow.cx.v3.Generators.GetGenerator:input_type -> google.cloud.dialogflow.cx.v3.GetGeneratorRequest + 5, // 8: google.cloud.dialogflow.cx.v3.Generators.CreateGenerator:input_type -> google.cloud.dialogflow.cx.v3.CreateGeneratorRequest + 6, // 9: google.cloud.dialogflow.cx.v3.Generators.UpdateGenerator:input_type -> google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest + 7, // 10: google.cloud.dialogflow.cx.v3.Generators.DeleteGenerator:input_type -> google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest + 3, // 11: google.cloud.dialogflow.cx.v3.Generators.ListGenerators:output_type -> google.cloud.dialogflow.cx.v3.ListGeneratorsResponse + 0, // 12: google.cloud.dialogflow.cx.v3.Generators.GetGenerator:output_type -> google.cloud.dialogflow.cx.v3.Generator + 0, // 13: google.cloud.dialogflow.cx.v3.Generators.CreateGenerator:output_type -> google.cloud.dialogflow.cx.v3.Generator + 0, // 14: google.cloud.dialogflow.cx.v3.Generators.UpdateGenerator:output_type -> google.cloud.dialogflow.cx.v3.Generator + 10, // 15: google.cloud.dialogflow.cx.v3.Generators.DeleteGenerator:output_type -> google.protobuf.Empty + 11, // [11:16] is the sub-list for method output_type + 6, // [6:11] 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_dialogflow_cx_v3_generator_proto_init() } +func file_google_cloud_dialogflow_cx_v3_generator_proto_init() { + if File_google_cloud_dialogflow_cx_v3_generator_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Generator); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Phrase); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListGeneratorsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListGeneratorsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetGeneratorRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateGeneratorRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateGeneratorRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteGeneratorRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Generator_Placeholder); 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_v3_generator_proto_rawDesc, + NumEnums: 0, + NumMessages: 9, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_dialogflow_cx_v3_generator_proto_goTypes, + DependencyIndexes: file_google_cloud_dialogflow_cx_v3_generator_proto_depIdxs, + MessageInfos: file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes, + }.Build() + File_google_cloud_dialogflow_cx_v3_generator_proto = out.File + file_google_cloud_dialogflow_cx_v3_generator_proto_rawDesc = nil + file_google_cloud_dialogflow_cx_v3_generator_proto_goTypes = nil + file_google_cloud_dialogflow_cx_v3_generator_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 + +// GeneratorsClient is the client API for Generators service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type GeneratorsClient interface { + // Returns the list of all generators in the specified agent. + ListGenerators(ctx context.Context, in *ListGeneratorsRequest, opts ...grpc.CallOption) (*ListGeneratorsResponse, error) + // Retrieves the specified generator. + GetGenerator(ctx context.Context, in *GetGeneratorRequest, opts ...grpc.CallOption) (*Generator, error) + // Creates a generator in the specified agent. + CreateGenerator(ctx context.Context, in *CreateGeneratorRequest, opts ...grpc.CallOption) (*Generator, error) + // Update the specified generator. + UpdateGenerator(ctx context.Context, in *UpdateGeneratorRequest, opts ...grpc.CallOption) (*Generator, error) + // Deletes the specified generators. + DeleteGenerator(ctx context.Context, in *DeleteGeneratorRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type generatorsClient struct { + cc grpc.ClientConnInterface +} + +func NewGeneratorsClient(cc grpc.ClientConnInterface) GeneratorsClient { + return &generatorsClient{cc} +} + +func (c *generatorsClient) ListGenerators(ctx context.Context, in *ListGeneratorsRequest, opts ...grpc.CallOption) (*ListGeneratorsResponse, error) { + out := new(ListGeneratorsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3.Generators/ListGenerators", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *generatorsClient) GetGenerator(ctx context.Context, in *GetGeneratorRequest, opts ...grpc.CallOption) (*Generator, error) { + out := new(Generator) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3.Generators/GetGenerator", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *generatorsClient) CreateGenerator(ctx context.Context, in *CreateGeneratorRequest, opts ...grpc.CallOption) (*Generator, error) { + out := new(Generator) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3.Generators/CreateGenerator", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *generatorsClient) UpdateGenerator(ctx context.Context, in *UpdateGeneratorRequest, opts ...grpc.CallOption) (*Generator, error) { + out := new(Generator) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3.Generators/UpdateGenerator", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *generatorsClient) DeleteGenerator(ctx context.Context, in *DeleteGeneratorRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3.Generators/DeleteGenerator", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// GeneratorsServer is the server API for Generators service. +type GeneratorsServer interface { + // Returns the list of all generators in the specified agent. + ListGenerators(context.Context, *ListGeneratorsRequest) (*ListGeneratorsResponse, error) + // Retrieves the specified generator. + GetGenerator(context.Context, *GetGeneratorRequest) (*Generator, error) + // Creates a generator in the specified agent. + CreateGenerator(context.Context, *CreateGeneratorRequest) (*Generator, error) + // Update the specified generator. + UpdateGenerator(context.Context, *UpdateGeneratorRequest) (*Generator, error) + // Deletes the specified generators. + DeleteGenerator(context.Context, *DeleteGeneratorRequest) (*emptypb.Empty, error) +} + +// UnimplementedGeneratorsServer can be embedded to have forward compatible implementations. +type UnimplementedGeneratorsServer struct { +} + +func (*UnimplementedGeneratorsServer) ListGenerators(context.Context, *ListGeneratorsRequest) (*ListGeneratorsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListGenerators not implemented") +} +func (*UnimplementedGeneratorsServer) GetGenerator(context.Context, *GetGeneratorRequest) (*Generator, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGenerator not implemented") +} +func (*UnimplementedGeneratorsServer) CreateGenerator(context.Context, *CreateGeneratorRequest) (*Generator, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateGenerator not implemented") +} +func (*UnimplementedGeneratorsServer) UpdateGenerator(context.Context, *UpdateGeneratorRequest) (*Generator, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateGenerator not implemented") +} +func (*UnimplementedGeneratorsServer) DeleteGenerator(context.Context, *DeleteGeneratorRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteGenerator not implemented") +} + +func RegisterGeneratorsServer(s *grpc.Server, srv GeneratorsServer) { + s.RegisterService(&_Generators_serviceDesc, srv) +} + +func _Generators_ListGenerators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListGeneratorsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GeneratorsServer).ListGenerators(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3.Generators/ListGenerators", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GeneratorsServer).ListGenerators(ctx, req.(*ListGeneratorsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Generators_GetGenerator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetGeneratorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GeneratorsServer).GetGenerator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3.Generators/GetGenerator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GeneratorsServer).GetGenerator(ctx, req.(*GetGeneratorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Generators_CreateGenerator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateGeneratorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GeneratorsServer).CreateGenerator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3.Generators/CreateGenerator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GeneratorsServer).CreateGenerator(ctx, req.(*CreateGeneratorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Generators_UpdateGenerator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateGeneratorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GeneratorsServer).UpdateGenerator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3.Generators/UpdateGenerator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GeneratorsServer).UpdateGenerator(ctx, req.(*UpdateGeneratorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Generators_DeleteGenerator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteGeneratorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GeneratorsServer).DeleteGenerator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3.Generators/DeleteGenerator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GeneratorsServer).DeleteGenerator(ctx, req.(*DeleteGeneratorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Generators_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.dialogflow.cx.v3.Generators", + HandlerType: (*GeneratorsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListGenerators", + Handler: _Generators_ListGenerators_Handler, + }, + { + MethodName: "GetGenerator", + Handler: _Generators_GetGenerator_Handler, + }, + { + MethodName: "CreateGenerator", + Handler: _Generators_CreateGenerator_Handler, + }, + { + MethodName: "UpdateGenerator", + Handler: _Generators_UpdateGenerator_Handler, + }, + { + MethodName: "DeleteGenerator", + Handler: _Generators_DeleteGenerator_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/dialogflow/cx/v3/generator.proto", +} diff --git a/dialogflow/cx/apiv3/gapic_metadata.json b/dialogflow/cx/apiv3/gapic_metadata.json index dbdd840ca25a..a11ae18e56f9 100644 --- a/dialogflow/cx/apiv3/gapic_metadata.json +++ b/dialogflow/cx/apiv3/gapic_metadata.json @@ -913,6 +913,120 @@ } } }, + "Generators": { + "clients": { + "grpc": { + "libraryClient": "GeneratorsClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateGenerator": { + "methods": [ + "CreateGenerator" + ] + }, + "DeleteGenerator": { + "methods": [ + "DeleteGenerator" + ] + }, + "GetGenerator": { + "methods": [ + "GetGenerator" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListGenerators": { + "methods": [ + "ListGenerators" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "UpdateGenerator": { + "methods": [ + "UpdateGenerator" + ] + } + } + }, + "rest": { + "libraryClient": "GeneratorsClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateGenerator": { + "methods": [ + "CreateGenerator" + ] + }, + "DeleteGenerator": { + "methods": [ + "DeleteGenerator" + ] + }, + "GetGenerator": { + "methods": [ + "GetGenerator" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListGenerators": { + "methods": [ + "ListGenerators" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "UpdateGenerator": { + "methods": [ + "UpdateGenerator" + ] + } + } + } + } + }, "Intents": { "clients": { "grpc": { diff --git a/dialogflow/cx/apiv3/generators_client.go b/dialogflow/cx/apiv3/generators_client.go new file mode 100755 index 000000000000..37683b2858b8 --- /dev/null +++ b/dialogflow/cx/apiv3/generators_client.go @@ -0,0 +1,1403 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package cx + +import ( + "bytes" + "context" + "fmt" + "io" + "math" + "net/http" + "net/url" + "time" + + cxpb "cloud.google.com/go/dialogflow/cx/apiv3/cxpb" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + 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" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newGeneratorsClientHook clientHook + +// GeneratorsCallOptions contains the retry settings for each method of GeneratorsClient. +type GeneratorsCallOptions struct { + ListGenerators []gax.CallOption + GetGenerator []gax.CallOption + CreateGenerator []gax.CallOption + UpdateGenerator []gax.CallOption + DeleteGenerator []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultGeneratorsGRPCClientOptions() []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 defaultGeneratorsCallOptions() *GeneratorsCallOptions { + return &GeneratorsCallOptions{ + ListGenerators: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + 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, + }) + }), + }, + GetGenerator: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + 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, + }) + }), + }, + CreateGenerator: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + 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, + }) + }), + }, + UpdateGenerator: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + 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, + }) + }), + }, + DeleteGenerator: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + 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 defaultGeneratorsRESTCallOptions() *GeneratorsCallOptions { + return &GeneratorsCallOptions{ + ListGenerators: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetGenerator: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + CreateGenerator: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + UpdateGenerator: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + DeleteGenerator: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + 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{}, + } +} + +// internalGeneratorsClient is an interface that defines the methods available from Dialogflow API. +type internalGeneratorsClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + ListGenerators(context.Context, *cxpb.ListGeneratorsRequest, ...gax.CallOption) *GeneratorIterator + GetGenerator(context.Context, *cxpb.GetGeneratorRequest, ...gax.CallOption) (*cxpb.Generator, error) + CreateGenerator(context.Context, *cxpb.CreateGeneratorRequest, ...gax.CallOption) (*cxpb.Generator, error) + UpdateGenerator(context.Context, *cxpb.UpdateGeneratorRequest, ...gax.CallOption) (*cxpb.Generator, error) + DeleteGenerator(context.Context, *cxpb.DeleteGeneratorRequest, ...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 +} + +// GeneratorsClient 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 Generators +type GeneratorsClient struct { + // The internal transport-dependent client. + internalClient internalGeneratorsClient + + // The call options for this service. + CallOptions *GeneratorsCallOptions +} + +// 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 *GeneratorsClient) 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 *GeneratorsClient) 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 *GeneratorsClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// ListGenerators returns the list of all generators in the specified agent. +func (c *GeneratorsClient) ListGenerators(ctx context.Context, req *cxpb.ListGeneratorsRequest, opts ...gax.CallOption) *GeneratorIterator { + return c.internalClient.ListGenerators(ctx, req, opts...) +} + +// GetGenerator retrieves the specified generator. +func (c *GeneratorsClient) GetGenerator(ctx context.Context, req *cxpb.GetGeneratorRequest, opts ...gax.CallOption) (*cxpb.Generator, error) { + return c.internalClient.GetGenerator(ctx, req, opts...) +} + +// CreateGenerator creates a generator in the specified agent. +func (c *GeneratorsClient) CreateGenerator(ctx context.Context, req *cxpb.CreateGeneratorRequest, opts ...gax.CallOption) (*cxpb.Generator, error) { + return c.internalClient.CreateGenerator(ctx, req, opts...) +} + +// UpdateGenerator update the specified generator. +func (c *GeneratorsClient) UpdateGenerator(ctx context.Context, req *cxpb.UpdateGeneratorRequest, opts ...gax.CallOption) (*cxpb.Generator, error) { + return c.internalClient.UpdateGenerator(ctx, req, opts...) +} + +// DeleteGenerator deletes the specified generators. +func (c *GeneratorsClient) DeleteGenerator(ctx context.Context, req *cxpb.DeleteGeneratorRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteGenerator(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *GeneratorsClient) 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 *GeneratorsClient) 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 *GeneratorsClient) 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 *GeneratorsClient) 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 *GeneratorsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// generatorsGRPCClient 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 generatorsGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // Points back to the CallOptions field of the containing GeneratorsClient + CallOptions **GeneratorsCallOptions + + // The gRPC API client. + generatorsClient cxpb.GeneratorsClient + + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogHeaders []string +} + +// NewGeneratorsClient creates a new generators 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 Generators +func NewGeneratorsClient(ctx context.Context, opts ...option.ClientOption) (*GeneratorsClient, error) { + clientOpts := defaultGeneratorsGRPCClientOptions() + if newGeneratorsClientHook != nil { + hookOpts, err := newGeneratorsClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := GeneratorsClient{CallOptions: defaultGeneratorsCallOptions()} + + c := &generatorsGRPCClient{ + connPool: connPool, + generatorsClient: cxpb.NewGeneratorsClient(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 *generatorsGRPCClient) 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 *generatorsGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", gax.GoVersion}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogHeaders = []string{"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 *generatorsGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type generatorsRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* headers to be sent with each request. + xGoogHeaders []string + + // Points back to the CallOptions field of the containing GeneratorsClient + CallOptions **GeneratorsCallOptions +} + +// NewGeneratorsRESTClient creates a new generators rest client. +// +// Service for managing Generators +func NewGeneratorsRESTClient(ctx context.Context, opts ...option.ClientOption) (*GeneratorsClient, error) { + clientOpts := append(defaultGeneratorsRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultGeneratorsRESTCallOptions() + c := &generatorsRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + return &GeneratorsClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultGeneratorsRESTClientOptions() []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 *generatorsRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", gax.GoVersion}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogHeaders = []string{"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 *generatorsRESTClient) 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 *generatorsRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *generatorsGRPCClient) ListGenerators(ctx context.Context, req *cxpb.ListGeneratorsRequest, opts ...gax.CallOption) *GeneratorIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListGenerators[0:len((*c.CallOptions).ListGenerators):len((*c.CallOptions).ListGenerators)], opts...) + it := &GeneratorIterator{} + req = proto.Clone(req).(*cxpb.ListGeneratorsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*cxpb.Generator, string, error) { + resp := &cxpb.ListGeneratorsResponse{} + 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.generatorsClient.ListGenerators(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetGenerators(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + 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 *generatorsGRPCClient) GetGenerator(ctx context.Context, req *cxpb.GetGeneratorRequest, opts ...gax.CallOption) (*cxpb.Generator, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetGenerator[0:len((*c.CallOptions).GetGenerator):len((*c.CallOptions).GetGenerator)], opts...) + var resp *cxpb.Generator + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.generatorsClient.GetGenerator(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *generatorsGRPCClient) CreateGenerator(ctx context.Context, req *cxpb.CreateGeneratorRequest, opts ...gax.CallOption) (*cxpb.Generator, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).CreateGenerator[0:len((*c.CallOptions).CreateGenerator):len((*c.CallOptions).CreateGenerator)], opts...) + var resp *cxpb.Generator + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.generatorsClient.CreateGenerator(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *generatorsGRPCClient) UpdateGenerator(ctx context.Context, req *cxpb.UpdateGeneratorRequest, opts ...gax.CallOption) (*cxpb.Generator, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "generator.name", url.QueryEscape(req.GetGenerator().GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).UpdateGenerator[0:len((*c.CallOptions).UpdateGenerator):len((*c.CallOptions).UpdateGenerator)], opts...) + var resp *cxpb.Generator + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.generatorsClient.UpdateGenerator(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *generatorsGRPCClient) DeleteGenerator(ctx context.Context, req *cxpb.DeleteGeneratorRequest, opts ...gax.CallOption) error { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).DeleteGenerator[0:len((*c.CallOptions).DeleteGenerator):len((*c.CallOptions).DeleteGenerator)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.generatorsClient.DeleteGenerator(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *generatorsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + 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 *generatorsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + 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 *generatorsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + 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 *generatorsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + 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 *generatorsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + 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 +} + +// ListGenerators returns the list of all generators in the specified agent. +func (c *generatorsRESTClient) ListGenerators(ctx context.Context, req *cxpb.ListGeneratorsRequest, opts ...gax.CallOption) *GeneratorIterator { + it := &GeneratorIterator{} + req = proto.Clone(req).(*cxpb.ListGeneratorsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*cxpb.Generator, string, error) { + resp := &cxpb.ListGeneratorsResponse{} + 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("/v3/%v/generators", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + 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. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings 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 := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetGenerators(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetGenerator retrieves the specified generator. +func (c *generatorsRESTClient) GetGenerator(ctx context.Context, req *cxpb.GetGeneratorRequest, opts ...gax.CallOption) (*cxpb.Generator, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v3/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetLanguageCode() != "" { + params.Add("languageCode", fmt.Sprintf("%v", req.GetLanguageCode())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetGenerator[0:len((*c.CallOptions).GetGenerator):len((*c.CallOptions).GetGenerator)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &cxpb.Generator{} + e := gax.Invoke(ctx, func(ctx context.Context, settings 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 := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateGenerator creates a generator in the specified agent. +func (c *generatorsRESTClient) CreateGenerator(ctx context.Context, req *cxpb.CreateGeneratorRequest, opts ...gax.CallOption) (*cxpb.Generator, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetGenerator() + 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("/v3/%v/generators", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetLanguageCode() != "" { + params.Add("languageCode", fmt.Sprintf("%v", req.GetLanguageCode())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).CreateGenerator[0:len((*c.CallOptions).CreateGenerator):len((*c.CallOptions).CreateGenerator)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &cxpb.Generator{} + 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 := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateGenerator update the specified generator. +func (c *generatorsRESTClient) UpdateGenerator(ctx context.Context, req *cxpb.UpdateGeneratorRequest, opts ...gax.CallOption) (*cxpb.Generator, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetGenerator() + 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("/v3/%v", req.GetGenerator().GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + 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[1:len(updateMask)-1])) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "generator.name", url.QueryEscape(req.GetGenerator().GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).UpdateGenerator[0:len((*c.CallOptions).UpdateGenerator):len((*c.CallOptions).UpdateGenerator)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &cxpb.Generator{} + 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 := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteGenerator deletes the specified generators. +func (c *generatorsRESTClient) DeleteGenerator(ctx context.Context, req *cxpb.DeleteGeneratorRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v3/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetForce() { + params.Add("force", fmt.Sprintf("%v", req.GetForce())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + 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 *generatorsRESTClient) 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("/v3/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + 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 := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return 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 *generatorsRESTClient) 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("/v3/%v/locations", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + 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. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings 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 := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return 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 *generatorsRESTClient) 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("/v3/%v:cancel", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + 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 *generatorsRESTClient) 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("/v3/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + 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 := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *generatorsRESTClient) 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("/v3/%v/operations", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + 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. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings 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 := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return 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/cx/apiv3/generators_client_example_test.go b/dialogflow/cx/apiv3/generators_client_example_test.go new file mode 100644 index 000000000000..07afa363d791 --- /dev/null +++ b/dialogflow/cx/apiv3/generators_client_example_test.go @@ -0,0 +1,325 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package cx_test + +import ( + "context" + + cx "cloud.google.com/go/dialogflow/cx/apiv3" + cxpb "cloud.google.com/go/dialogflow/cx/apiv3/cxpb" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func ExampleNewGeneratorsClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require 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.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewGeneratorsRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require 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.NewGeneratorsRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleGeneratorsClient_CreateGenerator() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require 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.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &cxpb.CreateGeneratorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/dialogflow/cx/apiv3/cxpb#CreateGeneratorRequest. + } + resp, err := c.CreateGenerator(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleGeneratorsClient_DeleteGenerator() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require 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.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &cxpb.DeleteGeneratorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/dialogflow/cx/apiv3/cxpb#DeleteGeneratorRequest. + } + err = c.DeleteGenerator(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleGeneratorsClient_GetGenerator() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require 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.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &cxpb.GetGeneratorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/dialogflow/cx/apiv3/cxpb#GetGeneratorRequest. + } + resp, err := c.GetGenerator(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleGeneratorsClient_ListGenerators() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require 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.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &cxpb.ListGeneratorsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/dialogflow/cx/apiv3/cxpb#ListGeneratorsRequest. + } + it := c.ListGenerators(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleGeneratorsClient_UpdateGenerator() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require 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.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &cxpb.UpdateGeneratorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/dialogflow/cx/apiv3/cxpb#UpdateGeneratorRequest. + } + resp, err := c.UpdateGenerator(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleGeneratorsClient_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.NewGeneratorsClient(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 ExampleGeneratorsClient_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.NewGeneratorsClient(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 ExampleGeneratorsClient_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.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleGeneratorsClient_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.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleGeneratorsClient_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.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#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/apiv3beta1/auxiliary.go b/dialogflow/cx/apiv3beta1/auxiliary.go index 7abc0dc8b07d..caf3ae6eb05b 100755 --- a/dialogflow/cx/apiv3beta1/auxiliary.go +++ b/dialogflow/cx/apiv3beta1/auxiliary.go @@ -1460,6 +1460,53 @@ func (it *FlowIterator) takeBuf() interface{} { return b } +// GeneratorIterator manages a stream of *cxpb.Generator. +type GeneratorIterator struct { + items []*cxpb.Generator + 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 []*cxpb.Generator, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *GeneratorIterator) 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 *GeneratorIterator) Next() (*cxpb.Generator, error) { + var item *cxpb.Generator + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *GeneratorIterator) bufLen() int { + return len(it.items) +} + +func (it *GeneratorIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + // IntentIterator manages a stream of *cxpb.Intent. type IntentIterator struct { items []*cxpb.Intent diff --git a/dialogflow/cx/apiv3beta1/cxpb/audio_config.pb.go b/dialogflow/cx/apiv3beta1/cxpb/audio_config.pb.go index 5853a753fbd6..82587d8b71ab 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/audio_config.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/audio_config.pb.go @@ -544,8 +544,8 @@ type InputAudioConfig struct { 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. + // explicitly specified, then Dialogflow auto-selects a model based on other + // parameters in the InputAudioConfig and Agent settings. // 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. @@ -558,7 +558,12 @@ type InputAudioConfig struct { // // - phone_call (best for Agent Assist and telephony) // - latest_short (best for Dialogflow non-telephony) - // - command_and_search (best for very short utterances and commands) + // - command_and_search + // + // Leave this field unspecified to use + // [Agent Speech + // settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech) + // for model selection. 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. diff --git a/dialogflow/cx/apiv3beta1/cxpb/generator.pb.go b/dialogflow/cx/apiv3beta1/cxpb/generator.pb.go new file mode 100755 index 000000000000..21659dd46a6b --- /dev/null +++ b/dialogflow/cx/apiv3beta1/cxpb/generator.pb.go @@ -0,0 +1,1264 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS 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.31.0 +// protoc v4.23.2 +// source: google/cloud/dialogflow/cx/v3beta1/generator.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) +) + +// Generators contain prompt to be sent to the LLM model to generate text. The +// prompt can contain parameters which will be resolved before calling the +// model. It can optionally contain banned phrases to ensure the model responses +// are safe. +type Generator struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique identifier of the generator. + // Must be set for the + // [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator] + // method. [Generators.CreateGenerate][] populates the name automatically. + // Format: `projects//locations//agents//generators/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The human-readable name of the generator, unique within the + // agent. The prompt contains pre-defined parameters such as $conversation, + // $last-user-utterance, etc. populated by Dialogflow. It can also contain + // custom placeholders which will be resolved during fulfillment. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Required. Prompt for the LLM model. + PromptText *Phrase `protobuf:"bytes,3,opt,name=prompt_text,json=promptText,proto3" json:"prompt_text,omitempty"` + // Optional. List of custom placeholders in the prompt text. + Placeholders []*Generator_Placeholder `protobuf:"bytes,5,rep,name=placeholders,proto3" json:"placeholders,omitempty"` +} + +func (x *Generator) Reset() { + *x = Generator{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Generator) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Generator) ProtoMessage() {} + +func (x *Generator) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_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 Generator.ProtoReflect.Descriptor instead. +func (*Generator) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_generator_proto_rawDescGZIP(), []int{0} +} + +func (x *Generator) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Generator) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Generator) GetPromptText() *Phrase { + if x != nil { + return x.PromptText + } + return nil +} + +func (x *Generator) GetPlaceholders() []*Generator_Placeholder { + if x != nil { + return x.Placeholders + } + return nil +} + +// Text input which can be used for prompt or banned phrases. +type Phrase struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Text input which can be used for prompt or banned phrases. + Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` +} + +func (x *Phrase) Reset() { + *x = Phrase{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Phrase) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Phrase) ProtoMessage() {} + +func (x *Phrase) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_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 Phrase.ProtoReflect.Descriptor instead. +func (*Phrase) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_generator_proto_rawDescGZIP(), []int{1} +} + +func (x *Phrase) GetText() string { + if x != nil { + return x.Text + } + return "" +} + +// The request message for +// [Generators.ListGenerators][google.cloud.dialogflow.cx.v3beta1.Generators.ListGenerators]. +type ListGeneratorsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The agent to list all generators for. + // Format: `projects//locations//agents/`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The language to list generators for. + 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 *ListGeneratorsRequest) Reset() { + *x = ListGeneratorsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListGeneratorsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGeneratorsRequest) ProtoMessage() {} + +func (x *ListGeneratorsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_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 ListGeneratorsRequest.ProtoReflect.Descriptor instead. +func (*ListGeneratorsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_generator_proto_rawDescGZIP(), []int{2} +} + +func (x *ListGeneratorsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListGeneratorsRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +func (x *ListGeneratorsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListGeneratorsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// The response message for +// [Generators.ListGenerators][google.cloud.dialogflow.cx.v3beta1.Generators.ListGenerators]. +type ListGeneratorsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of generators. There will be a maximum number of items returned + // based on the page_size field in the request. + Generators []*Generator `protobuf:"bytes,1,rep,name=generators,proto3" json:"generators,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 *ListGeneratorsResponse) Reset() { + *x = ListGeneratorsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListGeneratorsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGeneratorsResponse) ProtoMessage() {} + +func (x *ListGeneratorsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_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 ListGeneratorsResponse.ProtoReflect.Descriptor instead. +func (*ListGeneratorsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_generator_proto_rawDescGZIP(), []int{3} +} + +func (x *ListGeneratorsResponse) GetGenerators() []*Generator { + if x != nil { + return x.Generators + } + return nil +} + +func (x *ListGeneratorsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// The request message for +// [Generators.GetGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.GetGenerator]. +type GetGeneratorRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the generator. + // Format: `projects//locations//agents//generators/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The language to list generators for. + LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` +} + +func (x *GetGeneratorRequest) Reset() { + *x = GetGeneratorRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGeneratorRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGeneratorRequest) ProtoMessage() {} + +func (x *GetGeneratorRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_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 GetGeneratorRequest.ProtoReflect.Descriptor instead. +func (*GetGeneratorRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_generator_proto_rawDescGZIP(), []int{4} +} + +func (x *GetGeneratorRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetGeneratorRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +// The request message for +// [Generators.CreateGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.CreateGenerator]. +type CreateGeneratorRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The agent to create a generator for. + // Format: `projects//locations//agents/`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The generator to create. + Generator *Generator `protobuf:"bytes,2,opt,name=generator,proto3" json:"generator,omitempty"` + // The language to create generators for the following fields: + // * `Generator.prompt_text.text` + // If not specified, the agent's default language is used. + LanguageCode string `protobuf:"bytes,3,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` +} + +func (x *CreateGeneratorRequest) Reset() { + *x = CreateGeneratorRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateGeneratorRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateGeneratorRequest) ProtoMessage() {} + +func (x *CreateGeneratorRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_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 CreateGeneratorRequest.ProtoReflect.Descriptor instead. +func (*CreateGeneratorRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_generator_proto_rawDescGZIP(), []int{5} +} + +func (x *CreateGeneratorRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateGeneratorRequest) GetGenerator() *Generator { + if x != nil { + return x.Generator + } + return nil +} + +func (x *CreateGeneratorRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +// The request message for +// [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator]. +type UpdateGeneratorRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The generator to update. + Generator *Generator `protobuf:"bytes,1,opt,name=generator,proto3" json:"generator,omitempty"` + // The language to list generators for. + 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 *UpdateGeneratorRequest) Reset() { + *x = UpdateGeneratorRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateGeneratorRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateGeneratorRequest) ProtoMessage() {} + +func (x *UpdateGeneratorRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_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 UpdateGeneratorRequest.ProtoReflect.Descriptor instead. +func (*UpdateGeneratorRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_generator_proto_rawDescGZIP(), []int{6} +} + +func (x *UpdateGeneratorRequest) GetGenerator() *Generator { + if x != nil { + return x.Generator + } + return nil +} + +func (x *UpdateGeneratorRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +func (x *UpdateGeneratorRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// The request message for +// [Generators.DeleteGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.DeleteGenerator]. +type DeleteGeneratorRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the generator to delete. + // Format: `projects//locations//agents//generators/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // This field has no effect for generators not being used. + // For generators that are used by pages/flows/transition route groups: + // + // * If `force` is set to false, an error will be returned with message + // indicating the referenced resources. + // * If `force` is set to true, Dialogflow will remove the generator, as well + // as any references to the generator (i.e. + // [Generator][Fulfillment.generator]) in fulfillments. + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` +} + +func (x *DeleteGeneratorRequest) Reset() { + *x = DeleteGeneratorRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteGeneratorRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteGeneratorRequest) ProtoMessage() {} + +func (x *DeleteGeneratorRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_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 DeleteGeneratorRequest.ProtoReflect.Descriptor instead. +func (*DeleteGeneratorRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_generator_proto_rawDescGZIP(), []int{7} +} + +func (x *DeleteGeneratorRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DeleteGeneratorRequest) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +// Represents a custom placeholder in the prompt text. +type Generator_Placeholder struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Unique ID used to map custom placeholder to parameters in fulfillment. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Custom placeholder value in the prompt text. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *Generator_Placeholder) Reset() { + *x = Generator_Placeholder{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Generator_Placeholder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Generator_Placeholder) ProtoMessage() {} + +func (x *Generator_Placeholder) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_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 Generator_Placeholder.ProtoReflect.Descriptor instead. +func (*Generator_Placeholder) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_generator_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Generator_Placeholder) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Generator_Placeholder) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +var File_google_cloud_dialogflow_cx_v3beta1_generator_proto protoreflect.FileDescriptor + +var file_google_cloud_dialogflow_cx_v3beta1_generator_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, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0xa9, 0x03, 0x0a, 0x09, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x50, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x5f, 0x74, + 0x65, 0x78, 0x74, 0x18, 0x03, 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, 0x50, + 0x68, 0x72, 0x61, 0x73, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x6d, + 0x70, 0x74, 0x54, 0x65, 0x78, 0x74, 0x12, 0x62, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x68, + 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 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, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x50, 0x6c, 0x61, 0x63, + 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x70, 0x6c, + 0x61, 0x63, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x31, 0x0a, 0x0b, 0x50, 0x6c, + 0x61, 0x63, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 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, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x7d, 0x22, 0x21, 0x0a, 0x06, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, + 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, 0x22, 0xbd, 0x01, 0x0a, 0x15, 0x4c, 0x69, + 0x73, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, + 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, 0x8f, 0x01, 0x0a, 0x16, 0x4c, 0x69, + 0x73, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 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, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 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, 0x7b, 0x0a, 0x13, 0x47, + 0x65, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0xd4, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x50, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 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, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, + 0xcc, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x50, 0x0a, 0x09, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 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, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x6f, + 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 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, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x6f, 0x72, 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, + 0xaf, 0x09, 0x0a, 0x0a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0xd6, + 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, + 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, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x6f, 0x72, 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, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4d, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 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, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0xc3, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, + 0x22, 0x4b, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 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, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xe0, 0x01, + 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 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, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x62, 0xda, 0x41, + 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x49, 0x3a, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x22, 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, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, + 0x12, 0xef, 0x01, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x6f, 0x72, 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, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x22, + 0x71, 0xda, 0x41, 0x15, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2c, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x53, 0x3a, + 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x32, 0x46, 0x2f, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, + 0x2a, 0x7d, 0x12, 0xb2, 0x01, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 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, 0x4b, 0xda, 0x41, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x2a, 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, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 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, 0x9f, 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, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x67, 0x6f, 0x2f, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, + 0x78, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x78, 0x70, + 0x62, 0x3b, 0x63, 0x78, 0x70, 0x62, 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, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_dialogflow_cx_v3beta1_generator_proto_rawDescOnce sync.Once + file_google_cloud_dialogflow_cx_v3beta1_generator_proto_rawDescData = file_google_cloud_dialogflow_cx_v3beta1_generator_proto_rawDesc +) + +func file_google_cloud_dialogflow_cx_v3beta1_generator_proto_rawDescGZIP() []byte { + file_google_cloud_dialogflow_cx_v3beta1_generator_proto_rawDescOnce.Do(func() { + file_google_cloud_dialogflow_cx_v3beta1_generator_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_dialogflow_cx_v3beta1_generator_proto_rawDescData) + }) + return file_google_cloud_dialogflow_cx_v3beta1_generator_proto_rawDescData +} + +var file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_google_cloud_dialogflow_cx_v3beta1_generator_proto_goTypes = []interface{}{ + (*Generator)(nil), // 0: google.cloud.dialogflow.cx.v3beta1.Generator + (*Phrase)(nil), // 1: google.cloud.dialogflow.cx.v3beta1.Phrase + (*ListGeneratorsRequest)(nil), // 2: google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest + (*ListGeneratorsResponse)(nil), // 3: google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse + (*GetGeneratorRequest)(nil), // 4: google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest + (*CreateGeneratorRequest)(nil), // 5: google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest + (*UpdateGeneratorRequest)(nil), // 6: google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest + (*DeleteGeneratorRequest)(nil), // 7: google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest + (*Generator_Placeholder)(nil), // 8: google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder + (*fieldmaskpb.FieldMask)(nil), // 9: google.protobuf.FieldMask + (*emptypb.Empty)(nil), // 10: google.protobuf.Empty +} +var file_google_cloud_dialogflow_cx_v3beta1_generator_proto_depIdxs = []int32{ + 1, // 0: google.cloud.dialogflow.cx.v3beta1.Generator.prompt_text:type_name -> google.cloud.dialogflow.cx.v3beta1.Phrase + 8, // 1: google.cloud.dialogflow.cx.v3beta1.Generator.placeholders:type_name -> google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder + 0, // 2: google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse.generators:type_name -> google.cloud.dialogflow.cx.v3beta1.Generator + 0, // 3: google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest.generator:type_name -> google.cloud.dialogflow.cx.v3beta1.Generator + 0, // 4: google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest.generator:type_name -> google.cloud.dialogflow.cx.v3beta1.Generator + 9, // 5: google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest.update_mask:type_name -> google.protobuf.FieldMask + 2, // 6: google.cloud.dialogflow.cx.v3beta1.Generators.ListGenerators:input_type -> google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest + 4, // 7: google.cloud.dialogflow.cx.v3beta1.Generators.GetGenerator:input_type -> google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest + 5, // 8: google.cloud.dialogflow.cx.v3beta1.Generators.CreateGenerator:input_type -> google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest + 6, // 9: google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator:input_type -> google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest + 7, // 10: google.cloud.dialogflow.cx.v3beta1.Generators.DeleteGenerator:input_type -> google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest + 3, // 11: google.cloud.dialogflow.cx.v3beta1.Generators.ListGenerators:output_type -> google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse + 0, // 12: google.cloud.dialogflow.cx.v3beta1.Generators.GetGenerator:output_type -> google.cloud.dialogflow.cx.v3beta1.Generator + 0, // 13: google.cloud.dialogflow.cx.v3beta1.Generators.CreateGenerator:output_type -> google.cloud.dialogflow.cx.v3beta1.Generator + 0, // 14: google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator:output_type -> google.cloud.dialogflow.cx.v3beta1.Generator + 10, // 15: google.cloud.dialogflow.cx.v3beta1.Generators.DeleteGenerator:output_type -> google.protobuf.Empty + 11, // [11:16] is the sub-list for method output_type + 6, // [6:11] 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_dialogflow_cx_v3beta1_generator_proto_init() } +func file_google_cloud_dialogflow_cx_v3beta1_generator_proto_init() { + if File_google_cloud_dialogflow_cx_v3beta1_generator_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Generator); 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_generator_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Phrase); 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_generator_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListGeneratorsRequest); 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_generator_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListGeneratorsResponse); 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_generator_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetGeneratorRequest); 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_generator_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateGeneratorRequest); 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_generator_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateGeneratorRequest); 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_generator_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteGeneratorRequest); 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_generator_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Generator_Placeholder); 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_generator_proto_rawDesc, + NumEnums: 0, + NumMessages: 9, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_dialogflow_cx_v3beta1_generator_proto_goTypes, + DependencyIndexes: file_google_cloud_dialogflow_cx_v3beta1_generator_proto_depIdxs, + MessageInfos: file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes, + }.Build() + File_google_cloud_dialogflow_cx_v3beta1_generator_proto = out.File + file_google_cloud_dialogflow_cx_v3beta1_generator_proto_rawDesc = nil + file_google_cloud_dialogflow_cx_v3beta1_generator_proto_goTypes = nil + file_google_cloud_dialogflow_cx_v3beta1_generator_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 + +// GeneratorsClient is the client API for Generators service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type GeneratorsClient interface { + // Returns the list of all generators in the specified agent. + ListGenerators(ctx context.Context, in *ListGeneratorsRequest, opts ...grpc.CallOption) (*ListGeneratorsResponse, error) + // Retrieves the specified generator. + GetGenerator(ctx context.Context, in *GetGeneratorRequest, opts ...grpc.CallOption) (*Generator, error) + // Creates a generator in the specified agent. + CreateGenerator(ctx context.Context, in *CreateGeneratorRequest, opts ...grpc.CallOption) (*Generator, error) + // Update the specified generator. + UpdateGenerator(ctx context.Context, in *UpdateGeneratorRequest, opts ...grpc.CallOption) (*Generator, error) + // Deletes the specified generators. + DeleteGenerator(ctx context.Context, in *DeleteGeneratorRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type generatorsClient struct { + cc grpc.ClientConnInterface +} + +func NewGeneratorsClient(cc grpc.ClientConnInterface) GeneratorsClient { + return &generatorsClient{cc} +} + +func (c *generatorsClient) ListGenerators(ctx context.Context, in *ListGeneratorsRequest, opts ...grpc.CallOption) (*ListGeneratorsResponse, error) { + out := new(ListGeneratorsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Generators/ListGenerators", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *generatorsClient) GetGenerator(ctx context.Context, in *GetGeneratorRequest, opts ...grpc.CallOption) (*Generator, error) { + out := new(Generator) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Generators/GetGenerator", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *generatorsClient) CreateGenerator(ctx context.Context, in *CreateGeneratorRequest, opts ...grpc.CallOption) (*Generator, error) { + out := new(Generator) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Generators/CreateGenerator", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *generatorsClient) UpdateGenerator(ctx context.Context, in *UpdateGeneratorRequest, opts ...grpc.CallOption) (*Generator, error) { + out := new(Generator) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Generators/UpdateGenerator", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *generatorsClient) DeleteGenerator(ctx context.Context, in *DeleteGeneratorRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Generators/DeleteGenerator", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// GeneratorsServer is the server API for Generators service. +type GeneratorsServer interface { + // Returns the list of all generators in the specified agent. + ListGenerators(context.Context, *ListGeneratorsRequest) (*ListGeneratorsResponse, error) + // Retrieves the specified generator. + GetGenerator(context.Context, *GetGeneratorRequest) (*Generator, error) + // Creates a generator in the specified agent. + CreateGenerator(context.Context, *CreateGeneratorRequest) (*Generator, error) + // Update the specified generator. + UpdateGenerator(context.Context, *UpdateGeneratorRequest) (*Generator, error) + // Deletes the specified generators. + DeleteGenerator(context.Context, *DeleteGeneratorRequest) (*emptypb.Empty, error) +} + +// UnimplementedGeneratorsServer can be embedded to have forward compatible implementations. +type UnimplementedGeneratorsServer struct { +} + +func (*UnimplementedGeneratorsServer) ListGenerators(context.Context, *ListGeneratorsRequest) (*ListGeneratorsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListGenerators not implemented") +} +func (*UnimplementedGeneratorsServer) GetGenerator(context.Context, *GetGeneratorRequest) (*Generator, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGenerator not implemented") +} +func (*UnimplementedGeneratorsServer) CreateGenerator(context.Context, *CreateGeneratorRequest) (*Generator, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateGenerator not implemented") +} +func (*UnimplementedGeneratorsServer) UpdateGenerator(context.Context, *UpdateGeneratorRequest) (*Generator, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateGenerator not implemented") +} +func (*UnimplementedGeneratorsServer) DeleteGenerator(context.Context, *DeleteGeneratorRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteGenerator not implemented") +} + +func RegisterGeneratorsServer(s *grpc.Server, srv GeneratorsServer) { + s.RegisterService(&_Generators_serviceDesc, srv) +} + +func _Generators_ListGenerators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListGeneratorsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GeneratorsServer).ListGenerators(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Generators/ListGenerators", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GeneratorsServer).ListGenerators(ctx, req.(*ListGeneratorsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Generators_GetGenerator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetGeneratorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GeneratorsServer).GetGenerator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Generators/GetGenerator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GeneratorsServer).GetGenerator(ctx, req.(*GetGeneratorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Generators_CreateGenerator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateGeneratorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GeneratorsServer).CreateGenerator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Generators/CreateGenerator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GeneratorsServer).CreateGenerator(ctx, req.(*CreateGeneratorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Generators_UpdateGenerator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateGeneratorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GeneratorsServer).UpdateGenerator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Generators/UpdateGenerator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GeneratorsServer).UpdateGenerator(ctx, req.(*UpdateGeneratorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Generators_DeleteGenerator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteGeneratorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GeneratorsServer).DeleteGenerator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Generators/DeleteGenerator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GeneratorsServer).DeleteGenerator(ctx, req.(*DeleteGeneratorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Generators_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.dialogflow.cx.v3beta1.Generators", + HandlerType: (*GeneratorsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListGenerators", + Handler: _Generators_ListGenerators_Handler, + }, + { + MethodName: "GetGenerator", + Handler: _Generators_GetGenerator_Handler, + }, + { + MethodName: "CreateGenerator", + Handler: _Generators_CreateGenerator_Handler, + }, + { + MethodName: "UpdateGenerator", + Handler: _Generators_UpdateGenerator_Handler, + }, + { + MethodName: "DeleteGenerator", + Handler: _Generators_DeleteGenerator_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/dialogflow/cx/v3beta1/generator.proto", +} diff --git a/dialogflow/cx/apiv3beta1/gapic_metadata.json b/dialogflow/cx/apiv3beta1/gapic_metadata.json index d583e88f993f..faa19c606ae5 100644 --- a/dialogflow/cx/apiv3beta1/gapic_metadata.json +++ b/dialogflow/cx/apiv3beta1/gapic_metadata.json @@ -913,6 +913,120 @@ } } }, + "Generators": { + "clients": { + "grpc": { + "libraryClient": "GeneratorsClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateGenerator": { + "methods": [ + "CreateGenerator" + ] + }, + "DeleteGenerator": { + "methods": [ + "DeleteGenerator" + ] + }, + "GetGenerator": { + "methods": [ + "GetGenerator" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListGenerators": { + "methods": [ + "ListGenerators" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "UpdateGenerator": { + "methods": [ + "UpdateGenerator" + ] + } + } + }, + "rest": { + "libraryClient": "GeneratorsClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateGenerator": { + "methods": [ + "CreateGenerator" + ] + }, + "DeleteGenerator": { + "methods": [ + "DeleteGenerator" + ] + }, + "GetGenerator": { + "methods": [ + "GetGenerator" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListGenerators": { + "methods": [ + "ListGenerators" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "UpdateGenerator": { + "methods": [ + "UpdateGenerator" + ] + } + } + } + } + }, "Intents": { "clients": { "grpc": { diff --git a/dialogflow/cx/apiv3beta1/generators_client.go b/dialogflow/cx/apiv3beta1/generators_client.go new file mode 100755 index 000000000000..a1627c46f32b --- /dev/null +++ b/dialogflow/cx/apiv3beta1/generators_client.go @@ -0,0 +1,1406 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package cx + +import ( + "bytes" + "context" + "fmt" + "io" + "math" + "net/http" + "net/url" + "time" + + cxpb "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + 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" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newGeneratorsClientHook clientHook + +// GeneratorsCallOptions contains the retry settings for each method of GeneratorsClient. +type GeneratorsCallOptions struct { + ListGenerators []gax.CallOption + GetGenerator []gax.CallOption + CreateGenerator []gax.CallOption + UpdateGenerator []gax.CallOption + DeleteGenerator []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultGeneratorsGRPCClientOptions() []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 defaultGeneratorsCallOptions() *GeneratorsCallOptions { + return &GeneratorsCallOptions{ + ListGenerators: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + 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, + }) + }), + }, + GetGenerator: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + 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, + }) + }), + }, + CreateGenerator: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + 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, + }) + }), + }, + UpdateGenerator: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + 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, + }) + }), + }, + DeleteGenerator: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + 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 defaultGeneratorsRESTCallOptions() *GeneratorsCallOptions { + return &GeneratorsCallOptions{ + ListGenerators: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetGenerator: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + CreateGenerator: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + UpdateGenerator: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + DeleteGenerator: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + 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{}, + } +} + +// internalGeneratorsClient is an interface that defines the methods available from Dialogflow API. +type internalGeneratorsClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + ListGenerators(context.Context, *cxpb.ListGeneratorsRequest, ...gax.CallOption) *GeneratorIterator + GetGenerator(context.Context, *cxpb.GetGeneratorRequest, ...gax.CallOption) (*cxpb.Generator, error) + CreateGenerator(context.Context, *cxpb.CreateGeneratorRequest, ...gax.CallOption) (*cxpb.Generator, error) + UpdateGenerator(context.Context, *cxpb.UpdateGeneratorRequest, ...gax.CallOption) (*cxpb.Generator, error) + DeleteGenerator(context.Context, *cxpb.DeleteGeneratorRequest, ...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 +} + +// GeneratorsClient 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 +// Generators +type GeneratorsClient struct { + // The internal transport-dependent client. + internalClient internalGeneratorsClient + + // The call options for this service. + CallOptions *GeneratorsCallOptions +} + +// 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 *GeneratorsClient) 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 *GeneratorsClient) 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 *GeneratorsClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// ListGenerators returns the list of all generators in the specified agent. +func (c *GeneratorsClient) ListGenerators(ctx context.Context, req *cxpb.ListGeneratorsRequest, opts ...gax.CallOption) *GeneratorIterator { + return c.internalClient.ListGenerators(ctx, req, opts...) +} + +// GetGenerator retrieves the specified generator. +func (c *GeneratorsClient) GetGenerator(ctx context.Context, req *cxpb.GetGeneratorRequest, opts ...gax.CallOption) (*cxpb.Generator, error) { + return c.internalClient.GetGenerator(ctx, req, opts...) +} + +// CreateGenerator creates a generator in the specified agent. +func (c *GeneratorsClient) CreateGenerator(ctx context.Context, req *cxpb.CreateGeneratorRequest, opts ...gax.CallOption) (*cxpb.Generator, error) { + return c.internalClient.CreateGenerator(ctx, req, opts...) +} + +// UpdateGenerator update the specified generator. +func (c *GeneratorsClient) UpdateGenerator(ctx context.Context, req *cxpb.UpdateGeneratorRequest, opts ...gax.CallOption) (*cxpb.Generator, error) { + return c.internalClient.UpdateGenerator(ctx, req, opts...) +} + +// DeleteGenerator deletes the specified generators. +func (c *GeneratorsClient) DeleteGenerator(ctx context.Context, req *cxpb.DeleteGeneratorRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteGenerator(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *GeneratorsClient) 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 *GeneratorsClient) 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 *GeneratorsClient) 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 *GeneratorsClient) 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 *GeneratorsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// generatorsGRPCClient 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 generatorsGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // Points back to the CallOptions field of the containing GeneratorsClient + CallOptions **GeneratorsCallOptions + + // The gRPC API client. + generatorsClient cxpb.GeneratorsClient + + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogHeaders []string +} + +// NewGeneratorsClient creates a new generators 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 +// Generators +func NewGeneratorsClient(ctx context.Context, opts ...option.ClientOption) (*GeneratorsClient, error) { + clientOpts := defaultGeneratorsGRPCClientOptions() + if newGeneratorsClientHook != nil { + hookOpts, err := newGeneratorsClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := GeneratorsClient{CallOptions: defaultGeneratorsCallOptions()} + + c := &generatorsGRPCClient{ + connPool: connPool, + generatorsClient: cxpb.NewGeneratorsClient(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 *generatorsGRPCClient) 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 *generatorsGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", gax.GoVersion}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogHeaders = []string{"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 *generatorsGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type generatorsRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* headers to be sent with each request. + xGoogHeaders []string + + // Points back to the CallOptions field of the containing GeneratorsClient + CallOptions **GeneratorsCallOptions +} + +// NewGeneratorsRESTClient creates a new generators rest client. +// +// Service for managing +// Generators +func NewGeneratorsRESTClient(ctx context.Context, opts ...option.ClientOption) (*GeneratorsClient, error) { + clientOpts := append(defaultGeneratorsRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultGeneratorsRESTCallOptions() + c := &generatorsRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + return &GeneratorsClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultGeneratorsRESTClientOptions() []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 *generatorsRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", gax.GoVersion}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogHeaders = []string{"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 *generatorsRESTClient) 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 *generatorsRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *generatorsGRPCClient) ListGenerators(ctx context.Context, req *cxpb.ListGeneratorsRequest, opts ...gax.CallOption) *GeneratorIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListGenerators[0:len((*c.CallOptions).ListGenerators):len((*c.CallOptions).ListGenerators)], opts...) + it := &GeneratorIterator{} + req = proto.Clone(req).(*cxpb.ListGeneratorsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*cxpb.Generator, string, error) { + resp := &cxpb.ListGeneratorsResponse{} + 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.generatorsClient.ListGenerators(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetGenerators(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + 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 *generatorsGRPCClient) GetGenerator(ctx context.Context, req *cxpb.GetGeneratorRequest, opts ...gax.CallOption) (*cxpb.Generator, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetGenerator[0:len((*c.CallOptions).GetGenerator):len((*c.CallOptions).GetGenerator)], opts...) + var resp *cxpb.Generator + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.generatorsClient.GetGenerator(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *generatorsGRPCClient) CreateGenerator(ctx context.Context, req *cxpb.CreateGeneratorRequest, opts ...gax.CallOption) (*cxpb.Generator, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).CreateGenerator[0:len((*c.CallOptions).CreateGenerator):len((*c.CallOptions).CreateGenerator)], opts...) + var resp *cxpb.Generator + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.generatorsClient.CreateGenerator(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *generatorsGRPCClient) UpdateGenerator(ctx context.Context, req *cxpb.UpdateGeneratorRequest, opts ...gax.CallOption) (*cxpb.Generator, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "generator.name", url.QueryEscape(req.GetGenerator().GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).UpdateGenerator[0:len((*c.CallOptions).UpdateGenerator):len((*c.CallOptions).UpdateGenerator)], opts...) + var resp *cxpb.Generator + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.generatorsClient.UpdateGenerator(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *generatorsGRPCClient) DeleteGenerator(ctx context.Context, req *cxpb.DeleteGeneratorRequest, opts ...gax.CallOption) error { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).DeleteGenerator[0:len((*c.CallOptions).DeleteGenerator):len((*c.CallOptions).DeleteGenerator)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.generatorsClient.DeleteGenerator(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *generatorsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + 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 *generatorsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + 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 *generatorsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + 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 *generatorsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + 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 *generatorsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + 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 +} + +// ListGenerators returns the list of all generators in the specified agent. +func (c *generatorsRESTClient) ListGenerators(ctx context.Context, req *cxpb.ListGeneratorsRequest, opts ...gax.CallOption) *GeneratorIterator { + it := &GeneratorIterator{} + req = proto.Clone(req).(*cxpb.ListGeneratorsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*cxpb.Generator, string, error) { + resp := &cxpb.ListGeneratorsResponse{} + 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("/v3beta1/%v/generators", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + 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. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings 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 := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetGenerators(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetGenerator retrieves the specified generator. +func (c *generatorsRESTClient) GetGenerator(ctx context.Context, req *cxpb.GetGeneratorRequest, opts ...gax.CallOption) (*cxpb.Generator, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v3beta1/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetLanguageCode() != "" { + params.Add("languageCode", fmt.Sprintf("%v", req.GetLanguageCode())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetGenerator[0:len((*c.CallOptions).GetGenerator):len((*c.CallOptions).GetGenerator)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &cxpb.Generator{} + e := gax.Invoke(ctx, func(ctx context.Context, settings 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 := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateGenerator creates a generator in the specified agent. +func (c *generatorsRESTClient) CreateGenerator(ctx context.Context, req *cxpb.CreateGeneratorRequest, opts ...gax.CallOption) (*cxpb.Generator, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetGenerator() + 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("/v3beta1/%v/generators", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetLanguageCode() != "" { + params.Add("languageCode", fmt.Sprintf("%v", req.GetLanguageCode())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).CreateGenerator[0:len((*c.CallOptions).CreateGenerator):len((*c.CallOptions).CreateGenerator)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &cxpb.Generator{} + 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 := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateGenerator update the specified generator. +func (c *generatorsRESTClient) UpdateGenerator(ctx context.Context, req *cxpb.UpdateGeneratorRequest, opts ...gax.CallOption) (*cxpb.Generator, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetGenerator() + 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("/v3beta1/%v", req.GetGenerator().GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + 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[1:len(updateMask)-1])) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "generator.name", url.QueryEscape(req.GetGenerator().GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).UpdateGenerator[0:len((*c.CallOptions).UpdateGenerator):len((*c.CallOptions).UpdateGenerator)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &cxpb.Generator{} + 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 := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteGenerator deletes the specified generators. +func (c *generatorsRESTClient) DeleteGenerator(ctx context.Context, req *cxpb.DeleteGeneratorRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v3beta1/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetForce() { + params.Add("force", fmt.Sprintf("%v", req.GetForce())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + 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 *generatorsRESTClient) 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("/v3beta1/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + 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 := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return 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 *generatorsRESTClient) 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("/v3beta1/%v/locations", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + 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. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings 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 := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return 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 *generatorsRESTClient) 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("/v3beta1/%v:cancel", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + 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 *generatorsRESTClient) 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("/v3beta1/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + 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 := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *generatorsRESTClient) 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("/v3beta1/%v/operations", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + 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. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings 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 := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return 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/cx/apiv3beta1/generators_client_example_test.go b/dialogflow/cx/apiv3beta1/generators_client_example_test.go new file mode 100644 index 000000000000..f107d205d42f --- /dev/null +++ b/dialogflow/cx/apiv3beta1/generators_client_example_test.go @@ -0,0 +1,325 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package cx_test + +import ( + "context" + + cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" + cxpb "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func ExampleNewGeneratorsClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require 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.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewGeneratorsRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require 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.NewGeneratorsRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleGeneratorsClient_CreateGenerator() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require 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.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &cxpb.CreateGeneratorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb#CreateGeneratorRequest. + } + resp, err := c.CreateGenerator(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleGeneratorsClient_DeleteGenerator() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require 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.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &cxpb.DeleteGeneratorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb#DeleteGeneratorRequest. + } + err = c.DeleteGenerator(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleGeneratorsClient_GetGenerator() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require 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.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &cxpb.GetGeneratorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb#GetGeneratorRequest. + } + resp, err := c.GetGenerator(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleGeneratorsClient_ListGenerators() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require 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.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &cxpb.ListGeneratorsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb#ListGeneratorsRequest. + } + it := c.ListGenerators(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleGeneratorsClient_UpdateGenerator() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require 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.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &cxpb.UpdateGeneratorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb#UpdateGeneratorRequest. + } + resp, err := c.UpdateGenerator(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleGeneratorsClient_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.NewGeneratorsClient(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 ExampleGeneratorsClient_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.NewGeneratorsClient(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 ExampleGeneratorsClient_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.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleGeneratorsClient_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.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleGeneratorsClient_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.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#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/internal/version.go b/dialogflow/internal/version.go index e3f747054984..fc6b11e22267 100644 --- a/dialogflow/internal/version.go +++ b/dialogflow/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.45.0" +const Version = "1.46.0" diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/PredictionClient/DirectPredict/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/PredictionClient/DirectPredict/main.go new file mode 100644 index 000000000000..e55f28ece34d --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/PredictionClient/DirectPredict/main.go @@ -0,0 +1,53 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START aiplatform_v1beta1_generated_PredictionService_DirectPredict_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + aiplatformpb "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewPredictionClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.DirectPredictRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#DirectPredictRequest. + } + resp, err := c.DirectPredict(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1beta1_generated_PredictionService_DirectPredict_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/PredictionClient/DirectRawPredict/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/PredictionClient/DirectRawPredict/main.go new file mode 100644 index 000000000000..9cf836df61b8 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/PredictionClient/DirectRawPredict/main.go @@ -0,0 +1,53 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START aiplatform_v1beta1_generated_PredictionService_DirectRawPredict_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + aiplatformpb "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewPredictionClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.DirectRawPredictRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#DirectRawPredictRequest. + } + resp, err := c.DirectRawPredict(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1beta1_generated_PredictionService_DirectRawPredict_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/PredictionClient/StreamingPredict/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/PredictionClient/StreamingPredict/main.go new file mode 100644 index 000000000000..685fa7a6603f --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/PredictionClient/StreamingPredict/main.go @@ -0,0 +1,69 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START aiplatform_v1beta1_generated_PredictionService_StreamingPredict_sync] + +package main + +import ( + "context" + "io" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + aiplatformpb "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewPredictionClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + stream, err := c.StreamingPredict(ctx) + if err != nil { + // TODO: Handle error. + } + go func() { + reqs := []*aiplatformpb.StreamingPredictRequest{ + // TODO: Create requests. + } + for _, req := range reqs { + if err := stream.Send(req); err != nil { + // TODO: Handle error. + } + } + stream.CloseSend() + }() + for { + resp, err := stream.Recv() + if err == io.EOF { + break + } + if err != nil { + // TODO: handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END aiplatform_v1beta1_generated_PredictionService_StreamingPredict_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/PredictionClient/StreamingRawPredict/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/PredictionClient/StreamingRawPredict/main.go new file mode 100644 index 000000000000..b2c0f48f6549 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/PredictionClient/StreamingRawPredict/main.go @@ -0,0 +1,69 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START aiplatform_v1beta1_generated_PredictionService_StreamingRawPredict_sync] + +package main + +import ( + "context" + "io" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + aiplatformpb "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewPredictionClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + stream, err := c.StreamingRawPredict(ctx) + if err != nil { + // TODO: Handle error. + } + go func() { + reqs := []*aiplatformpb.StreamingRawPredictRequest{ + // TODO: Create requests. + } + for _, req := range reqs { + if err := stream.Send(req); err != nil { + // TODO: Handle error. + } + } + stream.CloseSend() + }() + for { + resp, err := stream.Recv() + if err == io.EOF { + break + } + if err != nil { + // TODO: handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END aiplatform_v1beta1_generated_PredictionService_StreamingRawPredict_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json b/internal/generated/snippets/aiplatform/apiv1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json index fc8c3edc60cb..a73b9d728ed6 100644 --- a/internal/generated/snippets/aiplatform/apiv1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json +++ b/internal/generated/snippets/aiplatform/apiv1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json @@ -18132,6 +18132,98 @@ } ] }, + { + "regionTag": "aiplatform_v1beta1_generated_PredictionService_DirectPredict_sync", + "title": "aiplatform DirectPredict Sample", + "description": "DirectPredict perform an unary online prediction request for Vertex first-party products\nand frameworks.", + "file": "PredictionClient/DirectPredict/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DirectPredict", + "fullName": "google.cloud.aiplatform.v1beta1.PredictionClient.DirectPredict", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "aiplatformpb.DirectPredictRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*aiplatformpb.DirectPredictResponse", + "client": { + "shortName": "PredictionClient", + "fullName": "google.cloud.aiplatform.v1beta1.PredictionClient" + }, + "method": { + "shortName": "DirectPredict", + "fullName": "google.cloud.aiplatform.v1beta1.PredictionService.DirectPredict", + "service": { + "shortName": "PredictionService", + "fullName": "google.cloud.aiplatform.v1beta1.PredictionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "aiplatform_v1beta1_generated_PredictionService_DirectRawPredict_sync", + "title": "aiplatform DirectRawPredict Sample", + "description": "DirectRawPredict perform an online prediction request through gRPC.", + "file": "PredictionClient/DirectRawPredict/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DirectRawPredict", + "fullName": "google.cloud.aiplatform.v1beta1.PredictionClient.DirectRawPredict", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "aiplatformpb.DirectRawPredictRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*aiplatformpb.DirectRawPredictResponse", + "client": { + "shortName": "PredictionClient", + "fullName": "google.cloud.aiplatform.v1beta1.PredictionClient" + }, + "method": { + "shortName": "DirectRawPredict", + "fullName": "google.cloud.aiplatform.v1beta1.PredictionService.DirectRawPredict", + "service": { + "shortName": "PredictionService", + "fullName": "google.cloud.aiplatform.v1beta1.PredictionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, { "regionTag": "aiplatform_v1beta1_generated_PredictionService_Explain_sync", "title": "aiplatform Explain Sample", @@ -18546,6 +18638,90 @@ } ] }, + { + "regionTag": "aiplatform_v1beta1_generated_PredictionService_StreamingPredict_sync", + "title": "aiplatform StreamingPredict Sample", + "description": "StreamingPredict perform a streaming online prediction request for Vertex first-party\nproducts and frameworks.\n\n\nThis method is not supported for the REST transport.", + "file": "PredictionClient/StreamingPredict/main.go", + "language": "GO", + "clientMethod": { + "shortName": "StreamingPredict", + "fullName": "google.cloud.aiplatform.v1beta1.PredictionClient.StreamingPredict", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "aiplatformpb.PredictionService_StreamingPredictClient", + "client": { + "shortName": "PredictionClient", + "fullName": "google.cloud.aiplatform.v1beta1.PredictionClient" + }, + "method": { + "shortName": "StreamingPredict", + "fullName": "google.cloud.aiplatform.v1beta1.PredictionService.StreamingPredict", + "service": { + "shortName": "PredictionService", + "fullName": "google.cloud.aiplatform.v1beta1.PredictionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 69, + "type": "FULL" + } + ] + }, + { + "regionTag": "aiplatform_v1beta1_generated_PredictionService_StreamingRawPredict_sync", + "title": "aiplatform StreamingRawPredict Sample", + "description": "StreamingRawPredict perform a streaming online prediction request through gRPC.\n\n\nThis method is not supported for the REST transport.", + "file": "PredictionClient/StreamingRawPredict/main.go", + "language": "GO", + "clientMethod": { + "shortName": "StreamingRawPredict", + "fullName": "google.cloud.aiplatform.v1beta1.PredictionClient.StreamingRawPredict", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "aiplatformpb.PredictionService_StreamingRawPredictClient", + "client": { + "shortName": "PredictionClient", + "fullName": "google.cloud.aiplatform.v1beta1.PredictionClient" + }, + "method": { + "shortName": "StreamingRawPredict", + "fullName": "google.cloud.aiplatform.v1beta1.PredictionService.StreamingRawPredict", + "service": { + "shortName": "PredictionService", + "fullName": "google.cloud.aiplatform.v1beta1.PredictionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 69, + "type": "FULL" + } + ] + }, { "regionTag": "aiplatform_v1beta1_generated_PredictionService_TestIamPermissions_sync", "title": "aiplatform TestIamPermissions Sample", diff --git a/internal/generated/snippets/binaryauthorization/apiv1/snippet_metadata.google.cloud.binaryauthorization.v1.json b/internal/generated/snippets/binaryauthorization/apiv1/snippet_metadata.google.cloud.binaryauthorization.v1.json index c92c8e2c9002..8307f3240642 100644 --- a/internal/generated/snippets/binaryauthorization/apiv1/snippet_metadata.google.cloud.binaryauthorization.v1.json +++ b/internal/generated/snippets/binaryauthorization/apiv1/snippet_metadata.google.cloud.binaryauthorization.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/binaryauthorization/apiv1", - "version": "1.7.3", + "version": "1.8.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/binaryauthorization/apiv1beta1/snippet_metadata.google.cloud.binaryauthorization.v1beta1.json b/internal/generated/snippets/binaryauthorization/apiv1beta1/snippet_metadata.google.cloud.binaryauthorization.v1beta1.json index 8263bac525fc..36f0636af5ac 100644 --- a/internal/generated/snippets/binaryauthorization/apiv1beta1/snippet_metadata.google.cloud.binaryauthorization.v1beta1.json +++ b/internal/generated/snippets/binaryauthorization/apiv1beta1/snippet_metadata.google.cloud.binaryauthorization.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/binaryauthorization/apiv1beta1", - "version": "1.7.3", + "version": "1.8.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/dialogflow/apiv2/snippet_metadata.google.cloud.dialogflow.v2.json b/internal/generated/snippets/dialogflow/apiv2/snippet_metadata.google.cloud.dialogflow.v2.json index 5624798957d2..dd9bf5cc823a 100644 --- a/internal/generated/snippets/dialogflow/apiv2/snippet_metadata.google.cloud.dialogflow.v2.json +++ b/internal/generated/snippets/dialogflow/apiv2/snippet_metadata.google.cloud.dialogflow.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/dialogflow/apiv2", - "version": "1.45.0", + "version": "1.46.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/dialogflow/apiv2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json b/internal/generated/snippets/dialogflow/apiv2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json index 1774ba454fb5..e27f24cfeb11 100644 --- a/internal/generated/snippets/dialogflow/apiv2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json +++ b/internal/generated/snippets/dialogflow/apiv2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/dialogflow/apiv2beta1", - "version": "1.45.0", + "version": "1.46.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/CancelOperation/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/CancelOperation/main.go new file mode 100644 index 000000000000..d4d86d1dbcf7 --- /dev/null +++ b/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/CancelOperation/main.go @@ -0,0 +1,51 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START dialogflow_v3_generated_Generators_CancelOperation_sync] + +package main + +import ( + "context" + + cx "cloud.google.com/go/dialogflow/cx/apiv3" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := cx.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END dialogflow_v3_generated_Generators_CancelOperation_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/CreateGenerator/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/CreateGenerator/main.go new file mode 100644 index 000000000000..5b89a8caccef --- /dev/null +++ b/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/CreateGenerator/main.go @@ -0,0 +1,53 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START dialogflow_v3_generated_Generators_CreateGenerator_sync] + +package main + +import ( + "context" + + cx "cloud.google.com/go/dialogflow/cx/apiv3" + cxpb "cloud.google.com/go/dialogflow/cx/apiv3/cxpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := cx.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &cxpb.CreateGeneratorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/dialogflow/cx/apiv3/cxpb#CreateGeneratorRequest. + } + resp, err := c.CreateGenerator(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END dialogflow_v3_generated_Generators_CreateGenerator_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/DeleteGenerator/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/DeleteGenerator/main.go new file mode 100644 index 000000000000..a740f3b74fd8 --- /dev/null +++ b/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/DeleteGenerator/main.go @@ -0,0 +1,51 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START dialogflow_v3_generated_Generators_DeleteGenerator_sync] + +package main + +import ( + "context" + + cx "cloud.google.com/go/dialogflow/cx/apiv3" + cxpb "cloud.google.com/go/dialogflow/cx/apiv3/cxpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := cx.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &cxpb.DeleteGeneratorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/dialogflow/cx/apiv3/cxpb#DeleteGeneratorRequest. + } + err = c.DeleteGenerator(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END dialogflow_v3_generated_Generators_DeleteGenerator_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/GetGenerator/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/GetGenerator/main.go new file mode 100644 index 000000000000..7db82899856c --- /dev/null +++ b/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/GetGenerator/main.go @@ -0,0 +1,53 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START dialogflow_v3_generated_Generators_GetGenerator_sync] + +package main + +import ( + "context" + + cx "cloud.google.com/go/dialogflow/cx/apiv3" + cxpb "cloud.google.com/go/dialogflow/cx/apiv3/cxpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := cx.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &cxpb.GetGeneratorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/dialogflow/cx/apiv3/cxpb#GetGeneratorRequest. + } + resp, err := c.GetGenerator(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END dialogflow_v3_generated_Generators_GetGenerator_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/GetLocation/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/GetLocation/main.go new file mode 100644 index 000000000000..7e425cba6b08 --- /dev/null +++ b/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/GetLocation/main.go @@ -0,0 +1,53 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START dialogflow_v3_generated_Generators_GetLocation_sync] + +package main + +import ( + "context" + + cx "cloud.google.com/go/dialogflow/cx/apiv3" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := cx.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END dialogflow_v3_generated_Generators_GetLocation_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/GetOperation/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/GetOperation/main.go new file mode 100644 index 000000000000..4f64758dc4d5 --- /dev/null +++ b/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/GetOperation/main.go @@ -0,0 +1,53 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START dialogflow_v3_generated_Generators_GetOperation_sync] + +package main + +import ( + "context" + + cx "cloud.google.com/go/dialogflow/cx/apiv3" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := cx.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END dialogflow_v3_generated_Generators_GetOperation_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/ListGenerators/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/ListGenerators/main.go new file mode 100644 index 000000000000..8064e84771a4 --- /dev/null +++ b/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/ListGenerators/main.go @@ -0,0 +1,60 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START dialogflow_v3_generated_Generators_ListGenerators_sync] + +package main + +import ( + "context" + + cx "cloud.google.com/go/dialogflow/cx/apiv3" + cxpb "cloud.google.com/go/dialogflow/cx/apiv3/cxpb" + "google.golang.org/api/iterator" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := cx.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &cxpb.ListGeneratorsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/dialogflow/cx/apiv3/cxpb#ListGeneratorsRequest. + } + it := c.ListGenerators(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END dialogflow_v3_generated_Generators_ListGenerators_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/ListLocations/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/ListLocations/main.go new file mode 100644 index 000000000000..ed929b551604 --- /dev/null +++ b/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/ListLocations/main.go @@ -0,0 +1,60 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START dialogflow_v3_generated_Generators_ListLocations_sync] + +package main + +import ( + "context" + + cx "cloud.google.com/go/dialogflow/cx/apiv3" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := cx.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END dialogflow_v3_generated_Generators_ListLocations_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/ListOperations/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/ListOperations/main.go new file mode 100644 index 000000000000..b587436c4df5 --- /dev/null +++ b/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/ListOperations/main.go @@ -0,0 +1,60 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START dialogflow_v3_generated_Generators_ListOperations_sync] + +package main + +import ( + "context" + + cx "cloud.google.com/go/dialogflow/cx/apiv3" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + "google.golang.org/api/iterator" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := cx.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END dialogflow_v3_generated_Generators_ListOperations_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/UpdateGenerator/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/UpdateGenerator/main.go new file mode 100644 index 000000000000..b88309f9cef6 --- /dev/null +++ b/internal/generated/snippets/dialogflow/cx/apiv3/GeneratorsClient/UpdateGenerator/main.go @@ -0,0 +1,53 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START dialogflow_v3_generated_Generators_UpdateGenerator_sync] + +package main + +import ( + "context" + + cx "cloud.google.com/go/dialogflow/cx/apiv3" + cxpb "cloud.google.com/go/dialogflow/cx/apiv3/cxpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := cx.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &cxpb.UpdateGeneratorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/dialogflow/cx/apiv3/cxpb#UpdateGeneratorRequest. + } + resp, err := c.UpdateGenerator(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END dialogflow_v3_generated_Generators_UpdateGenerator_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/snippet_metadata.google.cloud.dialogflow.cx.v3.json b/internal/generated/snippets/dialogflow/cx/apiv3/snippet_metadata.google.cloud.dialogflow.cx.v3.json index 4ca0792f8ede..a49ffa362210 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/snippet_metadata.google.cloud.dialogflow.cx.v3.json +++ b/internal/generated/snippets/dialogflow/cx/apiv3/snippet_metadata.google.cloud.dialogflow.cx.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/dialogflow/cx/apiv3", - "version": "1.45.0", + "version": "1.46.0", "language": "GO", "apis": [ { @@ -3725,6 +3725,464 @@ } ] }, + { + "regionTag": "dialogflow_v3_generated_Generators_CancelOperation_sync", + "title": "dialogflow CancelOperation Sample", + "description": "CancelOperation is a utility method from google.longrunning.Operations.", + "file": "GeneratorsClient/CancelOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CancelOperation", + "fullName": "google.cloud.dialogflow.cx.v3.GeneratorsClient.CancelOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.CancelOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3.GeneratorsClient" + }, + "method": { + "shortName": "CancelOperation", + "fullName": "google.longrunning.Operations.CancelOperation", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 51, + "type": "FULL" + } + ] + }, + { + "regionTag": "dialogflow_v3_generated_Generators_CreateGenerator_sync", + "title": "dialogflow CreateGenerator Sample", + "description": "CreateGenerator creates a generator in the specified agent.", + "file": "GeneratorsClient/CreateGenerator/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CreateGenerator", + "fullName": "google.cloud.dialogflow.cx.v3.GeneratorsClient.CreateGenerator", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "cxpb.CreateGeneratorRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*cxpb.Generator", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3.GeneratorsClient" + }, + "method": { + "shortName": "CreateGenerator", + "fullName": "google.cloud.dialogflow.cx.v3.Generators.CreateGenerator", + "service": { + "shortName": "Generators", + "fullName": "google.cloud.dialogflow.cx.v3.Generators" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "dialogflow_v3_generated_Generators_DeleteGenerator_sync", + "title": "dialogflow DeleteGenerator Sample", + "description": "DeleteGenerator deletes the specified generators.", + "file": "GeneratorsClient/DeleteGenerator/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteGenerator", + "fullName": "google.cloud.dialogflow.cx.v3.GeneratorsClient.DeleteGenerator", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "cxpb.DeleteGeneratorRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3.GeneratorsClient" + }, + "method": { + "shortName": "DeleteGenerator", + "fullName": "google.cloud.dialogflow.cx.v3.Generators.DeleteGenerator", + "service": { + "shortName": "Generators", + "fullName": "google.cloud.dialogflow.cx.v3.Generators" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 51, + "type": "FULL" + } + ] + }, + { + "regionTag": "dialogflow_v3_generated_Generators_GetGenerator_sync", + "title": "dialogflow GetGenerator Sample", + "description": "GetGenerator retrieves the specified generator.", + "file": "GeneratorsClient/GetGenerator/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetGenerator", + "fullName": "google.cloud.dialogflow.cx.v3.GeneratorsClient.GetGenerator", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "cxpb.GetGeneratorRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*cxpb.Generator", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3.GeneratorsClient" + }, + "method": { + "shortName": "GetGenerator", + "fullName": "google.cloud.dialogflow.cx.v3.Generators.GetGenerator", + "service": { + "shortName": "Generators", + "fullName": "google.cloud.dialogflow.cx.v3.Generators" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "dialogflow_v3_generated_Generators_GetLocation_sync", + "title": "dialogflow GetLocation Sample", + "description": "GetLocation gets information about a location.", + "file": "GeneratorsClient/GetLocation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetLocation", + "fullName": "google.cloud.dialogflow.cx.v3.GeneratorsClient.GetLocation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.GetLocationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*locationpb.Location", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3.GeneratorsClient" + }, + "method": { + "shortName": "GetLocation", + "fullName": "google.cloud.location.Locations.GetLocation", + "service": { + "shortName": "Locations", + "fullName": "google.cloud.location.Locations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "dialogflow_v3_generated_Generators_GetOperation_sync", + "title": "dialogflow GetOperation Sample", + "description": "GetOperation is a utility method from google.longrunning.Operations.", + "file": "GeneratorsClient/GetOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetOperation", + "fullName": "google.cloud.dialogflow.cx.v3.GeneratorsClient.GetOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.GetOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*longrunningpb.Operation", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3.GeneratorsClient" + }, + "method": { + "shortName": "GetOperation", + "fullName": "google.longrunning.Operations.GetOperation", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "dialogflow_v3_generated_Generators_ListGenerators_sync", + "title": "dialogflow ListGenerators Sample", + "description": "ListGenerators returns the list of all generators in the specified agent.", + "file": "GeneratorsClient/ListGenerators/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListGenerators", + "fullName": "google.cloud.dialogflow.cx.v3.GeneratorsClient.ListGenerators", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "cxpb.ListGeneratorsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "GeneratorIterator", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3.GeneratorsClient" + }, + "method": { + "shortName": "ListGenerators", + "fullName": "google.cloud.dialogflow.cx.v3.Generators.ListGenerators", + "service": { + "shortName": "Generators", + "fullName": "google.cloud.dialogflow.cx.v3.Generators" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 60, + "type": "FULL" + } + ] + }, + { + "regionTag": "dialogflow_v3_generated_Generators_ListLocations_sync", + "title": "dialogflow ListLocations Sample", + "description": "ListLocations lists information about the supported locations for this service.", + "file": "GeneratorsClient/ListLocations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListLocations", + "fullName": "google.cloud.dialogflow.cx.v3.GeneratorsClient.ListLocations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.ListLocationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "LocationIterator", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3.GeneratorsClient" + }, + "method": { + "shortName": "ListLocations", + "fullName": "google.cloud.location.Locations.ListLocations", + "service": { + "shortName": "Locations", + "fullName": "google.cloud.location.Locations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 60, + "type": "FULL" + } + ] + }, + { + "regionTag": "dialogflow_v3_generated_Generators_ListOperations_sync", + "title": "dialogflow ListOperations Sample", + "description": "ListOperations is a utility method from google.longrunning.Operations.", + "file": "GeneratorsClient/ListOperations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListOperations", + "fullName": "google.cloud.dialogflow.cx.v3.GeneratorsClient.ListOperations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.ListOperationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "OperationIterator", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3.GeneratorsClient" + }, + "method": { + "shortName": "ListOperations", + "fullName": "google.longrunning.Operations.ListOperations", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 60, + "type": "FULL" + } + ] + }, + { + "regionTag": "dialogflow_v3_generated_Generators_UpdateGenerator_sync", + "title": "dialogflow UpdateGenerator Sample", + "description": "UpdateGenerator update the specified generator.", + "file": "GeneratorsClient/UpdateGenerator/main.go", + "language": "GO", + "clientMethod": { + "shortName": "UpdateGenerator", + "fullName": "google.cloud.dialogflow.cx.v3.GeneratorsClient.UpdateGenerator", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "cxpb.UpdateGeneratorRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*cxpb.Generator", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3.GeneratorsClient" + }, + "method": { + "shortName": "UpdateGenerator", + "fullName": "google.cloud.dialogflow.cx.v3.Generators.UpdateGenerator", + "service": { + "shortName": "Generators", + "fullName": "google.cloud.dialogflow.cx.v3.Generators" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, { "regionTag": "dialogflow_v3_generated_Intents_CancelOperation_sync", "title": "dialogflow CancelOperation Sample", diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/CancelOperation/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/CancelOperation/main.go new file mode 100644 index 000000000000..e3d7a4d1b15b --- /dev/null +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/CancelOperation/main.go @@ -0,0 +1,51 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START dialogflow_v3beta1_generated_Generators_CancelOperation_sync] + +package main + +import ( + "context" + + cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := cx.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END dialogflow_v3beta1_generated_Generators_CancelOperation_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/CreateGenerator/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/CreateGenerator/main.go new file mode 100644 index 000000000000..ad0bf048ab88 --- /dev/null +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/CreateGenerator/main.go @@ -0,0 +1,53 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START dialogflow_v3beta1_generated_Generators_CreateGenerator_sync] + +package main + +import ( + "context" + + cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" + cxpb "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := cx.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &cxpb.CreateGeneratorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb#CreateGeneratorRequest. + } + resp, err := c.CreateGenerator(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END dialogflow_v3beta1_generated_Generators_CreateGenerator_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/DeleteGenerator/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/DeleteGenerator/main.go new file mode 100644 index 000000000000..eef25aedd2cd --- /dev/null +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/DeleteGenerator/main.go @@ -0,0 +1,51 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START dialogflow_v3beta1_generated_Generators_DeleteGenerator_sync] + +package main + +import ( + "context" + + cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" + cxpb "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := cx.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &cxpb.DeleteGeneratorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb#DeleteGeneratorRequest. + } + err = c.DeleteGenerator(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END dialogflow_v3beta1_generated_Generators_DeleteGenerator_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/GetGenerator/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/GetGenerator/main.go new file mode 100644 index 000000000000..1ca1c29d1f29 --- /dev/null +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/GetGenerator/main.go @@ -0,0 +1,53 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START dialogflow_v3beta1_generated_Generators_GetGenerator_sync] + +package main + +import ( + "context" + + cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" + cxpb "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := cx.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &cxpb.GetGeneratorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb#GetGeneratorRequest. + } + resp, err := c.GetGenerator(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END dialogflow_v3beta1_generated_Generators_GetGenerator_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/GetLocation/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/GetLocation/main.go new file mode 100644 index 000000000000..c5cf947b570b --- /dev/null +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/GetLocation/main.go @@ -0,0 +1,53 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START dialogflow_v3beta1_generated_Generators_GetLocation_sync] + +package main + +import ( + "context" + + cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := cx.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END dialogflow_v3beta1_generated_Generators_GetLocation_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/GetOperation/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/GetOperation/main.go new file mode 100644 index 000000000000..0278b90623ef --- /dev/null +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/GetOperation/main.go @@ -0,0 +1,53 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START dialogflow_v3beta1_generated_Generators_GetOperation_sync] + +package main + +import ( + "context" + + cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := cx.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END dialogflow_v3beta1_generated_Generators_GetOperation_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/ListGenerators/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/ListGenerators/main.go new file mode 100644 index 000000000000..d695f372f957 --- /dev/null +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/ListGenerators/main.go @@ -0,0 +1,60 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START dialogflow_v3beta1_generated_Generators_ListGenerators_sync] + +package main + +import ( + "context" + + cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" + cxpb "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb" + "google.golang.org/api/iterator" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := cx.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &cxpb.ListGeneratorsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb#ListGeneratorsRequest. + } + it := c.ListGenerators(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END dialogflow_v3beta1_generated_Generators_ListGenerators_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/ListLocations/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/ListLocations/main.go new file mode 100644 index 000000000000..29a69ba79f3f --- /dev/null +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/ListLocations/main.go @@ -0,0 +1,60 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START dialogflow_v3beta1_generated_Generators_ListLocations_sync] + +package main + +import ( + "context" + + cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := cx.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END dialogflow_v3beta1_generated_Generators_ListLocations_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/ListOperations/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/ListOperations/main.go new file mode 100644 index 000000000000..95e3e3ae9b32 --- /dev/null +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/ListOperations/main.go @@ -0,0 +1,60 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START dialogflow_v3beta1_generated_Generators_ListOperations_sync] + +package main + +import ( + "context" + + cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + "google.golang.org/api/iterator" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := cx.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END dialogflow_v3beta1_generated_Generators_ListOperations_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/UpdateGenerator/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/UpdateGenerator/main.go new file mode 100644 index 000000000000..de5e586ce6e4 --- /dev/null +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/GeneratorsClient/UpdateGenerator/main.go @@ -0,0 +1,53 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START dialogflow_v3beta1_generated_Generators_UpdateGenerator_sync] + +package main + +import ( + "context" + + cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" + cxpb "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := cx.NewGeneratorsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &cxpb.UpdateGeneratorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb#UpdateGeneratorRequest. + } + resp, err := c.UpdateGenerator(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END dialogflow_v3beta1_generated_Generators_UpdateGenerator_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json b/internal/generated/snippets/dialogflow/cx/apiv3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json index 4bc2dce22efb..c4110f886ef8 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/dialogflow/cx/apiv3beta1", - "version": "1.45.0", + "version": "1.46.0", "language": "GO", "apis": [ { @@ -3725,6 +3725,464 @@ } ] }, + { + "regionTag": "dialogflow_v3beta1_generated_Generators_CancelOperation_sync", + "title": "dialogflow CancelOperation Sample", + "description": "CancelOperation is a utility method from google.longrunning.Operations.", + "file": "GeneratorsClient/CancelOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CancelOperation", + "fullName": "google.cloud.dialogflow.cx.v3beta1.GeneratorsClient.CancelOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.CancelOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3beta1.GeneratorsClient" + }, + "method": { + "shortName": "CancelOperation", + "fullName": "google.longrunning.Operations.CancelOperation", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 51, + "type": "FULL" + } + ] + }, + { + "regionTag": "dialogflow_v3beta1_generated_Generators_CreateGenerator_sync", + "title": "dialogflow CreateGenerator Sample", + "description": "CreateGenerator creates a generator in the specified agent.", + "file": "GeneratorsClient/CreateGenerator/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CreateGenerator", + "fullName": "google.cloud.dialogflow.cx.v3beta1.GeneratorsClient.CreateGenerator", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "cxpb.CreateGeneratorRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*cxpb.Generator", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3beta1.GeneratorsClient" + }, + "method": { + "shortName": "CreateGenerator", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Generators.CreateGenerator", + "service": { + "shortName": "Generators", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Generators" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "dialogflow_v3beta1_generated_Generators_DeleteGenerator_sync", + "title": "dialogflow DeleteGenerator Sample", + "description": "DeleteGenerator deletes the specified generators.", + "file": "GeneratorsClient/DeleteGenerator/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteGenerator", + "fullName": "google.cloud.dialogflow.cx.v3beta1.GeneratorsClient.DeleteGenerator", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "cxpb.DeleteGeneratorRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3beta1.GeneratorsClient" + }, + "method": { + "shortName": "DeleteGenerator", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Generators.DeleteGenerator", + "service": { + "shortName": "Generators", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Generators" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 51, + "type": "FULL" + } + ] + }, + { + "regionTag": "dialogflow_v3beta1_generated_Generators_GetGenerator_sync", + "title": "dialogflow GetGenerator Sample", + "description": "GetGenerator retrieves the specified generator.", + "file": "GeneratorsClient/GetGenerator/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetGenerator", + "fullName": "google.cloud.dialogflow.cx.v3beta1.GeneratorsClient.GetGenerator", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "cxpb.GetGeneratorRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*cxpb.Generator", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3beta1.GeneratorsClient" + }, + "method": { + "shortName": "GetGenerator", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Generators.GetGenerator", + "service": { + "shortName": "Generators", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Generators" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "dialogflow_v3beta1_generated_Generators_GetLocation_sync", + "title": "dialogflow GetLocation Sample", + "description": "GetLocation gets information about a location.", + "file": "GeneratorsClient/GetLocation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetLocation", + "fullName": "google.cloud.dialogflow.cx.v3beta1.GeneratorsClient.GetLocation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.GetLocationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*locationpb.Location", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3beta1.GeneratorsClient" + }, + "method": { + "shortName": "GetLocation", + "fullName": "google.cloud.location.Locations.GetLocation", + "service": { + "shortName": "Locations", + "fullName": "google.cloud.location.Locations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "dialogflow_v3beta1_generated_Generators_GetOperation_sync", + "title": "dialogflow GetOperation Sample", + "description": "GetOperation is a utility method from google.longrunning.Operations.", + "file": "GeneratorsClient/GetOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetOperation", + "fullName": "google.cloud.dialogflow.cx.v3beta1.GeneratorsClient.GetOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.GetOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*longrunningpb.Operation", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3beta1.GeneratorsClient" + }, + "method": { + "shortName": "GetOperation", + "fullName": "google.longrunning.Operations.GetOperation", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "dialogflow_v3beta1_generated_Generators_ListGenerators_sync", + "title": "dialogflow ListGenerators Sample", + "description": "ListGenerators returns the list of all generators in the specified agent.", + "file": "GeneratorsClient/ListGenerators/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListGenerators", + "fullName": "google.cloud.dialogflow.cx.v3beta1.GeneratorsClient.ListGenerators", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "cxpb.ListGeneratorsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "GeneratorIterator", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3beta1.GeneratorsClient" + }, + "method": { + "shortName": "ListGenerators", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Generators.ListGenerators", + "service": { + "shortName": "Generators", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Generators" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 60, + "type": "FULL" + } + ] + }, + { + "regionTag": "dialogflow_v3beta1_generated_Generators_ListLocations_sync", + "title": "dialogflow ListLocations Sample", + "description": "ListLocations lists information about the supported locations for this service.", + "file": "GeneratorsClient/ListLocations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListLocations", + "fullName": "google.cloud.dialogflow.cx.v3beta1.GeneratorsClient.ListLocations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.ListLocationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "LocationIterator", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3beta1.GeneratorsClient" + }, + "method": { + "shortName": "ListLocations", + "fullName": "google.cloud.location.Locations.ListLocations", + "service": { + "shortName": "Locations", + "fullName": "google.cloud.location.Locations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 60, + "type": "FULL" + } + ] + }, + { + "regionTag": "dialogflow_v3beta1_generated_Generators_ListOperations_sync", + "title": "dialogflow ListOperations Sample", + "description": "ListOperations is a utility method from google.longrunning.Operations.", + "file": "GeneratorsClient/ListOperations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListOperations", + "fullName": "google.cloud.dialogflow.cx.v3beta1.GeneratorsClient.ListOperations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.ListOperationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "OperationIterator", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3beta1.GeneratorsClient" + }, + "method": { + "shortName": "ListOperations", + "fullName": "google.longrunning.Operations.ListOperations", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 60, + "type": "FULL" + } + ] + }, + { + "regionTag": "dialogflow_v3beta1_generated_Generators_UpdateGenerator_sync", + "title": "dialogflow UpdateGenerator Sample", + "description": "UpdateGenerator update the specified generator.", + "file": "GeneratorsClient/UpdateGenerator/main.go", + "language": "GO", + "clientMethod": { + "shortName": "UpdateGenerator", + "fullName": "google.cloud.dialogflow.cx.v3beta1.GeneratorsClient.UpdateGenerator", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "cxpb.UpdateGeneratorRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*cxpb.Generator", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3beta1.GeneratorsClient" + }, + "method": { + "shortName": "UpdateGenerator", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator", + "service": { + "shortName": "Generators", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Generators" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, { "regionTag": "dialogflow_v3beta1_generated_Intents_CancelOperation_sync", "title": "dialogflow CancelOperation Sample", diff --git a/internal/kokoro/continuous.sh b/internal/kokoro/continuous.sh index 1aa78f08d841..f43b286dc6bb 100755 --- a/internal/kokoro/continuous.sh +++ b/internal/kokoro/continuous.sh @@ -30,6 +30,7 @@ export GOOGLE_APPLICATION_CREDENTIALS=$KOKORO_KEYSTORE_DIR/72523_go_integration_ # doing when changing / removing the next line. export GCLOUD_TESTS_GOLANG_PROJECT_ID=dulcet-port-762 +export GCLOUD_TESTS_GOLANG_SECONDARY_BIGTABLE_PROJECT_ID=gcloud-golang-firestore-tests export GCLOUD_TESTS_GOLANG_KEY=$GOOGLE_APPLICATION_CREDENTIALS export GCLOUD_TESTS_GOLANG_DATASTORE_DATABASES=database-01 export GCLOUD_TESTS_GOLANG_FIRESTORE_PROJECT_ID=gcloud-golang-firestore-tests diff --git a/spanner/CHANGES.md b/spanner/CHANGES.md index 043522abb362..c1811ee73265 100644 --- a/spanner/CHANGES.md +++ b/spanner/CHANGES.md @@ -1,5 +1,13 @@ # Changes +## [1.53.1](https://github.com/googleapis/google-cloud-go/compare/spanner/v1.53.0...spanner/v1.53.1) (2023-12-01) + + +### Bug Fixes + +* **spanner:** Handle nil error when cleaning up long running session ([#9052](https://github.com/googleapis/google-cloud-go/issues/9052)) ([a93bc26](https://github.com/googleapis/google-cloud-go/commit/a93bc2696bf9ae60aae93af0e8c4911b58514d31)) +* **spanner:** MarshalJSON function caused errors for certain values ([#9063](https://github.com/googleapis/google-cloud-go/issues/9063)) ([afe7c98](https://github.com/googleapis/google-cloud-go/commit/afe7c98036c198995075530d4228f1f4ae3f1222)) + ## [1.53.0](https://github.com/googleapis/google-cloud-go/compare/spanner/v1.52.0...spanner/v1.53.0) (2023-11-15) diff --git a/spanner/internal/version.go b/spanner/internal/version.go index 215f04cde09f..4fe547595c50 100644 --- a/spanner/internal/version.go +++ b/spanner/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.53.0" +const Version = "1.53.1" diff --git a/spanner/value.go b/spanner/value.go index ca2f417af79f..816515d64a92 100644 --- a/spanner/value.go +++ b/spanner/value.go @@ -191,10 +191,7 @@ func (n NullInt64) String() string { // MarshalJSON implements json.Marshaler.MarshalJSON for NullInt64. func (n NullInt64) MarshalJSON() ([]byte, error) { - if n.Valid { - return []byte(fmt.Sprintf("%v", n.Int64)), nil - } - return jsonNullBytes, nil + return nulljson(n.Valid, n.Int64) } // UnmarshalJSON implements json.Unmarshaler.UnmarshalJSON for NullInt64. @@ -274,10 +271,7 @@ func (n NullString) String() string { // MarshalJSON implements json.Marshaler.MarshalJSON for NullString. func (n NullString) MarshalJSON() ([]byte, error) { - if n.Valid { - return []byte(fmt.Sprintf("%q", n.StringVal)), nil - } - return jsonNullBytes, nil + return nulljson(n.Valid, n.StringVal) } // UnmarshalJSON implements json.Unmarshaler.UnmarshalJSON for NullString. @@ -362,10 +356,7 @@ func (n NullFloat64) String() string { // MarshalJSON implements json.Marshaler.MarshalJSON for NullFloat64. func (n NullFloat64) MarshalJSON() ([]byte, error) { - if n.Valid { - return []byte(fmt.Sprintf("%v", n.Float64)), nil - } - return jsonNullBytes, nil + return nulljson(n.Valid, n.Float64) } // UnmarshalJSON implements json.Unmarshaler.UnmarshalJSON for NullFloat64. @@ -445,10 +436,7 @@ func (n NullBool) String() string { // MarshalJSON implements json.Marshaler.MarshalJSON for NullBool. func (n NullBool) MarshalJSON() ([]byte, error) { - if n.Valid { - return []byte(fmt.Sprintf("%v", n.Bool)), nil - } - return jsonNullBytes, nil + return nulljson(n.Valid, n.Bool) } // UnmarshalJSON implements json.Unmarshaler.UnmarshalJSON for NullBool. @@ -528,10 +516,7 @@ func (n NullTime) String() string { // MarshalJSON implements json.Marshaler.MarshalJSON for NullTime. func (n NullTime) MarshalJSON() ([]byte, error) { - if n.Valid { - return []byte(fmt.Sprintf("%q", n.String())), nil - } - return jsonNullBytes, nil + return nulljson(n.Valid, n.Time) } // UnmarshalJSON implements json.Unmarshaler.UnmarshalJSON for NullTime. @@ -616,10 +601,7 @@ func (n NullDate) String() string { // MarshalJSON implements json.Marshaler.MarshalJSON for NullDate. func (n NullDate) MarshalJSON() ([]byte, error) { - if n.Valid { - return []byte(fmt.Sprintf("%q", n.String())), nil - } - return jsonNullBytes, nil + return nulljson(n.Valid, n.Date) } // UnmarshalJSON implements json.Unmarshaler.UnmarshalJSON for NullDate. @@ -704,10 +686,7 @@ func (n NullNumeric) String() string { // MarshalJSON implements json.Marshaler.MarshalJSON for NullNumeric. func (n NullNumeric) MarshalJSON() ([]byte, error) { - if n.Valid { - return []byte(fmt.Sprintf("%q", NumericString(&n.Numeric))), nil - } - return jsonNullBytes, nil + return nulljson(n.Valid, NumericString(&n.Numeric)) } // UnmarshalJSON implements json.Unmarshaler.UnmarshalJSON for NullNumeric. @@ -804,10 +783,7 @@ func (n NullJSON) String() string { // MarshalJSON implements json.Marshaler.MarshalJSON for NullJSON. func (n NullJSON) MarshalJSON() ([]byte, error) { - if n.Valid { - return jsonProvider.Marshal(n.Value) - } - return jsonNullBytes, nil + return nulljson(n.Valid, n.Value) } // UnmarshalJSON implements json.Unmarshaler.UnmarshalJSON for NullJSON. @@ -855,10 +831,7 @@ func (n PGNumeric) String() string { // MarshalJSON implements json.Marshaler.MarshalJSON for PGNumeric. func (n PGNumeric) MarshalJSON() ([]byte, error) { - if n.Valid { - return []byte(fmt.Sprintf("%q", n.Numeric)), nil - } - return jsonNullBytes, nil + return nulljson(n.Valid, n.Numeric) } // UnmarshalJSON implements json.Unmarshaler.UnmarshalJSON for PGNumeric. @@ -916,10 +889,7 @@ func (n PGJsonB) String() string { // MarshalJSON implements json.Marshaler.MarshalJSON for PGJsonB. func (n PGJsonB) MarshalJSON() ([]byte, error) { - if n.Valid { - return jsonProvider.Marshal(n.Value) - } - return jsonNullBytes, nil + return nulljson(n.Valid, n.Value) } // UnmarshalJSON implements json.Unmarshaler.UnmarshalJSON for PGJsonB. @@ -941,6 +911,13 @@ func (n *PGJsonB) UnmarshalJSON(payload []byte) error { return nil } +func nulljson(valid bool, v interface{}) ([]byte, error) { + if !valid { + return jsonNullBytes, nil + } + return jsonProvider.Marshal(v) +} + // GenericColumnValue represents the generic encoded value and type of the // column. See google.spanner.v1.ResultSet proto for details. This can be // useful for proxying query results when the result types are not known in