From cf0d1290465921f455053046ec3e749621549592 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 24 Mar 2022 07:12:03 +0000 Subject: [PATCH] feat(all): auto-regenerate discovery clients --- .../v1/accesscontextmanager-api.json | 4 +- .../v1/accesscontextmanager-gen.go | 3 +- analyticsdata/v1beta/analyticsdata-api.json | 4 +- analyticsdata/v1beta/analyticsdata-gen.go | 4 +- api-list.json | 19 +- .../v2/baremetalsolution-api.json | 19 +- baremetalsolution/v2/baremetalsolution-gen.go | 12 +- .../v1/binaryauthorization-api.json | 4 +- .../v1/binaryauthorization-gen.go | 3 +- .../v1beta1/binaryauthorization-api.json | 4 +- .../v1beta1/binaryauthorization-gen.go | 3 +- classroom/v1/classroom-api.json | 4 +- classroom/v1/classroom-gen.go | 3 +- cloudasset/v1/cloudasset-api.json | 4 +- cloudasset/v1/cloudasset-gen.go | 3 +- cloudfunctions/v1/cloudfunctions-api.json | 9 +- cloudfunctions/v1/cloudfunctions-gen.go | 38 + .../v2alpha/cloudfunctions-api.json | 11 +- cloudfunctions/v2alpha/cloudfunctions-gen.go | 9 + cloudfunctions/v2beta/cloudfunctions-api.json | 11 +- cloudfunctions/v2beta/cloudfunctions-gen.go | 9 + .../v1/cloudresourcemanager-api.json | 4 +- .../v1/cloudresourcemanager-gen.go | 3 +- .../v1beta1/cloudresourcemanager-api.json | 4 +- .../v1beta1/cloudresourcemanager-gen.go | 3 +- .../v3/cloudresourcemanager-api.json | 4 +- .../v3/cloudresourcemanager-gen.go | 3 +- .../v1/contactcenterinsights-api.json | 4 +- .../v1/contactcenterinsights-gen.go | 3 +- datastore/v1/datastore-api.json | 14 +- datastore/v1/datastore-gen.go | 14 +- datastore/v1beta3/datastore-api.json | 12 +- datastore/v1beta3/datastore-gen.go | 11 + eventarc/v1/eventarc-api.json | 4 +- eventarc/v1/eventarc-gen.go | 3 +- firebasehosting/v1/firebasehosting-api.json | 4 +- firebasehosting/v1/firebasehosting-gen.go | 3 +- .../v1beta1/firebasehosting-api.json | 4 +- .../v1beta1/firebasehosting-gen.go | 3 +- .../v1beta/firebasestorage-api.json | 4 +- firebasestorage/v1beta/firebasestorage-gen.go | 3 +- firestore/v1/firestore-api.json | 10 +- firestore/v1/firestore-gen.go | 11 +- firestore/v1beta1/firestore-api.json | 14 +- firestore/v1beta1/firestore-gen.go | 11 +- firestore/v1beta2/firestore-api.json | 4 +- firestore/v1beta2/firestore-gen.go | 3 +- games/v1/games-api.json | 7 +- games/v1/games-gen.go | 15 + gkehub/v1alpha/gkehub-api.json | 4 +- gkehub/v1alpha/gkehub-gen.go | 3 +- logging/v2/logging-api.json | 4 +- logging/v2/logging-gen.go | 3 +- oslogin/v1/oslogin-api.json | 4 +- oslogin/v1/oslogin-gen.go | 3 +- oslogin/v1alpha/oslogin-api.json | 4 +- oslogin/v1alpha/oslogin-gen.go | 3 +- retail/v2/retail-api.json | 84 +- retail/v2/retail-gen.go | 398 +++++++- retail/v2alpha/retail-api.json | 198 +++- retail/v2alpha/retail-gen.go | 908 +++++++++++++++-- retail/v2beta/retail-api.json | 247 ++++- retail/v2beta/retail-gen.go | 957 ++++++++++++++++-- runtimeconfig/v1beta1/runtimeconfig-api.json | 4 +- runtimeconfig/v1beta1/runtimeconfig-gen.go | 3 +- secretmanager/v1/secretmanager-api.json | 4 +- secretmanager/v1/secretmanager-gen.go | 3 +- secretmanager/v1beta1/secretmanager-api.json | 4 +- secretmanager/v1beta1/secretmanager-gen.go | 3 +- sourcerepo/v1/sourcerepo-api.json | 4 +- sourcerepo/v1/sourcerepo-gen.go | 3 +- 71 files changed, 2859 insertions(+), 351 deletions(-) diff --git a/accesscontextmanager/v1/accesscontextmanager-api.json b/accesscontextmanager/v1/accesscontextmanager-api.json index 6cb155f1a64..89b0389614b 100644 --- a/accesscontextmanager/v1/accesscontextmanager-api.json +++ b/accesscontextmanager/v1/accesscontextmanager-api.json @@ -1083,7 +1083,7 @@ } } }, - "revision": "20211203", + "revision": "20220318", "rootUrl": "https://accesscontextmanager.googleapis.com/", "schemas": { "AccessContextManagerOperationMetadata": { @@ -1479,7 +1479,7 @@ "type": "object" }, "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/accesscontextmanager/v1/accesscontextmanager-gen.go b/accesscontextmanager/v1/accesscontextmanager-gen.go index bc7973181dd..78336e9c291 100644 --- a/accesscontextmanager/v1/accesscontextmanager-gen.go +++ b/accesscontextmanager/v1/accesscontextmanager-gen.go @@ -976,8 +976,7 @@ func (s *EgressTo) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/analyticsdata/v1beta/analyticsdata-api.json b/analyticsdata/v1beta/analyticsdata-api.json index 293373d5833..f1a9e39b5d5 100644 --- a/analyticsdata/v1beta/analyticsdata-api.json +++ b/analyticsdata/v1beta/analyticsdata-api.json @@ -313,7 +313,7 @@ } } }, - "revision": "20220104", + "revision": "20220322", "rootUrl": "https://analyticsdata.googleapis.com/", "schemas": { "ActiveMetricRestriction": { @@ -1139,7 +1139,7 @@ "type": "object" }, "OrderBy": { - "description": "The sort options.", + "description": "Order bys define how rows will be sorted in the response. For example, ordering rows by descending event count is one ordering, and ordering rows by the event name string is a different ordering.", "id": "OrderBy", "properties": { "desc": { diff --git a/analyticsdata/v1beta/analyticsdata-gen.go b/analyticsdata/v1beta/analyticsdata-gen.go index ba03b8a41b5..bbcb59db653 100644 --- a/analyticsdata/v1beta/analyticsdata-gen.go +++ b/analyticsdata/v1beta/analyticsdata-gen.go @@ -1673,7 +1673,9 @@ func (s *NumericValue) UnmarshalJSON(data []byte) error { return nil } -// OrderBy: The sort options. +// OrderBy: Order bys define how rows will be sorted in the response. +// For example, ordering rows by descending event count is one ordering, +// and ordering rows by the event name string is a different ordering. type OrderBy struct { // Desc: If true, sorts by descending order. Desc bool `json:"desc,omitempty"` diff --git a/api-list.json b/api-list.json index 749f68701d5..42085478027 100644 --- a/api-list.json +++ b/api-list.json @@ -541,28 +541,13 @@ "documentationLink": "https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/", "preferred": true }, - { - "kind": "discovery#directoryItem", - "id": "baremetalsolution:v1alpha1", - "name": "baremetalsolution", - "version": "v1alpha1", - "title": "Bare Metal Solution API", - "description": "Provides ways to manage Bare Metal Solution hardware installed in a regional extension located near a Google Cloud data center.", - "discoveryRestUrl": "https://baremetalsolution.googleapis.com/$discovery/rest?version=v1alpha1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/bare-metal", - "preferred": false - }, { "kind": "discovery#directoryItem", "id": "baremetalsolution:v1", "name": "baremetalsolution", "version": "v1", "title": "Bare Metal Solution API", - "description": "Provides ways to manage Bare Metal Solution hardware installed in a regional extension located near a Google Cloud data center.", + "description": "Bare Metal Solution provides hardware to run specialized workloads with low latency on Google Cloud.", "discoveryRestUrl": "https://baremetalsolution.googleapis.com/$discovery/rest?version=v1", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", @@ -577,7 +562,7 @@ "name": "baremetalsolution", "version": "v2", "title": "Bare Metal Solution API", - "description": "Provides ways to manage Bare Metal Solution hardware installed in a regional extension located near a Google Cloud data center.", + "description": "Bare Metal Solution provides hardware to run specialized workloads with low latency on Google Cloud.", "discoveryRestUrl": "https://baremetalsolution.googleapis.com/$discovery/rest?version=v2", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", diff --git a/baremetalsolution/v2/baremetalsolution-api.json b/baremetalsolution/v2/baremetalsolution-api.json index 285607ced5d..639314d4538 100644 --- a/baremetalsolution/v2/baremetalsolution-api.json +++ b/baremetalsolution/v2/baremetalsolution-api.json @@ -1222,7 +1222,7 @@ } } }, - "revision": "20220314", + "revision": "20220322", "rootUrl": "https://baremetalsolution.googleapis.com/", "schemas": { "AllowedClient": { @@ -1271,7 +1271,7 @@ "type": "object" }, "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" @@ -2234,6 +2234,21 @@ "description": "Output only. The name of the provisioning quota.", "readOnly": true, "type": "string" + }, + "networkBandwidth": { + "description": "Network bandwidth, Gbps", + "format": "int64", + "type": "string" + }, + "serverCount": { + "description": "Server count.", + "format": "int64", + "type": "string" + }, + "storageGib": { + "description": "Storage size (GB).", + "format": "int64", + "type": "string" } }, "type": "object" diff --git a/baremetalsolution/v2/baremetalsolution-gen.go b/baremetalsolution/v2/baremetalsolution-gen.go index bf978c65cd8..b2f4910c462 100644 --- a/baremetalsolution/v2/baremetalsolution-gen.go +++ b/baremetalsolution/v2/baremetalsolution-gen.go @@ -325,8 +325,7 @@ func (s *AllowedClient) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -1569,6 +1568,15 @@ type ProvisioningQuota struct { // Name: Output only. The name of the provisioning quota. Name string `json:"name,omitempty"` + // NetworkBandwidth: Network bandwidth, Gbps + NetworkBandwidth int64 `json:"networkBandwidth,omitempty,string"` + + // ServerCount: Server count. + ServerCount int64 `json:"serverCount,omitempty,string"` + + // StorageGib: Storage size (GB). + StorageGib int64 `json:"storageGib,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "AssetType") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/binaryauthorization/v1/binaryauthorization-api.json b/binaryauthorization/v1/binaryauthorization-api.json index ba37dc3bd74..8bcca307865 100644 --- a/binaryauthorization/v1/binaryauthorization-api.json +++ b/binaryauthorization/v1/binaryauthorization-api.json @@ -551,7 +551,7 @@ } } }, - "revision": "20220225", + "revision": "20220318", "rootUrl": "https://binaryauthorization.googleapis.com/", "schemas": { "AdmissionRule": { @@ -710,7 +710,7 @@ "type": "object" }, "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/binaryauthorization/v1/binaryauthorization-gen.go b/binaryauthorization/v1/binaryauthorization-gen.go index 55d9aa363d0..59a1849c001 100644 --- a/binaryauthorization/v1/binaryauthorization-gen.go +++ b/binaryauthorization/v1/binaryauthorization-gen.go @@ -514,8 +514,7 @@ func (s *Binding) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/binaryauthorization/v1beta1/binaryauthorization-api.json b/binaryauthorization/v1beta1/binaryauthorization-api.json index 8d6b3f11106..c31a470a6c4 100644 --- a/binaryauthorization/v1beta1/binaryauthorization-api.json +++ b/binaryauthorization/v1beta1/binaryauthorization-api.json @@ -551,7 +551,7 @@ } } }, - "revision": "20220225", + "revision": "20220318", "rootUrl": "https://binaryauthorization.googleapis.com/", "schemas": { "AdmissionRule": { @@ -710,7 +710,7 @@ "type": "object" }, "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/binaryauthorization/v1beta1/binaryauthorization-gen.go b/binaryauthorization/v1beta1/binaryauthorization-gen.go index 88d5a2f7bfc..f67d191380d 100644 --- a/binaryauthorization/v1beta1/binaryauthorization-gen.go +++ b/binaryauthorization/v1beta1/binaryauthorization-gen.go @@ -516,8 +516,7 @@ func (s *Binding) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/classroom/v1/classroom-api.json b/classroom/v1/classroom-api.json index c9b7f07cba8..fe64270c54e 100644 --- a/classroom/v1/classroom-api.json +++ b/classroom/v1/classroom-api.json @@ -2400,7 +2400,7 @@ } } }, - "revision": "20220302", + "revision": "20220319", "rootUrl": "https://classroom.googleapis.com/", "schemas": { "Announcement": { @@ -3029,7 +3029,7 @@ "type": "object" }, "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/classroom/v1/classroom-gen.go b/classroom/v1/classroom-gen.go index 0143416c8e6..bd203e6304d 100644 --- a/classroom/v1/classroom-gen.go +++ b/classroom/v1/classroom-gen.go @@ -1369,8 +1369,7 @@ func (s *DriveFolder) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/cloudasset/v1/cloudasset-api.json b/cloudasset/v1/cloudasset-api.json index e0454308510..497dd21fd04 100644 --- a/cloudasset/v1/cloudasset-api.json +++ b/cloudasset/v1/cloudasset-api.json @@ -929,7 +929,7 @@ } } }, - "revision": "20220304", + "revision": "20220318", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AccessSelector": { @@ -1323,7 +1323,7 @@ "type": "object" }, "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/cloudasset/v1/cloudasset-gen.go b/cloudasset/v1/cloudasset-gen.go index cd44ac07a9a..98623153cc1 100644 --- a/cloudasset/v1/cloudasset-gen.go +++ b/cloudasset/v1/cloudasset-gen.go @@ -1072,8 +1072,7 @@ func (s *EffectiveIamPolicy) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/cloudfunctions/v1/cloudfunctions-api.json b/cloudfunctions/v1/cloudfunctions-api.json index 16a3f0c2476..7c751bf3268 100644 --- a/cloudfunctions/v1/cloudfunctions-api.json +++ b/cloudfunctions/v1/cloudfunctions-api.json @@ -546,7 +546,7 @@ } } }, - "revision": "20220218", + "revision": "20220317", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -945,7 +945,12 @@ "GenerateUploadUrlRequest": { "description": "Request of `GenerateSourceUploadUrl` method.", "id": "GenerateUploadUrlRequest", - "properties": {}, + "properties": { + "kmsKeyName": { + "description": "Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function source code objects in staging Cloud Storage buckets. When you generate an upload url and upload your source code, it gets copied to a staging Cloud Storage bucket in an internal regional project. The source code is then copied to a versioned directory in the sources bucket in the consumer project during the function deployment. It must match the pattern `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. The Google Cloud Functions service account (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the Key/KeyRing/Project/Organization (least access preferred). GCF will delegate access to the Google Storage service account in the internal project.", + "type": "string" + } + }, "type": "object" }, "GenerateUploadUrlResponse": { diff --git a/cloudfunctions/v1/cloudfunctions-gen.go b/cloudfunctions/v1/cloudfunctions-gen.go index b9fe07d76f2..b9627dc43ac 100644 --- a/cloudfunctions/v1/cloudfunctions-gen.go +++ b/cloudfunctions/v1/cloudfunctions-gen.go @@ -911,6 +911,44 @@ func (s *GenerateDownloadUrlResponse) MarshalJSON() ([]byte, error) { // GenerateUploadUrlRequest: Request of `GenerateSourceUploadUrl` // method. type GenerateUploadUrlRequest struct { + // KmsKeyName: Resource name of a KMS crypto key (managed by the user) + // used to encrypt/decrypt function source code objects in staging Cloud + // Storage buckets. When you generate an upload url and upload your + // source code, it gets copied to a staging Cloud Storage bucket in an + // internal regional project. The source code is then copied to a + // versioned directory in the sources bucket in the consumer project + // during the function deployment. It must match the pattern + // `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKey + // s/{crypto_key}`. The Google Cloud Functions service account + // (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) + // must be granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter + // (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the + // Key/KeyRing/Project/Organization (least access preferred). GCF will + // delegate access to the Google Storage service account in the internal + // project. + KmsKeyName string `json:"kmsKeyName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "KmsKeyName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "KmsKeyName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GenerateUploadUrlRequest) MarshalJSON() ([]byte, error) { + type NoMethod GenerateUploadUrlRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // GenerateUploadUrlResponse: Response of `GenerateSourceUploadUrl` diff --git a/cloudfunctions/v2alpha/cloudfunctions-api.json b/cloudfunctions/v2alpha/cloudfunctions-api.json index 9878b99e314..8a854b6c2eb 100644 --- a/cloudfunctions/v2alpha/cloudfunctions-api.json +++ b/cloudfunctions/v2alpha/cloudfunctions-api.json @@ -571,7 +571,7 @@ } } }, - "revision": "20220218", + "revision": "20220317", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -696,6 +696,10 @@ "description": "Required. The name of a CloudEvents attribute.", "type": "string" }, + "operator": { + "description": "Optional. The operator used for matching the events with the value of the filter. If not specified, only events that have an exact key-value pair specified in the filter are matched. The only allowed value is `match-path-pattern`.", + "type": "string" + }, "value": { "description": "Required. The value for the attribute.", "type": "string" @@ -1560,6 +1564,11 @@ "format": "int32", "type": "integer" }, + "revision": { + "description": "Output only. The name of service revision.", + "readOnly": true, + "type": "string" + }, "service": { "description": "Output only. Name of the service associated with a Function. The format of this field is `projects/{project}/locations/{region}/services/{service}`", "readOnly": true, diff --git a/cloudfunctions/v2alpha/cloudfunctions-gen.go b/cloudfunctions/v2alpha/cloudfunctions-gen.go index 2fffef4b5f4..06f5ae04d62 100644 --- a/cloudfunctions/v2alpha/cloudfunctions-gen.go +++ b/cloudfunctions/v2alpha/cloudfunctions-gen.go @@ -449,6 +449,12 @@ type EventFilter struct { // Attribute: Required. The name of a CloudEvents attribute. Attribute string `json:"attribute,omitempty"` + // Operator: Optional. The operator used for matching the events with + // the value of the filter. If not specified, only events that have an + // exact key-value pair specified in the filter are matched. The only + // allowed value is `match-path-pattern`. + Operator string `json:"operator,omitempty"` + // Value: Required. The value for the attribute. Value string `json:"value,omitempty"` @@ -1678,6 +1684,9 @@ type ServiceConfig struct { // idle instance would have been stopped in the default case. MinInstanceCount int64 `json:"minInstanceCount,omitempty"` + // Revision: Output only. The name of service revision. + Revision string `json:"revision,omitempty"` + // Service: Output only. Name of the service associated with a Function. // The format of this field is // `projects/{project}/locations/{region}/services/{service}` diff --git a/cloudfunctions/v2beta/cloudfunctions-api.json b/cloudfunctions/v2beta/cloudfunctions-api.json index cbcff9b4a86..3008bd1fdfe 100644 --- a/cloudfunctions/v2beta/cloudfunctions-api.json +++ b/cloudfunctions/v2beta/cloudfunctions-api.json @@ -571,7 +571,7 @@ } } }, - "revision": "20220218", + "revision": "20220317", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -696,6 +696,10 @@ "description": "Required. The name of a CloudEvents attribute.", "type": "string" }, + "operator": { + "description": "Optional. The operator used for matching the events with the value of the filter. If not specified, only events that have an exact key-value pair specified in the filter are matched. The only allowed value is `match-path-pattern`.", + "type": "string" + }, "value": { "description": "Required. The value for the attribute.", "type": "string" @@ -1560,6 +1564,11 @@ "format": "int32", "type": "integer" }, + "revision": { + "description": "Output only. The name of service revision.", + "readOnly": true, + "type": "string" + }, "service": { "description": "Output only. Name of the service associated with a Function. The format of this field is `projects/{project}/locations/{region}/services/{service}`", "readOnly": true, diff --git a/cloudfunctions/v2beta/cloudfunctions-gen.go b/cloudfunctions/v2beta/cloudfunctions-gen.go index 35d07903e98..3d0f9a8a98a 100644 --- a/cloudfunctions/v2beta/cloudfunctions-gen.go +++ b/cloudfunctions/v2beta/cloudfunctions-gen.go @@ -449,6 +449,12 @@ type EventFilter struct { // Attribute: Required. The name of a CloudEvents attribute. Attribute string `json:"attribute,omitempty"` + // Operator: Optional. The operator used for matching the events with + // the value of the filter. If not specified, only events that have an + // exact key-value pair specified in the filter are matched. The only + // allowed value is `match-path-pattern`. + Operator string `json:"operator,omitempty"` + // Value: Required. The value for the attribute. Value string `json:"value,omitempty"` @@ -1678,6 +1684,9 @@ type ServiceConfig struct { // idle instance would have been stopped in the default case. MinInstanceCount int64 `json:"minInstanceCount,omitempty"` + // Revision: Output only. The name of service revision. + Revision string `json:"revision,omitempty"` + // Service: Output only. Name of the service associated with a Function. // The format of this field is // `projects/{project}/locations/{region}/services/{service}` diff --git a/cloudresourcemanager/v1/cloudresourcemanager-api.json b/cloudresourcemanager/v1/cloudresourcemanager-api.json index 844ec6a6641..573d4b7f574 100644 --- a/cloudresourcemanager/v1/cloudresourcemanager-api.json +++ b/cloudresourcemanager/v1/cloudresourcemanager-api.json @@ -1171,7 +1171,7 @@ } } }, - "revision": "20220109", + "revision": "20220320", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "Ancestor": { @@ -1490,7 +1490,7 @@ "type": "object" }, "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/cloudresourcemanager/v1/cloudresourcemanager-gen.go b/cloudresourcemanager/v1/cloudresourcemanager-gen.go index f17c900935a..e87bbc4b1aa 100644 --- a/cloudresourcemanager/v1/cloudresourcemanager-gen.go +++ b/cloudresourcemanager/v1/cloudresourcemanager-gen.go @@ -781,8 +781,7 @@ type DeleteTagValueMetadata struct { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json b/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json index d6e89369124..80359a2d9b4 100644 --- a/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json +++ b/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json @@ -566,7 +566,7 @@ } } }, - "revision": "20211107", + "revision": "20220320", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "Ancestor": { @@ -806,7 +806,7 @@ "type": "object" }, "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go b/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go index 84dd8e4a6e7..c4c3740f8fa 100644 --- a/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go +++ b/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go @@ -578,8 +578,7 @@ type DeleteTagValueMetadata struct { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/cloudresourcemanager/v3/cloudresourcemanager-api.json b/cloudresourcemanager/v3/cloudresourcemanager-api.json index 8cddfa2f05a..9111749f236 100644 --- a/cloudresourcemanager/v3/cloudresourcemanager-api.json +++ b/cloudresourcemanager/v3/cloudresourcemanager-api.json @@ -1612,7 +1612,7 @@ } } }, - "revision": "20220306", + "revision": "20220320", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "AuditConfig": { @@ -1841,7 +1841,7 @@ "type": "object" }, "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/cloudresourcemanager/v3/cloudresourcemanager-gen.go b/cloudresourcemanager/v3/cloudresourcemanager-gen.go index 6cbde50dca2..c2978b1cc81 100644 --- a/cloudresourcemanager/v3/cloudresourcemanager-gen.go +++ b/cloudresourcemanager/v3/cloudresourcemanager-gen.go @@ -622,8 +622,7 @@ type DeleteTagValueMetadata struct { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/contactcenterinsights/v1/contactcenterinsights-api.json b/contactcenterinsights/v1/contactcenterinsights-api.json index 3edc67306d5..f92030af5f8 100644 --- a/contactcenterinsights/v1/contactcenterinsights-api.json +++ b/contactcenterinsights/v1/contactcenterinsights-api.json @@ -1275,7 +1275,7 @@ } } }, - "revision": "20220107", + "revision": "20220319", "rootUrl": "https://contactcenterinsights.googleapis.com/", "schemas": { "GoogleCloudContactcenterinsightsV1Analysis": { @@ -3529,7 +3529,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/contactcenterinsights/v1/contactcenterinsights-gen.go b/contactcenterinsights/v1/contactcenterinsights-gen.go index 170c32f08e0..7c3d899dae7 100644 --- a/contactcenterinsights/v1/contactcenterinsights-gen.go +++ b/contactcenterinsights/v1/contactcenterinsights-gen.go @@ -4018,8 +4018,7 @@ func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { // avoid defining duplicated empty messages in your APIs. A typical // example is to use it as the request or the response type of an API // method. For instance: service Foo { rpc Bar(google.protobuf.Empty) -// returns (google.protobuf.Empty); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/datastore/v1/datastore-api.json b/datastore/v1/datastore-api.json index b84957c2696..0a3e28ccace 100644 --- a/datastore/v1/datastore-api.json +++ b/datastore/v1/datastore-api.json @@ -626,7 +626,7 @@ } } }, - "revision": "20220207", + "revision": "20220319", "rootUrl": "https://datastore.googleapis.com/", "schemas": { "AllocateIdsRequest": { @@ -773,7 +773,7 @@ "type": "object" }, "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" @@ -1785,7 +1785,10 @@ "GREATER_THAN", "GREATER_THAN_OR_EQUAL", "EQUAL", - "HAS_ANCESTOR" + "IN", + "NOT_EQUAL", + "HAS_ANCESTOR", + "NOT_IN" ], "enumDescriptions": [ "Unspecified. This value must not be used.", @@ -1794,7 +1797,10 @@ "The given `property` is greater than the given `value`. Requires: * That `property` comes first in `order_by`.", "The given `property` is greater than or equal to the given `value`. Requires: * That `property` comes first in `order_by`.", "The given `property` is equal to the given `value`.", - "Limit the result set to the given entity and its descendants. Requires: * That `value` is an entity key." + "The given `property` is equal to at least one value in the given array. Requires: * That `value` is a non-empty `ArrayValue` with at most 10 values. * No other `IN` or `NOT_IN` is in the same query.", + "The given `property` is not equal to the given `value`. Requires: * No other `NOT_EQUAL` or `NOT_IN` is in the same query. * That `property` comes first in the `order_by`.", + "Limit the result set to the given entity and its descendants. Requires: * That `value` is an entity key.", + "The value of the `property` is not in the given array. Requires: * That `value` is a non-empty `ArrayValue` with at most 10 values. * No other `IN`, `NOT_IN`, `NOT_EQUAL` is in the same query. * That `field` comes first in the `order_by`." ], "type": "string" }, diff --git a/datastore/v1/datastore-gen.go b/datastore/v1/datastore-gen.go index ea3fdc9e706..d4d32db2126 100644 --- a/datastore/v1/datastore-gen.go +++ b/datastore/v1/datastore-gen.go @@ -463,8 +463,7 @@ func (s *CompositeFilter) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -2224,8 +2223,19 @@ type PropertyFilter struct { // equal to the given `value`. Requires: * That `property` comes first // in `order_by`. // "EQUAL" - The given `property` is equal to the given `value`. + // "IN" - The given `property` is equal to at least one value in the + // given array. Requires: * That `value` is a non-empty `ArrayValue` + // with at most 10 values. * No other `IN` or `NOT_IN` is in the same + // query. + // "NOT_EQUAL" - The given `property` is not equal to the given + // `value`. Requires: * No other `NOT_EQUAL` or `NOT_IN` is in the same + // query. * That `property` comes first in the `order_by`. // "HAS_ANCESTOR" - Limit the result set to the given entity and its // descendants. Requires: * That `value` is an entity key. + // "NOT_IN" - The value of the `property` is not in the given array. + // Requires: * That `value` is a non-empty `ArrayValue` with at most 10 + // values. * No other `IN`, `NOT_IN`, `NOT_EQUAL` is in the same query. + // * That `field` comes first in the `order_by`. Op string `json:"op,omitempty"` // Property: The property to filter by. diff --git a/datastore/v1beta3/datastore-api.json b/datastore/v1beta3/datastore-api.json index 9923c304d3f..ccd9fd165db 100644 --- a/datastore/v1beta3/datastore-api.json +++ b/datastore/v1beta3/datastore-api.json @@ -308,7 +308,7 @@ } } }, - "revision": "20220207", + "revision": "20220319", "rootUrl": "https://datastore.googleapis.com/", "schemas": { "AllocateIdsRequest": { @@ -1260,7 +1260,10 @@ "GREATER_THAN", "GREATER_THAN_OR_EQUAL", "EQUAL", - "HAS_ANCESTOR" + "IN", + "NOT_EQUAL", + "HAS_ANCESTOR", + "NOT_IN" ], "enumDescriptions": [ "Unspecified. This value must not be used.", @@ -1269,7 +1272,10 @@ "The given `property` is greater than the given `value`. Requires: * That `property` comes first in `order_by`.", "The given `property` is greater than or equal to the given `value`. Requires: * That `property` comes first in `order_by`.", "The given `property` is equal to the given `value`.", - "Limit the result set to the given entity and its descendants. Requires: * That `value` is an entity key." + "The given `property` is equal to at least one value in the given array. Requires: * That `value` is a non-empty `ArrayValue` with at most 10 values. * No other `IN` or `NOT_IN` is in the same query.", + "The given `property` is not equal to the given `value`. Requires: * No other `NOT_EQUAL` or `NOT_IN` is in the same query. * That `property` comes first in the `order_by`.", + "Limit the result set to the given entity and its descendants. Requires: * That `value` is an entity key.", + "The value of the `property` is not in the given array. Requires: * That `value` is a non-empty `ArrayValue` with at most 10 values. * No other `IN`, `NOT_IN`, `NOT_EQUAL` is in the same query. * That `field` comes first in the `order_by`." ], "type": "string" }, diff --git a/datastore/v1beta3/datastore-gen.go b/datastore/v1beta3/datastore-gen.go index cace06f9f48..3a5347f3425 100644 --- a/datastore/v1beta3/datastore-gen.go +++ b/datastore/v1beta3/datastore-gen.go @@ -1840,8 +1840,19 @@ type PropertyFilter struct { // equal to the given `value`. Requires: * That `property` comes first // in `order_by`. // "EQUAL" - The given `property` is equal to the given `value`. + // "IN" - The given `property` is equal to at least one value in the + // given array. Requires: * That `value` is a non-empty `ArrayValue` + // with at most 10 values. * No other `IN` or `NOT_IN` is in the same + // query. + // "NOT_EQUAL" - The given `property` is not equal to the given + // `value`. Requires: * No other `NOT_EQUAL` or `NOT_IN` is in the same + // query. * That `property` comes first in the `order_by`. // "HAS_ANCESTOR" - Limit the result set to the given entity and its // descendants. Requires: * That `value` is an entity key. + // "NOT_IN" - The value of the `property` is not in the given array. + // Requires: * That `value` is a non-empty `ArrayValue` with at most 10 + // values. * No other `IN`, `NOT_IN`, `NOT_EQUAL` is in the same query. + // * That `field` comes first in the `order_by`. Op string `json:"op,omitempty"` // Property: The property to filter by. diff --git a/eventarc/v1/eventarc-api.json b/eventarc/v1/eventarc-api.json index 71c3ad628ed..6b85e39b13e 100644 --- a/eventarc/v1/eventarc-api.json +++ b/eventarc/v1/eventarc-api.json @@ -846,7 +846,7 @@ } } }, - "revision": "20220311", + "revision": "20220318", "rootUrl": "https://eventarc.googleapis.com/", "schemas": { "AuditConfig": { @@ -962,7 +962,7 @@ "type": "object" }, "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/eventarc/v1/eventarc-gen.go b/eventarc/v1/eventarc-gen.go index be8b455de48..e36f9d00e0a 100644 --- a/eventarc/v1/eventarc-gen.go +++ b/eventarc/v1/eventarc-gen.go @@ -477,8 +477,7 @@ func (s *Destination) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/firebasehosting/v1/firebasehosting-api.json b/firebasehosting/v1/firebasehosting-api.json index af35a0cd504..4745b686f2d 100644 --- a/firebasehosting/v1/firebasehosting-api.json +++ b/firebasehosting/v1/firebasehosting-api.json @@ -186,7 +186,7 @@ } } }, - "revision": "20210315", + "revision": "20220322", "rootUrl": "https://firebasehosting.googleapis.com/", "schemas": { "CancelOperationRequest": { @@ -196,7 +196,7 @@ "type": "object" }, "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/firebasehosting/v1/firebasehosting-gen.go b/firebasehosting/v1/firebasehosting-gen.go index 81377b207b5..174946a730a 100644 --- a/firebasehosting/v1/firebasehosting-gen.go +++ b/firebasehosting/v1/firebasehosting-gen.go @@ -143,8 +143,7 @@ type CancelOperationRequest struct { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/firebasehosting/v1beta1/firebasehosting-api.json b/firebasehosting/v1beta1/firebasehosting-api.json index 090e4b7bc19..c6fe642731f 100644 --- a/firebasehosting/v1beta1/firebasehosting-api.json +++ b/firebasehosting/v1beta1/firebasehosting-api.json @@ -1939,7 +1939,7 @@ } } }, - "revision": "20210811", + "revision": "20220322", "rootUrl": "https://firebasehosting.googleapis.com/", "schemas": { "ActingUser": { @@ -2232,7 +2232,7 @@ "type": "object" }, "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/firebasehosting/v1beta1/firebasehosting-gen.go b/firebasehosting/v1beta1/firebasehosting-gen.go index e3887729e47..de747986cb2 100644 --- a/firebasehosting/v1beta1/firebasehosting-gen.go +++ b/firebasehosting/v1beta1/firebasehosting-gen.go @@ -787,8 +787,7 @@ func (s *DomainRedirect) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/firebasestorage/v1beta/firebasestorage-api.json b/firebasestorage/v1beta/firebasestorage-api.json index e4a85f570e7..3042b4a7356 100644 --- a/firebasestorage/v1beta/firebasestorage-api.json +++ b/firebasestorage/v1beta/firebasestorage-api.json @@ -238,7 +238,7 @@ } } }, - "revision": "20210910", + "revision": "20220318", "rootUrl": "https://firebasestorage.googleapis.com/", "schemas": { "AddFirebaseRequest": { @@ -269,7 +269,7 @@ "type": "object" }, "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/firebasestorage/v1beta/firebasestorage-gen.go b/firebasestorage/v1beta/firebasestorage-gen.go index 10b160ea3ba..84b8ed62e45 100644 --- a/firebasestorage/v1beta/firebasestorage-gen.go +++ b/firebasestorage/v1beta/firebasestorage-gen.go @@ -215,8 +215,7 @@ func (s *Bucket) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/firestore/v1/firestore-api.json b/firestore/v1/firestore-api.json index 582d11ab21d..506e31d11f9 100644 --- a/firestore/v1/firestore-api.json +++ b/firestore/v1/firestore-api.json @@ -1319,7 +1319,7 @@ } } }, - "revision": "20220305", + "revision": "20220319", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "ArrayValue": { @@ -1705,7 +1705,7 @@ "type": "object" }, "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" @@ -1872,9 +1872,9 @@ ], "enumDescriptions": [ "Not used.", - "Use optimistic concurrency control by default. This setting is available for Cloud Firestore customers.", - "Use pessimistic concurrency control by default. This setting is available for Cloud Firestore customers. This is the default setting for Cloud Firestore.", - "Use optimistic concurrency control with entity groups by default. This is the only available setting for Cloud Datastore customers. This is the default setting for Cloud Datastore." + "Use optimistic concurrency control by default. This mode is available for Cloud Firestore databases.", + "Use pessimistic concurrency control by default. This mode is available for Cloud Firestore databases. This is the default setting for Cloud Firestore.", + "Use optimistic concurrency control with entity groups by default. This is the only available mode for Cloud Datastore. This mode is also available for Cloud Firestore with Datastore Mode but is not recommended." ], "type": "string" }, diff --git a/firestore/v1/firestore-gen.go b/firestore/v1/firestore-gen.go index 45b41796677..f6742197278 100644 --- a/firestore/v1/firestore-gen.go +++ b/firestore/v1/firestore-gen.go @@ -962,8 +962,7 @@ func (s *DocumentsTarget) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -1255,14 +1254,14 @@ type GoogleFirestoreAdminV1Database struct { // Possible values: // "CONCURRENCY_MODE_UNSPECIFIED" - Not used. // "OPTIMISTIC" - Use optimistic concurrency control by default. This - // setting is available for Cloud Firestore customers. + // mode is available for Cloud Firestore databases. // "PESSIMISTIC" - Use pessimistic concurrency control by default. - // This setting is available for Cloud Firestore customers. This is the + // This mode is available for Cloud Firestore databases. This is the // default setting for Cloud Firestore. // "OPTIMISTIC_WITH_ENTITY_GROUPS" - Use optimistic concurrency // control with entity groups by default. This is the only available - // setting for Cloud Datastore customers. This is the default setting - // for Cloud Datastore. + // mode for Cloud Datastore. This mode is also available for Cloud + // Firestore with Datastore Mode but is not recommended. ConcurrencyMode string `json:"concurrencyMode,omitempty"` // Etag: This checksum is computed by the server based on the value of diff --git a/firestore/v1beta1/firestore-api.json b/firestore/v1beta1/firestore-api.json index 0345e1e3a32..2c8ad0ce0ef 100644 --- a/firestore/v1beta1/firestore-api.json +++ b/firestore/v1beta1/firestore-api.json @@ -921,7 +921,7 @@ } } }, - "revision": "20220305", + "revision": "20220319", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "ArrayValue": { @@ -1307,7 +1307,7 @@ "type": "object" }, "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" @@ -1830,6 +1830,11 @@ "pageToken": { "description": "A page token. Must be a value from ListCollectionIdsResponse.", "type": "string" + }, + "readTime": { + "description": "Reads documents as they were at the given time. This may not be older than 270 seconds.", + "format": "google-datetime", + "type": "string" } }, "type": "object" @@ -1977,6 +1982,11 @@ "format": "int64", "type": "string" }, + "readTime": { + "description": "Reads documents as they were at the given time. This may not be older than 270 seconds.", + "format": "google-datetime", + "type": "string" + }, "structuredQuery": { "$ref": "StructuredQuery", "description": "A structured query. Query must specify collection with all descendants and be ordered by name ascending. Other filters, order bys, limits, offsets, and start/end cursors are not supported." diff --git a/firestore/v1beta1/firestore-gen.go b/firestore/v1beta1/firestore-gen.go index 6ef820ea758..518ee3d0c15 100644 --- a/firestore/v1beta1/firestore-gen.go +++ b/firestore/v1beta1/firestore-gen.go @@ -914,8 +914,7 @@ func (s *DocumentsTarget) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -1779,6 +1778,10 @@ type ListCollectionIdsRequest struct { // ListCollectionIdsResponse. PageToken string `json:"pageToken,omitempty"` + // ReadTime: Reads documents as they were at the given time. This may + // not be older than 270 seconds. + ReadTime string `json:"readTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageSize") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2053,6 +2056,10 @@ type PartitionQueryRequest struct { // fewer than the number of workers or compute instances available. PartitionCount int64 `json:"partitionCount,omitempty,string"` + // ReadTime: Reads documents as they were at the given time. This may + // not be older than 270 seconds. + ReadTime string `json:"readTime,omitempty"` + // StructuredQuery: A structured query. Query must specify collection // with all descendants and be ordered by name ascending. Other filters, // order bys, limits, offsets, and start/end cursors are not supported. diff --git a/firestore/v1beta2/firestore-api.json b/firestore/v1beta2/firestore-api.json index a431693768b..4e721809ed7 100644 --- a/firestore/v1beta2/firestore-api.json +++ b/firestore/v1beta2/firestore-api.json @@ -415,11 +415,11 @@ } } }, - "revision": "20220110", + "revision": "20220319", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/firestore/v1beta2/firestore-gen.go b/firestore/v1beta2/firestore-gen.go index 89afd8df1a8..5dd62d68ea9 100644 --- a/firestore/v1beta2/firestore-gen.go +++ b/firestore/v1beta2/firestore-gen.go @@ -208,8 +208,7 @@ type ProjectsDatabasesCollectionGroupsIndexesService struct { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/games/v1/games-api.json b/games/v1/games-api.json index c560deed799..ec9969758c6 100644 --- a/games/v1/games-api.json +++ b/games/v1/games-api.json @@ -714,6 +714,11 @@ "location": "path", "required": true, "type": "string" + }, + "playerIdConsistencyToken": { + "description": "Consistency token of the player id. The call returns a 'not found' result when the token is present and invalid. Empty value is ignored. See also GlobalPlayerIdConsistencyTokenProto", + "location": "query", + "type": "string" } }, "path": "games/v1/players/{playerId}", @@ -1224,7 +1229,7 @@ } } }, - "revision": "20210401", + "revision": "20220317", "rootUrl": "https://games.googleapis.com/", "schemas": { "AchievementDefinition": { diff --git a/games/v1/games-gen.go b/games/v1/games-gen.go index cfa99e7ab7f..ec0a0483875 100644 --- a/games/v1/games-gen.go +++ b/games/v1/games-gen.go @@ -6096,6 +6096,16 @@ func (c *PlayersGetCall) Language(language string) *PlayersGetCall { return c } +// PlayerIdConsistencyToken sets the optional parameter +// "playerIdConsistencyToken": Consistency token of the player id. The +// call returns a 'not found' result when the token is present and +// invalid. Empty value is ignored. See also +// GlobalPlayerIdConsistencyTokenProto +func (c *PlayersGetCall) PlayerIdConsistencyToken(playerIdConsistencyToken string) *PlayersGetCall { + c.urlParams_.Set("playerIdConsistencyToken", playerIdConsistencyToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -6213,6 +6223,11 @@ func (c *PlayersGetCall) Do(opts ...googleapi.CallOption) (*Player, error) { // "location": "path", // "required": true, // "type": "string" + // }, + // "playerIdConsistencyToken": { + // "description": "Consistency token of the player id. The call returns a 'not found' result when the token is present and invalid. Empty value is ignored. See also GlobalPlayerIdConsistencyTokenProto", + // "location": "query", + // "type": "string" // } // }, // "path": "games/v1/players/{playerId}", diff --git a/gkehub/v1alpha/gkehub-api.json b/gkehub/v1alpha/gkehub-api.json index b10506e9d8d..53f473c778b 100644 --- a/gkehub/v1alpha/gkehub-api.json +++ b/gkehub/v1alpha/gkehub-api.json @@ -1139,7 +1139,7 @@ } } }, - "revision": "20220303", + "revision": "20220318", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -2127,7 +2127,7 @@ "type": "object" }, "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/gkehub/v1alpha/gkehub-gen.go b/gkehub/v1alpha/gkehub-gen.go index 3bb254a97fa..164d99e65d1 100644 --- a/gkehub/v1alpha/gkehub-gen.go +++ b/gkehub/v1alpha/gkehub-gen.go @@ -1856,8 +1856,7 @@ func (s *EdgeCluster) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/logging/v2/logging-api.json b/logging/v2/logging-api.json index 94664a8fdee..c59704c8251 100644 --- a/logging/v2/logging-api.json +++ b/logging/v2/logging-api.json @@ -5817,7 +5817,7 @@ } } }, - "revision": "20220311", + "revision": "20220318", "rootUrl": "https://logging.googleapis.com/", "schemas": { "BigQueryOptions": { @@ -5974,7 +5974,7 @@ "type": "object" }, "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for Empty is empty JSON object {}.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } ", "id": "Empty", "properties": {}, "type": "object" diff --git a/logging/v2/logging-gen.go b/logging/v2/logging-gen.go index aaf012ca3c9..8d6a3492d1a 100644 --- a/logging/v2/logging-gen.go +++ b/logging/v2/logging-gen.go @@ -1029,8 +1029,7 @@ func (s *CopyLogEntriesResponse) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for Empty is empty -// JSON object {}. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/oslogin/v1/oslogin-api.json b/oslogin/v1/oslogin-api.json index 464e34e51e9..1bd6929d61e 100644 --- a/oslogin/v1/oslogin-api.json +++ b/oslogin/v1/oslogin-api.json @@ -343,11 +343,11 @@ } } }, - "revision": "20211203", + "revision": "20220319", "rootUrl": "https://oslogin.googleapis.com/", "schemas": { "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/oslogin/v1/oslogin-gen.go b/oslogin/v1/oslogin-gen.go index bcf911a31a7..d61b421b38d 100644 --- a/oslogin/v1/oslogin-gen.go +++ b/oslogin/v1/oslogin-gen.go @@ -193,8 +193,7 @@ type UsersSshPublicKeysService struct { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/oslogin/v1alpha/oslogin-api.json b/oslogin/v1alpha/oslogin-api.json index b71ea8b4b93..955763658f9 100644 --- a/oslogin/v1alpha/oslogin-api.json +++ b/oslogin/v1alpha/oslogin-api.json @@ -403,11 +403,11 @@ } } }, - "revision": "20211203", + "revision": "20220319", "rootUrl": "https://oslogin.googleapis.com/", "schemas": { "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/oslogin/v1alpha/oslogin-gen.go b/oslogin/v1alpha/oslogin-gen.go index e2720ccccc4..1af36a57060 100644 --- a/oslogin/v1alpha/oslogin-gen.go +++ b/oslogin/v1alpha/oslogin-gen.go @@ -193,8 +193,7 @@ type UsersSshPublicKeysService struct { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/retail/v2/retail-api.json b/retail/v2/retail-api.json index bd5ffcd0d81..376d59a35ae 100644 --- a/retail/v2/retail-api.json +++ b/retail/v2/retail-api.json @@ -614,7 +614,7 @@ "completionData": { "methods": { "import": { - "description": "Bulk import of processed completion dataset. Request processing may be synchronous. Partial updating is not supported. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", + "description": "Bulk import of processed completion dataset. Request processing is asynchronous. Partial updating is not supported. The operation is successfully finished only after the imported suggestions are indexed successfully and ready for serving. The process takes hours. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionData:import", "httpMethod": "POST", "id": "retail.projects.locations.catalogs.completionData.import", @@ -725,7 +725,7 @@ ], "parameters": { "placement": { - "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} or {name=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", "required": true, @@ -753,7 +753,7 @@ ], "parameters": { "placement": { - "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving configuration name and the set of models that will be used to make the search.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", "required": true, @@ -773,6 +773,66 @@ } } }, + "servingConfigs": { + "methods": { + "predict": { + "description": "Makes a recommendation prediction.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:predict", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.servingConfigs.predict", + "parameterOrder": [ + "placement" + ], + "parameters": { + "placement": { + "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} or {name=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+placement}:predict", + "request": { + "$ref": "GoogleCloudRetailV2PredictRequest" + }, + "response": { + "$ref": "GoogleCloudRetailV2PredictResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "search": { + "description": "Performs a search. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:search", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.servingConfigs.search", + "parameterOrder": [ + "placement" + ], + "parameters": { + "placement": { + "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+placement}:search", + "request": { + "$ref": "GoogleCloudRetailV2SearchRequest" + }, + "response": { + "$ref": "GoogleCloudRetailV2SearchResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "userEvents": { "methods": { "collect": { @@ -1077,7 +1137,7 @@ } } }, - "revision": "20220316", + "revision": "20220319", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -1295,7 +1355,7 @@ "id": "GoogleCloudRetailV2BigQuerySource", "properties": { "dataSchema": { - "description": "The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: The schema is available here: https://support.google.com/analytics/answer/3437719. * `user_event_ga4`: This feature is in private preview. Please contact the support team for importing Google Analytics 4 events. The schema is available here: https://support.google.com/analytics/answer/7029846.", + "description": "The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: The schema is available here: https://support.google.com/analytics/answer/3437719. * `user_event_ga4`: This feature is in private preview. Please contact the support team for importing Google Analytics 4 events. The schema is available here: https://support.google.com/analytics/answer/7029846. Supported values for auto-completion imports: * `suggestions` (default): One JSON completion suggestion per line. * `denylist`: One JSON deny suggestion per line. * `allowlist`: One JSON allow suggestion per line.", "type": "string" }, "datasetId": { @@ -1366,7 +1426,7 @@ "id": "GoogleCloudRetailV2CompleteQueryResponse", "properties": { "attributionToken": { - "description": "A unique complete token. This should be included in the SearchRequest resulting from this completion, which enables accurate attribution of complete model performance.", + "description": "A unique complete token. This should be included in the UserEvent.completion_detail for search events resulting from this completion, which enables accurate attribution of complete model performance.", "type": "string" }, "completionResults": { @@ -1394,7 +1454,7 @@ "additionalProperties": { "$ref": "GoogleCloudRetailV2CustomAttribute" }, - "description": "Additional custom attributes ingested through BigQuery.", + "description": "Custom attributes for the suggestion term. * For \"user-data\", the attributes are additional custom attributes ingested through BigQuery. * For \"cloud-retail\", the attributes are product attributes generated by Cloud Retail.", "type": "object" }, "suggestion": { @@ -1612,7 +1672,7 @@ "type": "string" }, "requestId": { - "description": "Id of the request / operation. This is parroting back the requestId that was passed in the request.", + "description": "Deprecated. This field is never set.", "type": "string" }, "successCount": { @@ -1659,7 +1719,7 @@ "type": "string" }, "requestId": { - "description": "Unique identifier provided by client, within the ancestor dataset scope. Ensures idempotency and used for request deduplication. Server-generated if unspecified. Up to 128 characters long and must match the pattern: `[a-zA-Z0-9_]+`. This is returned as Operation.name in ImportMetadata. Only supported when ImportProductsRequest.reconciliation_mode is set to `FULL`.", + "description": "Deprecated. This field has no effect.", "type": "string" }, "updateMask": { @@ -3175,7 +3235,7 @@ "type": "string" }, "requestId": { - "description": "Id of the request / operation. This is parroting back the requestId that was passed in the request.", + "description": "Deprecated. This field is never set.", "type": "string" }, "successCount": { @@ -3486,7 +3546,7 @@ "type": "string" }, "requestId": { - "description": "Id of the request / operation. This is parroting back the requestId that was passed in the request.", + "description": "Deprecated. This field is never set.", "type": "string" }, "successCount": { @@ -3673,7 +3733,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/retail/v2/retail-gen.go b/retail/v2/retail-gen.go index cfdbcbb5155..9cdb7ad9a7a 100644 --- a/retail/v2/retail-gen.go +++ b/retail/v2/retail-gen.go @@ -173,6 +173,7 @@ func NewProjectsLocationsCatalogsService(s *Service) *ProjectsLocationsCatalogsS rs.CompletionData = NewProjectsLocationsCatalogsCompletionDataService(s) rs.Operations = NewProjectsLocationsCatalogsOperationsService(s) rs.Placements = NewProjectsLocationsCatalogsPlacementsService(s) + rs.ServingConfigs = NewProjectsLocationsCatalogsServingConfigsService(s) rs.UserEvents = NewProjectsLocationsCatalogsUserEventsService(s) return rs } @@ -188,6 +189,8 @@ type ProjectsLocationsCatalogsService struct { Placements *ProjectsLocationsCatalogsPlacementsService + ServingConfigs *ProjectsLocationsCatalogsServingConfigsService + UserEvents *ProjectsLocationsCatalogsUserEventsService } @@ -251,6 +254,15 @@ type ProjectsLocationsCatalogsPlacementsService struct { s *Service } +func NewProjectsLocationsCatalogsServingConfigsService(s *Service) *ProjectsLocationsCatalogsServingConfigsService { + rs := &ProjectsLocationsCatalogsServingConfigsService{s: s} + return rs +} + +type ProjectsLocationsCatalogsServingConfigsService struct { + s *Service +} + func NewProjectsLocationsCatalogsUserEventsService(s *Service) *ProjectsLocationsCatalogsUserEventsService { rs := &ProjectsLocationsCatalogsUserEventsService{s: s} return rs @@ -705,7 +717,11 @@ type GoogleCloudRetailV2BigQuerySource struct { // * `user_event_ga4`: This feature is in private preview. Please // contact the support team for importing Google Analytics 4 events. The // schema is available here: - // https://support.google.com/analytics/answer/7029846. + // https://support.google.com/analytics/answer/7029846. Supported values + // for auto-completion imports: * `suggestions` (default): One JSON + // completion suggestion per line. * `denylist`: One JSON deny + // suggestion per line. * `allowlist`: One JSON allow suggestion per + // line. DataSchema string `json:"dataSchema,omitempty"` // DatasetId: Required. The BigQuery data set to copy the data from with @@ -848,8 +864,9 @@ func (s *GoogleCloudRetailV2ColorInfo) MarshalJSON() ([]byte, error) { // auto-complete query. type GoogleCloudRetailV2CompleteQueryResponse struct { // AttributionToken: A unique complete token. This should be included in - // the SearchRequest resulting from this completion, which enables - // accurate attribution of complete model performance. + // the UserEvent.completion_detail for search events resulting from this + // completion, which enables accurate attribution of complete model + // performance. AttributionToken string `json:"attributionToken,omitempty"` // CompletionResults: Results of the matching suggestions. The result @@ -900,7 +917,10 @@ func (s *GoogleCloudRetailV2CompleteQueryResponse) MarshalJSON() ([]byte, error) // GoogleCloudRetailV2CompleteQueryResponseCompletionResult: Resource // that represents completion results. type GoogleCloudRetailV2CompleteQueryResponseCompletionResult struct { - // Attributes: Additional custom attributes ingested through BigQuery. + // Attributes: Custom attributes for the suggestion term. * For + // "user-data", the attributes are additional custom attributes ingested + // through BigQuery. * For "cloud-retail", the attributes are product + // attributes generated by Cloud Retail. Attributes map[string]GoogleCloudRetailV2CustomAttribute `json:"attributes,omitempty"` // Suggestion: The suggestion for the query. @@ -1386,8 +1406,7 @@ type GoogleCloudRetailV2ImportMetadata struct { // `projects/{project}/topics/{topic}`. NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"` - // RequestId: Id of the request / operation. This is parroting back the - // requestId that was passed in the request. + // RequestId: Deprecated. This field is never set. RequestId string `json:"requestId,omitempty"` // SuccessCount: Count of entries that were processed successfully. @@ -1458,12 +1477,7 @@ type GoogleCloudRetailV2ImportProductsRequest struct { // if you are interested in using Retail Search. ReconciliationMode string `json:"reconciliationMode,omitempty"` - // RequestId: Unique identifier provided by client, within the ancestor - // dataset scope. Ensures idempotency and used for request - // deduplication. Server-generated if unspecified. Up to 128 characters - // long and must match the pattern: `[a-zA-Z0-9_]+`. This is returned as - // Operation.name in ImportMetadata. Only supported when - // ImportProductsRequest.reconciliation_mode is set to `FULL`. + // RequestId: Deprecated. This field has no effect. RequestId string `json:"requestId,omitempty"` // UpdateMask: Indicates which fields in the provided imported @@ -4518,8 +4532,7 @@ type GoogleCloudRetailV2alphaImportMetadata struct { // `projects/{project}/topics/{topic}`. NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"` - // RequestId: Id of the request / operation. This is parroting back the - // requestId that was passed in the request. + // RequestId: Deprecated. This field is never set. RequestId string `json:"requestId,omitempty"` // SuccessCount: Count of entries that were processed successfully. @@ -5094,8 +5107,7 @@ type GoogleCloudRetailV2betaImportMetadata struct { // `projects/{project}/topics/{topic}`. NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"` - // RequestId: Id of the request / operation. This is parroting back the - // requestId that was passed in the request. + // RequestId: Deprecated. This field is never set. RequestId string `json:"requestId,omitempty"` // SuccessCount: Count of entries that were processed successfully. @@ -5446,8 +5458,7 @@ func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { // avoid defining duplicated empty messages in your APIs. A typical // example is to use it as the request or the response type of an API // method. For instance: service Foo { rpc Bar(google.protobuf.Empty) -// returns (google.protobuf.Empty); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -8126,10 +8137,13 @@ type ProjectsLocationsCatalogsCompletionDataImportCall struct { } // Import: Bulk import of processed completion dataset. Request -// processing may be synchronous. Partial updating is not supported. -// This feature is only available for users who have Retail Search -// enabled. Please submit a form here (https://cloud.google.com/contact) -// to contact cloud sales if you are interested in using Retail Search. +// processing is asynchronous. Partial updating is not supported. The +// operation is successfully finished only after the imported +// suggestions are indexed successfully and ready for serving. The +// process takes hours. This feature is only available for users who +// have Retail Search enabled. Please submit a form here +// (https://cloud.google.com/contact) to contact cloud sales if you are +// interested in using Retail Search. // // - parent: The catalog which the suggestions dataset belongs to. // Format: `projects/1234/locations/global/catalogs/default_catalog`. @@ -8231,7 +8245,7 @@ func (c *ProjectsLocationsCatalogsCompletionDataImportCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Bulk import of processed completion dataset. Request processing may be synchronous. Partial updating is not supported. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", + // "description": "Bulk import of processed completion dataset. Request processing is asynchronous. Partial updating is not supported. The operation is successfully finished only after the imported suggestions are indexed successfully and ready for serving. The process takes hours. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionData:import", // "httpMethod": "POST", // "id": "retail.projects.locations.catalogs.completionData.import", @@ -8638,7 +8652,9 @@ type ProjectsLocationsCatalogsPlacementsPredictCall struct { // // - placement: Full resource name of the format: // {name=projects/*/locations/global/catalogs/default_catalog/placement -// s/*} The ID of the Recommendations AI placement. Before you can +// s/*} or +// {name=projects/*/locations/global/catalogs/default_catalog/servingCo +// nfigs/*} The ID of the Recommendations AI placement. Before you can // request predictions from your model, you must create at least one // placement for it. For more information, see Managing placements // (https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). @@ -8752,7 +8768,7 @@ func (c *ProjectsLocationsCatalogsPlacementsPredictCall) Do(opts ...googleapi.Ca // ], // "parameters": { // "placement": { - // "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + // "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} or {name=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", // "required": true, @@ -8792,7 +8808,9 @@ type ProjectsLocationsCatalogsPlacementsSearchCall struct { // - placement: The resource name of the search engine placement, such // as // `projects/*/locations/global/catalogs/default_catalog/placements/def -// ault_search`. This field is used to identify the serving +// ault_search` or +// `projects/*/locations/global/catalogs/default_catalog/servingConfigs +// /default_serving_config` This field is used to identify the serving // configuration name and the set of models that will be used to make // the search. func (r *ProjectsLocationsCatalogsPlacementsService) Search(placement string, googlecloudretailv2searchrequest *GoogleCloudRetailV2SearchRequest) *ProjectsLocationsCatalogsPlacementsSearchCall { @@ -8903,7 +8921,7 @@ func (c *ProjectsLocationsCatalogsPlacementsSearchCall) Do(opts ...googleapi.Cal // ], // "parameters": { // "placement": { - // "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + // "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving configuration name and the set of models that will be used to make the search.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", // "required": true, @@ -8945,6 +8963,332 @@ func (c *ProjectsLocationsCatalogsPlacementsSearchCall) Pages(ctx context.Contex } } +// method id "retail.projects.locations.catalogs.servingConfigs.predict": + +type ProjectsLocationsCatalogsServingConfigsPredictCall struct { + s *Service + placement string + googlecloudretailv2predictrequest *GoogleCloudRetailV2PredictRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Predict: Makes a recommendation prediction. +// +// - placement: Full resource name of the format: +// {name=projects/*/locations/global/catalogs/default_catalog/placement +// s/*} or +// {name=projects/*/locations/global/catalogs/default_catalog/servingCo +// nfigs/*} The ID of the Recommendations AI placement. Before you can +// request predictions from your model, you must create at least one +// placement for it. For more information, see Managing placements +// (https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). +// The full list of available placements can be seen at +// https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements. +func (r *ProjectsLocationsCatalogsServingConfigsService) Predict(placement string, googlecloudretailv2predictrequest *GoogleCloudRetailV2PredictRequest) *ProjectsLocationsCatalogsServingConfigsPredictCall { + c := &ProjectsLocationsCatalogsServingConfigsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.placement = placement + c.googlecloudretailv2predictrequest = googlecloudretailv2predictrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsServingConfigsPredictCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) Context(ctx context.Context) *ProjectsLocationsCatalogsServingConfigsPredictCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2predictrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+placement}:predict") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "placement": c.placement, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.servingConfigs.predict" call. +// Exactly one of *GoogleCloudRetailV2PredictResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudRetailV2PredictResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2PredictResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRetailV2PredictResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Makes a recommendation prediction.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:predict", + // "httpMethod": "POST", + // "id": "retail.projects.locations.catalogs.servingConfigs.predict", + // "parameterOrder": [ + // "placement" + // ], + // "parameters": { + // "placement": { + // "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} or {name=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+placement}:predict", + // "request": { + // "$ref": "GoogleCloudRetailV2PredictRequest" + // }, + // "response": { + // "$ref": "GoogleCloudRetailV2PredictResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "retail.projects.locations.catalogs.servingConfigs.search": + +type ProjectsLocationsCatalogsServingConfigsSearchCall struct { + s *Service + placement string + googlecloudretailv2searchrequest *GoogleCloudRetailV2SearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Search: Performs a search. This feature is only available for users +// who have Retail Search enabled. Please submit a form here +// (https://cloud.google.com/contact) to contact cloud sales if you are +// interested in using Retail Search. +// +// - placement: The resource name of the search engine placement, such +// as +// `projects/*/locations/global/catalogs/default_catalog/placements/def +// ault_search` or +// `projects/*/locations/global/catalogs/default_catalog/servingConfigs +// /default_serving_config` This field is used to identify the serving +// configuration name and the set of models that will be used to make +// the search. +func (r *ProjectsLocationsCatalogsServingConfigsService) Search(placement string, googlecloudretailv2searchrequest *GoogleCloudRetailV2SearchRequest) *ProjectsLocationsCatalogsServingConfigsSearchCall { + c := &ProjectsLocationsCatalogsServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.placement = placement + c.googlecloudretailv2searchrequest = googlecloudretailv2searchrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsServingConfigsSearchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsServingConfigsSearchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2searchrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+placement}:search") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "placement": c.placement, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.servingConfigs.search" call. +// Exactly one of *GoogleCloudRetailV2SearchResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudRetailV2SearchResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2SearchResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRetailV2SearchResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Performs a search. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:search", + // "httpMethod": "POST", + // "id": "retail.projects.locations.catalogs.servingConfigs.search", + // "parameterOrder": [ + // "placement" + // ], + // "parameters": { + // "placement": { + // "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+placement}:search", + // "request": { + // "$ref": "GoogleCloudRetailV2SearchRequest" + // }, + // "response": { + // "$ref": "GoogleCloudRetailV2SearchResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudRetailV2SearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googlecloudretailv2searchrequest.PageToken = pt }(c.googlecloudretailv2searchrequest.PageToken) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.googlecloudretailv2searchrequest.PageToken = x.NextPageToken + } +} + // method id "retail.projects.locations.catalogs.userEvents.collect": type ProjectsLocationsCatalogsUserEventsCollectCall struct { diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index 676bc0b9dc3..27222d3fd57 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -193,6 +193,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getCompletionConfig": { + "description": "Gets a CompletionConfig.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", + "httpMethod": "GET", + "id": "retail.projects.locations.catalogs.getCompletionConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full CompletionConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "response": { + "$ref": "GoogleCloudRetailV2alphaCompletionConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "getDefaultBranch": { "description": "Get which branch is currently default branch set by CatalogService.SetDefaultBranch method under a specified parent catalog.", "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}:getDefaultBranch", @@ -349,6 +374,40 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "updateCompletionConfig": { + "description": "Updates the CompletionConfigs.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", + "httpMethod": "PATCH", + "id": "retail.projects.locations.catalogs.updateCompletionConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Immutable. Fully qualified name projects/*/locations/*/catalogs/*/completionConfig", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided CompletionConfig to update. The following are the only supported fields: * CompletionConfig.matching_order * CompletionConfig.max_suggestions * CompletionConfig.min_prefix_length * CompletionConfig.auto_learning If not set, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "request": { + "$ref": "GoogleCloudRetailV2alphaCompletionConfig" + }, + "response": { + "$ref": "GoogleCloudRetailV2alphaCompletionConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -850,7 +909,7 @@ "completionData": { "methods": { "import": { - "description": "Bulk import of processed completion dataset. Request processing may be synchronous. Partial updating is not supported. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", + "description": "Bulk import of processed completion dataset. Request processing is asynchronous. Partial updating is not supported. The operation is successfully finished only after the imported suggestions are indexed successfully and ready for serving. The process takes hours. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionData:import", "httpMethod": "POST", "id": "retail.projects.locations.catalogs.completionData.import", @@ -1123,7 +1182,7 @@ ], "parameters": { "placement": { - "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} or {name=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", "required": true, @@ -1151,7 +1210,7 @@ ], "parameters": { "placement": { - "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving configuration name and the set of models that will be used to make the search.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", "required": true, @@ -1354,6 +1413,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "predict": { + "description": "Makes a recommendation prediction.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:predict", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.servingConfigs.predict", + "parameterOrder": [ + "placement" + ], + "parameters": { + "placement": { + "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} or {name=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+placement}:predict", + "request": { + "$ref": "GoogleCloudRetailV2alphaPredictRequest" + }, + "response": { + "$ref": "GoogleCloudRetailV2alphaPredictResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "removeControl": { "description": "Disables a Control on the specified ServingConfig. The control is removed from the ServingConfig. Returns a NOT_FOUND error if the Control is not enabled for the ServingConfig.", "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:removeControl", @@ -1381,6 +1468,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "search": { + "description": "Performs a search. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:search", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.servingConfigs.search", + "parameterOrder": [ + "placement" + ], + "parameters": { + "placement": { + "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+placement}:search", + "request": { + "$ref": "GoogleCloudRetailV2alphaSearchRequest" + }, + "response": { + "$ref": "GoogleCloudRetailV2alphaSearchResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -1688,7 +1803,7 @@ } } }, - "revision": "20220316", + "revision": "20220319", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -1897,7 +2012,7 @@ "type": "string" }, "requestId": { - "description": "Id of the request / operation. This is parroting back the requestId that was passed in the request.", + "description": "Deprecated. This field is never set.", "type": "string" }, "successCount": { @@ -2190,7 +2305,7 @@ "id": "GoogleCloudRetailV2alphaBigQuerySource", "properties": { "dataSchema": { - "description": "The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: The schema is available here: https://support.google.com/analytics/answer/3437719. * `user_event_ga4`: This feature is in private preview. Please contact the support team for importing Google Analytics 4 events. The schema is available here: https://support.google.com/analytics/answer/7029846.", + "description": "The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: The schema is available here: https://support.google.com/analytics/answer/3437719. * `user_event_ga4`: This feature is in private preview. Please contact the support team for importing Google Analytics 4 events. The schema is available here: https://support.google.com/analytics/answer/7029846. Supported values for auto-completion imports: * `suggestions` (default): One JSON completion suggestion per line. * `denylist`: One JSON deny suggestion per line. * `allowlist`: One JSON allow suggestion per line.", "type": "string" }, "datasetId": { @@ -2338,7 +2453,7 @@ "id": "GoogleCloudRetailV2alphaCompleteQueryResponse", "properties": { "attributionToken": { - "description": "A unique complete token. This should be included in the SearchRequest resulting from this completion, which enables accurate attribution of complete model performance.", + "description": "A unique complete token. This should be included in the UserEvent.completion_detail for search events resulting from this completion, which enables accurate attribution of complete model performance.", "type": "string" }, "completionResults": { @@ -2366,7 +2481,7 @@ "additionalProperties": { "$ref": "GoogleCloudRetailV2alphaCustomAttribute" }, - "description": "Additional custom attributes ingested through BigQuery.", + "description": "Custom attributes for the suggestion term. * For \"user-data\", the attributes are additional custom attributes ingested through BigQuery. * For \"cloud-retail\", the attributes are product attributes generated by Cloud Retail.", "type": "object" }, "suggestion": { @@ -2387,6 +2502,65 @@ }, "type": "object" }, + "GoogleCloudRetailV2alphaCompletionConfig": { + "description": "Catalog level autocomplete config for customers to customize autocomplete feature's settings.", + "id": "GoogleCloudRetailV2alphaCompletionConfig", + "properties": { + "allowlistInputConfig": { + "$ref": "GoogleCloudRetailV2alphaCompletionDataInputConfig", + "description": "Output only. The input config for the import of the source data that contains the autocomplete allowlist phrases uploaded by the customer.", + "readOnly": true + }, + "autoLearning": { + "description": "If set to true, the auto learning function is enabled. Auto learning uses user data to generate suggestions using ML techniques. Default value is false. Only after enabling auto learning can users use `cloud-retail` data in CompleteQueryRequest.", + "type": "boolean" + }, + "denylistInputConfig": { + "$ref": "GoogleCloudRetailV2alphaCompletionDataInputConfig", + "description": "Output only. The input config for the import of the source data that contains the / autocomplete denylist phrases uploaded by the customer.", + "readOnly": true + }, + "lastAllowlistImportOperation": { + "description": "Output only. LRO corresponding to the latest allowlist import. Can use GetOperation API to retrieve the latest state of the Long Running Operation.", + "readOnly": true, + "type": "string" + }, + "lastDenylistImportOperation": { + "description": "Output only. LRO corresponding to the latest denylist import. Can use GetOperation API to retrieve the latest state of the Long Running Operation.", + "readOnly": true, + "type": "string" + }, + "lastSuggestionsImportOperation": { + "description": "Output only. Name of the LRO corresponding to the latest suggestion terms list import. Can use GetOperation API to retrieve the latest state of the Long Running Operation.", + "readOnly": true, + "type": "string" + }, + "matchingOrder": { + "description": "Specifies the matching order for autocomplete suggestions, e.g., a query consisting of 'sh' with 'out-of-order' specified would suggest \"women's shoes\", whereas a query of 'red s' with 'exact-prefix' specified would suggest \"red shoes\". Currently supported values: * 'out-of-order' * 'exact-prefix' Default value: 'exact-prefix'.", + "type": "string" + }, + "maxSuggestions": { + "description": "The maximum number of autocomplete suggestions returned per term. The maximum allowed max suggestions is 20. Default value is 20. If left unset or set to 0, then will fallback to default value.", + "format": "int32", + "type": "integer" + }, + "minPrefixLength": { + "description": "The minimum number of characters needed to be typed in order to get suggestions. Default value is 2. If left unset or set to 0, then will fallback to default value.", + "format": "int32", + "type": "integer" + }, + "name": { + "description": "Required. Immutable. Fully qualified name projects/*/locations/*/catalogs/*/completionConfig", + "type": "string" + }, + "suggestionsInputConfig": { + "$ref": "GoogleCloudRetailV2alphaCompletionDataInputConfig", + "description": "Output only. The input config for the import of the source data that contains the autocomplete phrases uploaded by the customer.", + "readOnly": true + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaCompletionDataInputConfig": { "description": "The input config source for completion data.", "id": "GoogleCloudRetailV2alphaCompletionDataInputConfig", @@ -2766,7 +2940,7 @@ "type": "string" }, "requestId": { - "description": "Id of the request / operation. This is parroting back the requestId that was passed in the request.", + "description": "Deprecated. This field is never set.", "type": "string" }, "successCount": { @@ -2813,7 +2987,7 @@ "type": "string" }, "requestId": { - "description": "Unique identifier provided by client, within the ancestor dataset scope. Ensures idempotency and used for request deduplication. Server-generated if unspecified. Up to 128 characters long and must match the pattern: `[a-zA-Z0-9_]+`. This is returned as Operation.name in ImportMetadata. Only supported when ImportProductsRequest.reconciliation_mode is set to `FULL`.", + "description": "Deprecated. This field has no effect.", "type": "string" }, "updateMask": { @@ -4879,7 +5053,7 @@ "type": "string" }, "requestId": { - "description": "Id of the request / operation. This is parroting back the requestId that was passed in the request.", + "description": "Deprecated. This field is never set.", "type": "string" }, "successCount": { @@ -5066,7 +5240,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index 01954d7090a..09ecb702569 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -702,8 +702,7 @@ type GoogleCloudRetailV2ImportMetadata struct { // `projects/{project}/topics/{topic}`. NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"` - // RequestId: Id of the request / operation. This is parroting back the - // requestId that was passed in the request. + // RequestId: Deprecated. This field is never set. RequestId string `json:"requestId,omitempty"` // SuccessCount: Count of entries that were processed successfully. @@ -1271,7 +1270,11 @@ type GoogleCloudRetailV2alphaBigQuerySource struct { // * `user_event_ga4`: This feature is in private preview. Please // contact the support team for importing Google Analytics 4 events. The // schema is available here: - // https://support.google.com/analytics/answer/7029846. + // https://support.google.com/analytics/answer/7029846. Supported values + // for auto-completion imports: * `suggestions` (default): One JSON + // completion suggestion per line. * `denylist`: One JSON deny + // suggestion per line. * `allowlist`: One JSON allow suggestion per + // line. DataSchema string `json:"dataSchema,omitempty"` // DatasetId: Required. The BigQuery data set to copy the data from with @@ -1519,8 +1522,9 @@ func (s *GoogleCloudRetailV2alphaColorInfo) MarshalJSON() ([]byte, error) { // auto-complete query. type GoogleCloudRetailV2alphaCompleteQueryResponse struct { // AttributionToken: A unique complete token. This should be included in - // the SearchRequest resulting from this completion, which enables - // accurate attribution of complete model performance. + // the UserEvent.completion_detail for search events resulting from this + // completion, which enables accurate attribution of complete model + // performance. AttributionToken string `json:"attributionToken,omitempty"` // CompletionResults: Results of the matching suggestions. The result @@ -1571,7 +1575,10 @@ func (s *GoogleCloudRetailV2alphaCompleteQueryResponse) MarshalJSON() ([]byte, e // GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResult: // Resource that represents completion results. type GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResult struct { - // Attributes: Additional custom attributes ingested through BigQuery. + // Attributes: Custom attributes for the suggestion term. * For + // "user-data", the attributes are additional custom attributes ingested + // through BigQuery. * For "cloud-retail", the attributes are product + // attributes generated by Cloud Retail. Attributes map[string]GoogleCloudRetailV2alphaCustomAttribute `json:"attributes,omitempty"` // Suggestion: The suggestion for the query. @@ -1629,6 +1636,98 @@ func (s *GoogleCloudRetailV2alphaCompleteQueryResponseRecentSearchResult) Marsha return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2alphaCompletionConfig: Catalog level autocomplete +// config for customers to customize autocomplete feature's settings. +type GoogleCloudRetailV2alphaCompletionConfig struct { + // AllowlistInputConfig: Output only. The input config for the import of + // the source data that contains the autocomplete allowlist phrases + // uploaded by the customer. + AllowlistInputConfig *GoogleCloudRetailV2alphaCompletionDataInputConfig `json:"allowlistInputConfig,omitempty"` + + // AutoLearning: If set to true, the auto learning function is enabled. + // Auto learning uses user data to generate suggestions using ML + // techniques. Default value is false. Only after enabling auto learning + // can users use `cloud-retail` data in CompleteQueryRequest. + AutoLearning bool `json:"autoLearning,omitempty"` + + // DenylistInputConfig: Output only. The input config for the import of + // the source data that contains the / autocomplete denylist phrases + // uploaded by the customer. + DenylistInputConfig *GoogleCloudRetailV2alphaCompletionDataInputConfig `json:"denylistInputConfig,omitempty"` + + // LastAllowlistImportOperation: Output only. LRO corresponding to the + // latest allowlist import. Can use GetOperation API to retrieve the + // latest state of the Long Running Operation. + LastAllowlistImportOperation string `json:"lastAllowlistImportOperation,omitempty"` + + // LastDenylistImportOperation: Output only. LRO corresponding to the + // latest denylist import. Can use GetOperation API to retrieve the + // latest state of the Long Running Operation. + LastDenylistImportOperation string `json:"lastDenylistImportOperation,omitempty"` + + // LastSuggestionsImportOperation: Output only. Name of the LRO + // corresponding to the latest suggestion terms list import. Can use + // GetOperation API to retrieve the latest state of the Long Running + // Operation. + LastSuggestionsImportOperation string `json:"lastSuggestionsImportOperation,omitempty"` + + // MatchingOrder: Specifies the matching order for autocomplete + // suggestions, e.g., a query consisting of 'sh' with 'out-of-order' + // specified would suggest "women's shoes", whereas a query of 'red s' + // with 'exact-prefix' specified would suggest "red shoes". Currently + // supported values: * 'out-of-order' * 'exact-prefix' Default value: + // 'exact-prefix'. + MatchingOrder string `json:"matchingOrder,omitempty"` + + // MaxSuggestions: The maximum number of autocomplete suggestions + // returned per term. The maximum allowed max suggestions is 20. Default + // value is 20. If left unset or set to 0, then will fallback to default + // value. + MaxSuggestions int64 `json:"maxSuggestions,omitempty"` + + // MinPrefixLength: The minimum number of characters needed to be typed + // in order to get suggestions. Default value is 2. If left unset or set + // to 0, then will fallback to default value. + MinPrefixLength int64 `json:"minPrefixLength,omitempty"` + + // Name: Required. Immutable. Fully qualified name + // projects/*/locations/*/catalogs/*/completionConfig + Name string `json:"name,omitempty"` + + // SuggestionsInputConfig: Output only. The input config for the import + // of the source data that contains the autocomplete phrases uploaded by + // the customer. + SuggestionsInputConfig *GoogleCloudRetailV2alphaCompletionDataInputConfig `json:"suggestionsInputConfig,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AllowlistInputConfig") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllowlistInputConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2alphaCompletionConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaCompletionConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaCompletionDataInputConfig: The input config // source for completion data. type GoogleCloudRetailV2alphaCompletionDataInputConfig struct { @@ -2392,8 +2491,7 @@ type GoogleCloudRetailV2alphaImportMetadata struct { // `projects/{project}/topics/{topic}`. NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"` - // RequestId: Id of the request / operation. This is parroting back the - // requestId that was passed in the request. + // RequestId: Deprecated. This field is never set. RequestId string `json:"requestId,omitempty"` // SuccessCount: Count of entries that were processed successfully. @@ -2464,12 +2562,7 @@ type GoogleCloudRetailV2alphaImportProductsRequest struct { // if you are interested in using Retail Search. ReconciliationMode string `json:"reconciliationMode,omitempty"` - // RequestId: Unique identifier provided by client, within the ancestor - // dataset scope. Ensures idempotency and used for request - // deduplication. Server-generated if unspecified. Up to 128 characters - // long and must match the pattern: `[a-zA-Z0-9_]+`. This is returned as - // Operation.name in ImportMetadata. Only supported when - // ImportProductsRequest.reconciliation_mode is set to `FULL`. + // RequestId: Deprecated. This field has no effect. RequestId string `json:"requestId,omitempty"` // UpdateMask: Indicates which fields in the provided imported @@ -6569,8 +6662,7 @@ type GoogleCloudRetailV2betaImportMetadata struct { // `projects/{project}/topics/{topic}`. NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"` - // RequestId: Id of the request / operation. This is parroting back the - // requestId that was passed in the request. + // RequestId: Deprecated. This field is never set. RequestId string `json:"requestId,omitempty"` // SuccessCount: Count of entries that were processed successfully. @@ -6921,8 +7013,7 @@ func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { // avoid defining duplicated empty messages in your APIs. A typical // example is to use it as the request or the response type of an API // method. For instance: service Foo { rpc Bar(google.protobuf.Empty) -// returns (google.protobuf.Empty); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -7423,6 +7514,156 @@ func (c *ProjectsLocationsCatalogsGetAttributesConfigCall) Do(opts ...googleapi. } +// method id "retail.projects.locations.catalogs.getCompletionConfig": + +type ProjectsLocationsCatalogsGetCompletionConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetCompletionConfig: Gets a CompletionConfig. +// +// - name: Full CompletionConfig resource name. Format: +// projects/{project_number}/locations/{location_id}/catalogs/{catalog_ +// id}/completionConfig. +func (r *ProjectsLocationsCatalogsService) GetCompletionConfig(name string) *ProjectsLocationsCatalogsGetCompletionConfigCall { + c := &ProjectsLocationsCatalogsGetCompletionConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsGetCompletionConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsGetCompletionConfigCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) Context(ctx context.Context) *ProjectsLocationsCatalogsGetCompletionConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.getCompletionConfig" call. +// Exactly one of *GoogleCloudRetailV2alphaCompletionConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRetailV2alphaCompletionConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2alphaCompletionConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRetailV2alphaCompletionConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a CompletionConfig.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", + // "httpMethod": "GET", + // "id": "retail.projects.locations.catalogs.getCompletionConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Full CompletionConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+name}", + // "response": { + // "$ref": "GoogleCloudRetailV2alphaCompletionConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "retail.projects.locations.catalogs.getDefaultBranch": type ProjectsLocationsCatalogsGetDefaultBranchCall struct { @@ -8264,35 +8505,43 @@ func (c *ProjectsLocationsCatalogsUpdateAttributesConfigCall) Do(opts ...googlea } -// method id "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute": +// method id "retail.projects.locations.catalogs.updateCompletionConfig": -type ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall struct { - s *Service - attributesConfig string - googlecloudretailv2alphaaddcatalogattributerequest *GoogleCloudRetailV2alphaAddCatalogAttributeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCatalogsUpdateCompletionConfigCall struct { + s *Service + name string + googlecloudretailv2alphacompletionconfig *GoogleCloudRetailV2alphaCompletionConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AddCatalogAttribute: Adds the specified CatalogAttribute to the -// AttributesConfig. If the CatalogAttribute to add already exists, an -// ALREADY_EXISTS error is returned. +// UpdateCompletionConfig: Updates the CompletionConfigs. // -// - attributesConfig: Full AttributesConfig resource name. Format: -// projects/{project_number}/locations/{location_id}/catalogs/{catalog_ -// id}/attributesConfig. -func (r *ProjectsLocationsCatalogsAttributesConfigService) AddCatalogAttribute(attributesConfig string, googlecloudretailv2alphaaddcatalogattributerequest *GoogleCloudRetailV2alphaAddCatalogAttributeRequest) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { - c := &ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.attributesConfig = attributesConfig - c.googlecloudretailv2alphaaddcatalogattributerequest = googlecloudretailv2alphaaddcatalogattributerequest +// - name: Immutable. Fully qualified name +// projects/*/locations/*/catalogs/*/completionConfig. +func (r *ProjectsLocationsCatalogsService) UpdateCompletionConfig(name string, googlecloudretailv2alphacompletionconfig *GoogleCloudRetailV2alphaCompletionConfig) *ProjectsLocationsCatalogsUpdateCompletionConfigCall { + c := &ProjectsLocationsCatalogsUpdateCompletionConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudretailv2alphacompletionconfig = googlecloudretailv2alphacompletionconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided CompletionConfig to update. The following are +// the only supported fields: * CompletionConfig.matching_order * +// CompletionConfig.max_suggestions * CompletionConfig.min_prefix_length +// * CompletionConfig.auto_learning If not set, all supported fields are +// updated. +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsUpdateCompletionConfigCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsUpdateCompletionConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8300,21 +8549,21 @@ func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Field // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Context(ctx context.Context) *ProjectsLocationsCatalogsUpdateCompletionConfigCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Header() http.Header { +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -8322,36 +8571,36 @@ func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) doReq } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2alphaaddcatalogattributerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2alphacompletionconfig) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+attributesConfig}:addCatalogAttribute") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "attributesConfig": c.attributesConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute" call. -// Exactly one of *GoogleCloudRetailV2alphaAttributesConfig or error +// Do executes the "retail.projects.locations.catalogs.updateCompletionConfig" call. +// Exactly one of *GoogleCloudRetailV2alphaCompletionConfig or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudRetailV2alphaAttributesConfig.ServerResponse.Header or +// *GoogleCloudRetailV2alphaCompletionConfig.ServerResponse.Header or // (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2alphaAttributesConfig, error) { +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2alphaCompletionConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8370,7 +8619,7 @@ func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudRetailV2alphaAttributesConfig{ + ret := &GoogleCloudRetailV2alphaCompletionConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8382,28 +8631,34 @@ func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(op } return ret, nil // { - // "description": "Adds the specified CatalogAttribute to the AttributesConfig. If the CatalogAttribute to add already exists, an ALREADY_EXISTS error is returned.", - // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:addCatalogAttribute", - // "httpMethod": "POST", - // "id": "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute", + // "description": "Updates the CompletionConfigs.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", + // "httpMethod": "PATCH", + // "id": "retail.projects.locations.catalogs.updateCompletionConfig", // "parameterOrder": [ - // "attributesConfig" + // "name" // ], // "parameters": { - // "attributesConfig": { - // "description": "Required. Full AttributesConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig", + // "name": { + // "description": "Required. Immutable. Fully qualified name projects/*/locations/*/catalogs/*/completionConfig", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided CompletionConfig to update. The following are the only supported fields: * CompletionConfig.matching_order * CompletionConfig.max_suggestions * CompletionConfig.min_prefix_length * CompletionConfig.auto_learning If not set, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v2alpha/{+attributesConfig}:addCatalogAttribute", + // "path": "v2alpha/{+name}", // "request": { - // "$ref": "GoogleCloudRetailV2alphaAddCatalogAttributeRequest" + // "$ref": "GoogleCloudRetailV2alphaCompletionConfig" // }, // "response": { - // "$ref": "GoogleCloudRetailV2alphaAttributesConfig" + // "$ref": "GoogleCloudRetailV2alphaCompletionConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8412,35 +8667,35 @@ func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(op } -// method id "retail.projects.locations.catalogs.attributesConfig.removeCatalogAttribute": +// method id "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute": -type ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall struct { - s *Service - attributesConfig string - googlecloudretailv2alpharemovecatalogattributerequest *GoogleCloudRetailV2alphaRemoveCatalogAttributeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall struct { + s *Service + attributesConfig string + googlecloudretailv2alphaaddcatalogattributerequest *GoogleCloudRetailV2alphaAddCatalogAttributeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RemoveCatalogAttribute: Removes the specified CatalogAttribute from -// the AttributesConfig. If the CatalogAttribute to remove does not -// exist, a NOT_FOUND error is returned. +// AddCatalogAttribute: Adds the specified CatalogAttribute to the +// AttributesConfig. If the CatalogAttribute to add already exists, an +// ALREADY_EXISTS error is returned. // // - attributesConfig: Full AttributesConfig resource name. Format: // projects/{project_number}/locations/{location_id}/catalogs/{catalog_ // id}/attributesConfig. -func (r *ProjectsLocationsCatalogsAttributesConfigService) RemoveCatalogAttribute(attributesConfig string, googlecloudretailv2alpharemovecatalogattributerequest *GoogleCloudRetailV2alphaRemoveCatalogAttributeRequest) *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall { - c := &ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCatalogsAttributesConfigService) AddCatalogAttribute(attributesConfig string, googlecloudretailv2alphaaddcatalogattributerequest *GoogleCloudRetailV2alphaAddCatalogAttributeRequest) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { + c := &ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.attributesConfig = attributesConfig - c.googlecloudretailv2alpharemovecatalogattributerequest = googlecloudretailv2alpharemovecatalogattributerequest + c.googlecloudretailv2alphaaddcatalogattributerequest = googlecloudretailv2alphaaddcatalogattributerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall { +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8448,14 +8703,162 @@ func (c *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall) Fi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall { +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall) Header() http.Header { +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2alphaaddcatalogattributerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+attributesConfig}:addCatalogAttribute") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "attributesConfig": c.attributesConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute" call. +// Exactly one of *GoogleCloudRetailV2alphaAttributesConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRetailV2alphaAttributesConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2alphaAttributesConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRetailV2alphaAttributesConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Adds the specified CatalogAttribute to the AttributesConfig. If the CatalogAttribute to add already exists, an ALREADY_EXISTS error is returned.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:addCatalogAttribute", + // "httpMethod": "POST", + // "id": "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute", + // "parameterOrder": [ + // "attributesConfig" + // ], + // "parameters": { + // "attributesConfig": { + // "description": "Required. Full AttributesConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+attributesConfig}:addCatalogAttribute", + // "request": { + // "$ref": "GoogleCloudRetailV2alphaAddCatalogAttributeRequest" + // }, + // "response": { + // "$ref": "GoogleCloudRetailV2alphaAttributesConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "retail.projects.locations.catalogs.attributesConfig.removeCatalogAttribute": + +type ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall struct { + s *Service + attributesConfig string + googlecloudretailv2alpharemovecatalogattributerequest *GoogleCloudRetailV2alphaRemoveCatalogAttributeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RemoveCatalogAttribute: Removes the specified CatalogAttribute from +// the AttributesConfig. If the CatalogAttribute to remove does not +// exist, a NOT_FOUND error is returned. +// +// - attributesConfig: Full AttributesConfig resource name. Format: +// projects/{project_number}/locations/{location_id}/catalogs/{catalog_ +// id}/attributesConfig. +func (r *ProjectsLocationsCatalogsAttributesConfigService) RemoveCatalogAttribute(attributesConfig string, googlecloudretailv2alpharemovecatalogattributerequest *GoogleCloudRetailV2alphaRemoveCatalogAttributeRequest) *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall { + c := &ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.attributesConfig = attributesConfig + c.googlecloudretailv2alpharemovecatalogattributerequest = googlecloudretailv2alpharemovecatalogattributerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } @@ -10846,10 +11249,13 @@ type ProjectsLocationsCatalogsCompletionDataImportCall struct { } // Import: Bulk import of processed completion dataset. Request -// processing may be synchronous. Partial updating is not supported. -// This feature is only available for users who have Retail Search -// enabled. Please submit a form here (https://cloud.google.com/contact) -// to contact cloud sales if you are interested in using Retail Search. +// processing is asynchronous. Partial updating is not supported. The +// operation is successfully finished only after the imported +// suggestions are indexed successfully and ready for serving. The +// process takes hours. This feature is only available for users who +// have Retail Search enabled. Please submit a form here +// (https://cloud.google.com/contact) to contact cloud sales if you are +// interested in using Retail Search. // // - parent: The catalog which the suggestions dataset belongs to. // Format: `projects/1234/locations/global/catalogs/default_catalog`. @@ -10951,7 +11357,7 @@ func (c *ProjectsLocationsCatalogsCompletionDataImportCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Bulk import of processed completion dataset. Request processing may be synchronous. Partial updating is not supported. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", + // "description": "Bulk import of processed completion dataset. Request processing is asynchronous. Partial updating is not supported. The operation is successfully finished only after the imported suggestions are indexed successfully and ready for serving. The process takes hours. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionData:import", // "httpMethod": "POST", // "id": "retail.projects.locations.catalogs.completionData.import", @@ -12172,7 +12578,9 @@ type ProjectsLocationsCatalogsPlacementsPredictCall struct { // // - placement: Full resource name of the format: // {name=projects/*/locations/global/catalogs/default_catalog/placement -// s/*} The ID of the Recommendations AI placement. Before you can +// s/*} or +// {name=projects/*/locations/global/catalogs/default_catalog/servingCo +// nfigs/*} The ID of the Recommendations AI placement. Before you can // request predictions from your model, you must create at least one // placement for it. For more information, see Managing placements // (https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). @@ -12286,7 +12694,7 @@ func (c *ProjectsLocationsCatalogsPlacementsPredictCall) Do(opts ...googleapi.Ca // ], // "parameters": { // "placement": { - // "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + // "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} or {name=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", // "required": true, @@ -12326,7 +12734,9 @@ type ProjectsLocationsCatalogsPlacementsSearchCall struct { // - placement: The resource name of the search engine placement, such // as // `projects/*/locations/global/catalogs/default_catalog/placements/def -// ault_search`. This field is used to identify the serving +// ault_search` or +// `projects/*/locations/global/catalogs/default_catalog/servingConfigs +// /default_serving_config` This field is used to identify the serving // configuration name and the set of models that will be used to make // the search. func (r *ProjectsLocationsCatalogsPlacementsService) Search(placement string, googlecloudretailv2alphasearchrequest *GoogleCloudRetailV2alphaSearchRequest) *ProjectsLocationsCatalogsPlacementsSearchCall { @@ -12437,7 +12847,7 @@ func (c *ProjectsLocationsCatalogsPlacementsSearchCall) Do(opts ...googleapi.Cal // ], // "parameters": { // "placement": { - // "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + // "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving configuration name and the set of models that will be used to make the search.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", // "required": true, @@ -13433,6 +13843,158 @@ func (c *ProjectsLocationsCatalogsServingConfigsPatchCall) Do(opts ...googleapi. } +// method id "retail.projects.locations.catalogs.servingConfigs.predict": + +type ProjectsLocationsCatalogsServingConfigsPredictCall struct { + s *Service + placement string + googlecloudretailv2alphapredictrequest *GoogleCloudRetailV2alphaPredictRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Predict: Makes a recommendation prediction. +// +// - placement: Full resource name of the format: +// {name=projects/*/locations/global/catalogs/default_catalog/placement +// s/*} or +// {name=projects/*/locations/global/catalogs/default_catalog/servingCo +// nfigs/*} The ID of the Recommendations AI placement. Before you can +// request predictions from your model, you must create at least one +// placement for it. For more information, see Managing placements +// (https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). +// The full list of available placements can be seen at +// https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements. +func (r *ProjectsLocationsCatalogsServingConfigsService) Predict(placement string, googlecloudretailv2alphapredictrequest *GoogleCloudRetailV2alphaPredictRequest) *ProjectsLocationsCatalogsServingConfigsPredictCall { + c := &ProjectsLocationsCatalogsServingConfigsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.placement = placement + c.googlecloudretailv2alphapredictrequest = googlecloudretailv2alphapredictrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsServingConfigsPredictCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) Context(ctx context.Context) *ProjectsLocationsCatalogsServingConfigsPredictCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2alphapredictrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+placement}:predict") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "placement": c.placement, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.servingConfigs.predict" call. +// Exactly one of *GoogleCloudRetailV2alphaPredictResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudRetailV2alphaPredictResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2alphaPredictResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRetailV2alphaPredictResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Makes a recommendation prediction.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:predict", + // "httpMethod": "POST", + // "id": "retail.projects.locations.catalogs.servingConfigs.predict", + // "parameterOrder": [ + // "placement" + // ], + // "parameters": { + // "placement": { + // "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} or {name=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+placement}:predict", + // "request": { + // "$ref": "GoogleCloudRetailV2alphaPredictRequest" + // }, + // "response": { + // "$ref": "GoogleCloudRetailV2alphaPredictResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "retail.projects.locations.catalogs.servingConfigs.removeControl": type ProjectsLocationsCatalogsServingConfigsRemoveControlCall struct { @@ -13580,6 +14142,180 @@ func (c *ProjectsLocationsCatalogsServingConfigsRemoveControlCall) Do(opts ...go } +// method id "retail.projects.locations.catalogs.servingConfigs.search": + +type ProjectsLocationsCatalogsServingConfigsSearchCall struct { + s *Service + placement string + googlecloudretailv2alphasearchrequest *GoogleCloudRetailV2alphaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Search: Performs a search. This feature is only available for users +// who have Retail Search enabled. Please submit a form here +// (https://cloud.google.com/contact) to contact cloud sales if you are +// interested in using Retail Search. +// +// - placement: The resource name of the search engine placement, such +// as +// `projects/*/locations/global/catalogs/default_catalog/placements/def +// ault_search` or +// `projects/*/locations/global/catalogs/default_catalog/servingConfigs +// /default_serving_config` This field is used to identify the serving +// configuration name and the set of models that will be used to make +// the search. +func (r *ProjectsLocationsCatalogsServingConfigsService) Search(placement string, googlecloudretailv2alphasearchrequest *GoogleCloudRetailV2alphaSearchRequest) *ProjectsLocationsCatalogsServingConfigsSearchCall { + c := &ProjectsLocationsCatalogsServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.placement = placement + c.googlecloudretailv2alphasearchrequest = googlecloudretailv2alphasearchrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsServingConfigsSearchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsServingConfigsSearchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2alphasearchrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+placement}:search") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "placement": c.placement, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.servingConfigs.search" call. +// Exactly one of *GoogleCloudRetailV2alphaSearchResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudRetailV2alphaSearchResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2alphaSearchResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRetailV2alphaSearchResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Performs a search. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:search", + // "httpMethod": "POST", + // "id": "retail.projects.locations.catalogs.servingConfigs.search", + // "parameterOrder": [ + // "placement" + // ], + // "parameters": { + // "placement": { + // "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+placement}:search", + // "request": { + // "$ref": "GoogleCloudRetailV2alphaSearchRequest" + // }, + // "response": { + // "$ref": "GoogleCloudRetailV2alphaSearchResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudRetailV2alphaSearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googlecloudretailv2alphasearchrequest.PageToken = pt }(c.googlecloudretailv2alphasearchrequest.PageToken) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.googlecloudretailv2alphasearchrequest.PageToken = x.NextPageToken + } +} + // method id "retail.projects.locations.catalogs.userEvents.collect": type ProjectsLocationsCatalogsUserEventsCollectCall struct { diff --git a/retail/v2beta/retail-api.json b/retail/v2beta/retail-api.json index 4d1ae5fd5bd..fe0a2370131 100644 --- a/retail/v2beta/retail-api.json +++ b/retail/v2beta/retail-api.json @@ -193,6 +193,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getCompletionConfig": { + "description": "Gets a CompletionConfig.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", + "httpMethod": "GET", + "id": "retail.projects.locations.catalogs.getCompletionConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full CompletionConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+name}", + "response": { + "$ref": "GoogleCloudRetailV2betaCompletionConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "getDefaultBranch": { "description": "Get which branch is currently default branch set by CatalogService.SetDefaultBranch method under a specified parent catalog.", "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}:getDefaultBranch", @@ -349,6 +374,40 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "updateCompletionConfig": { + "description": "Updates the CompletionConfigs.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", + "httpMethod": "PATCH", + "id": "retail.projects.locations.catalogs.updateCompletionConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Immutable. Fully qualified name projects/*/locations/*/catalogs/*/completionConfig", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided CompletionConfig to update. The following are the only supported fields: * CompletionConfig.matching_order * CompletionConfig.max_suggestions * CompletionConfig.min_prefix_length * CompletionConfig.auto_learning If not set, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2beta/{+name}", + "request": { + "$ref": "GoogleCloudRetailV2betaCompletionConfig" + }, + "response": { + "$ref": "GoogleCloudRetailV2betaCompletionConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -761,7 +820,7 @@ "completionData": { "methods": { "import": { - "description": "Bulk import of processed completion dataset. Request processing may be synchronous. Partial updating is not supported. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", + "description": "Bulk import of processed completion dataset. Request processing is asynchronous. Partial updating is not supported. The operation is successfully finished only after the imported suggestions are indexed successfully and ready for serving. The process takes hours. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionData:import", "httpMethod": "POST", "id": "retail.projects.locations.catalogs.completionData.import", @@ -1034,7 +1093,7 @@ ], "parameters": { "placement": { - "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} or {name=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", "required": true, @@ -1062,7 +1121,7 @@ ], "parameters": { "placement": { - "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving configuration name and the set of models that will be used to make the search.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", "required": true, @@ -1265,6 +1324,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "predict": { + "description": "Makes a recommendation prediction.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:predict", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.servingConfigs.predict", + "parameterOrder": [ + "placement" + ], + "parameters": { + "placement": { + "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} or {name=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+placement}:predict", + "request": { + "$ref": "GoogleCloudRetailV2betaPredictRequest" + }, + "response": { + "$ref": "GoogleCloudRetailV2betaPredictResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "removeControl": { "description": "Disables a Control on the specified ServingConfig. The control is removed from the ServingConfig. Returns a NOT_FOUND error if the Control is not enabled for the ServingConfig.", "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:removeControl", @@ -1292,6 +1379,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "search": { + "description": "Performs a search. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:search", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.servingConfigs.search", + "parameterOrder": [ + "placement" + ], + "parameters": { + "placement": { + "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+placement}:search", + "request": { + "$ref": "GoogleCloudRetailV2betaSearchRequest" + }, + "response": { + "$ref": "GoogleCloudRetailV2betaSearchResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -1599,7 +1714,7 @@ } } }, - "revision": "20220316", + "revision": "20220319", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -1808,7 +1923,7 @@ "type": "string" }, "requestId": { - "description": "Id of the request / operation. This is parroting back the requestId that was passed in the request.", + "description": "Deprecated. This field is never set.", "type": "string" }, "successCount": { @@ -2073,7 +2188,7 @@ "type": "string" }, "requestId": { - "description": "Id of the request / operation. This is parroting back the requestId that was passed in the request.", + "description": "Deprecated. This field is never set.", "type": "string" }, "successCount": { @@ -2384,7 +2499,7 @@ "id": "GoogleCloudRetailV2betaBigQuerySource", "properties": { "dataSchema": { - "description": "The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: The schema is available here: https://support.google.com/analytics/answer/3437719. * `user_event_ga4`: This feature is in private preview. Please contact the support team for importing Google Analytics 4 events. The schema is available here: https://support.google.com/analytics/answer/7029846.", + "description": "The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: The schema is available here: https://support.google.com/analytics/answer/3437719. * `user_event_ga4`: This feature is in private preview. Please contact the support team for importing Google Analytics 4 events. The schema is available here: https://support.google.com/analytics/answer/7029846. Supported values for auto-completion imports: * `suggestions` (default): One JSON completion suggestion per line. * `denylist`: One JSON deny suggestion per line. * `allowlist`: One JSON allow suggestion per line.", "type": "string" }, "datasetId": { @@ -2418,6 +2533,10 @@ "description": "Required. Immutable. The catalog display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" }, + "merchantCenterLinkingConfig": { + "$ref": "GoogleCloudRetailV2betaMerchantCenterLinkingConfig", + "description": "The Merchant Center linking configuration. Once a link is added, the data stream from Merchant Center to Cloud Retail will be enabled automatically. The requester must have access to the merchant center account in order to make changes to this field." + }, "name": { "description": "Required. Immutable. The fully qualified resource name of the catalog.", "type": "string" @@ -2528,7 +2647,7 @@ "id": "GoogleCloudRetailV2betaCompleteQueryResponse", "properties": { "attributionToken": { - "description": "A unique complete token. This should be included in the SearchRequest resulting from this completion, which enables accurate attribution of complete model performance.", + "description": "A unique complete token. This should be included in the UserEvent.completion_detail for search events resulting from this completion, which enables accurate attribution of complete model performance.", "type": "string" }, "completionResults": { @@ -2556,7 +2675,7 @@ "additionalProperties": { "$ref": "GoogleCloudRetailV2betaCustomAttribute" }, - "description": "Additional custom attributes ingested through BigQuery.", + "description": "Custom attributes for the suggestion term. * For \"user-data\", the attributes are additional custom attributes ingested through BigQuery. * For \"cloud-retail\", the attributes are product attributes generated by Cloud Retail.", "type": "object" }, "suggestion": { @@ -2577,6 +2696,65 @@ }, "type": "object" }, + "GoogleCloudRetailV2betaCompletionConfig": { + "description": "Catalog level autocomplete config for customers to customize autocomplete feature's settings.", + "id": "GoogleCloudRetailV2betaCompletionConfig", + "properties": { + "allowlistInputConfig": { + "$ref": "GoogleCloudRetailV2betaCompletionDataInputConfig", + "description": "Output only. The input config for the import of the source data that contains the autocomplete allowlist phrases uploaded by the customer.", + "readOnly": true + }, + "autoLearning": { + "description": "If set to true, the auto learning function is enabled. Auto learning uses user data to generate suggestions using ML techniques. Default value is false. Only after enabling auto learning can users use `cloud-retail` data in CompleteQueryRequest.", + "type": "boolean" + }, + "denylistInputConfig": { + "$ref": "GoogleCloudRetailV2betaCompletionDataInputConfig", + "description": "Output only. The input config for the import of the source data that contains the / autocomplete denylist phrases uploaded by the customer.", + "readOnly": true + }, + "lastAllowlistImportOperation": { + "description": "Output only. LRO corresponding to the latest allowlist import. Can use GetOperation API to retrieve the latest state of the Long Running Operation.", + "readOnly": true, + "type": "string" + }, + "lastDenylistImportOperation": { + "description": "Output only. LRO corresponding to the latest denylist import. Can use GetOperation API to retrieve the latest state of the Long Running Operation.", + "readOnly": true, + "type": "string" + }, + "lastSuggestionsImportOperation": { + "description": "Output only. Name of the LRO corresponding to the latest suggestion terms list import. Can use GetOperation API to retrieve the latest state of the Long Running Operation.", + "readOnly": true, + "type": "string" + }, + "matchingOrder": { + "description": "Specifies the matching order for autocomplete suggestions, e.g., a query consisting of 'sh' with 'out-of-order' specified would suggest \"women's shoes\", whereas a query of 'red s' with 'exact-prefix' specified would suggest \"red shoes\". Currently supported values: * 'out-of-order' * 'exact-prefix' Default value: 'exact-prefix'.", + "type": "string" + }, + "maxSuggestions": { + "description": "The maximum number of autocomplete suggestions returned per term. The maximum allowed max suggestions is 20. Default value is 20. If left unset or set to 0, then will fallback to default value.", + "format": "int32", + "type": "integer" + }, + "minPrefixLength": { + "description": "The minimum number of characters needed to be typed in order to get suggestions. Default value is 2. If left unset or set to 0, then will fallback to default value.", + "format": "int32", + "type": "integer" + }, + "name": { + "description": "Required. Immutable. Fully qualified name projects/*/locations/*/catalogs/*/completionConfig", + "type": "string" + }, + "suggestionsInputConfig": { + "$ref": "GoogleCloudRetailV2betaCompletionDataInputConfig", + "description": "Output only. The input config for the import of the source data that contains the autocomplete phrases uploaded by the customer.", + "readOnly": true + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaCompletionDataInputConfig": { "description": "The input config source for completion data.", "id": "GoogleCloudRetailV2betaCompletionDataInputConfig", @@ -2956,7 +3134,7 @@ "type": "string" }, "requestId": { - "description": "Id of the request / operation. This is parroting back the requestId that was passed in the request.", + "description": "Deprecated. This field is never set.", "type": "string" }, "successCount": { @@ -3003,7 +3181,7 @@ "type": "string" }, "requestId": { - "description": "Unique identifier provided by client, within the ancestor dataset scope. Ensures idempotency and used for request deduplication. Server-generated if unspecified. Up to 128 characters long and must match the pattern: `[a-zA-Z0-9_]+`. This is returned as Operation.name in ImportMetadata. Only supported when ImportProductsRequest.reconciliation_mode is set to `FULL`.", + "description": "Deprecated. This field has no effect.", "type": "string" }, "updateMask": { @@ -3168,6 +3346,51 @@ }, "type": "object" }, + "GoogleCloudRetailV2betaMerchantCenterLink": { + "description": "Represents a link between a Merchant Center account and a branch. Once a link is established, products from the linked merchant center account will be streamed to the linked branch.", + "id": "GoogleCloudRetailV2betaMerchantCenterLink", + "properties": { + "branchId": { + "description": "The branch id (e.g. 0/1/2) within this catalog that products from merchant_center_account_id are streamed to. When updating this field, an empty value will use the currently configured default branch. However, changing the default branch later on won't change the linked branch here. A single branch id can only have one linked merchant center account id.", + "type": "string" + }, + "destinations": { + "description": "String representing the destination to import for, all if left empty. List of possible values can be found here. [https://support.google.com/merchants/answer/7501026] List of allowed string values: \"Shopping_ads\", \"Buy_on_google_listings\", \"Display_ads\", \"Local_inventory _ads\", \"Free_listings\", \"Free_local_listings\" NOTE: The string values are case sensitive.", + "items": { + "type": "string" + }, + "type": "array" + }, + "languageCode": { + "description": "Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). ISO 639-1. This specifies the language of offers in Merchant Center that will be accepted. If empty no language filtering will be performed.", + "type": "string" + }, + "merchantCenterAccountId": { + "description": "Required. The linked [Merchant center account id](https://developers.google.com/shopping-content/guides/accountstatuses). The account must be a standalone account or a sub-account of a MCA.", + "format": "int64", + "type": "string" + }, + "regionCode": { + "description": "Region code of offers to accept. 2-letter Uppercase ISO 3166-1 alpha-2 code. List of values can be found [here](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry) under the `region` tag. If left blank no region filtering will be performed. Example value: `US`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2betaMerchantCenterLinkingConfig": { + "description": "Configures Merchant Center linking. Links contained in the config will be used to sync data from a Merchant Center account to a Cloud Retail branch.", + "id": "GoogleCloudRetailV2betaMerchantCenterLinkingConfig", + "properties": { + "links": { + "description": "Links between Merchant Center accounts and branches.", + "items": { + "$ref": "GoogleCloudRetailV2betaMerchantCenterLink" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaPredictRequest": { "description": "Request message for Predict method.", "id": "GoogleCloudRetailV2betaPredictRequest", @@ -4817,7 +5040,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/retail/v2beta/retail-gen.go b/retail/v2beta/retail-gen.go index 467ada8eb2a..56336e64d11 100644 --- a/retail/v2beta/retail-gen.go +++ b/retail/v2beta/retail-gen.go @@ -702,8 +702,7 @@ type GoogleCloudRetailV2ImportMetadata struct { // `projects/{project}/topics/{topic}`. NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"` - // RequestId: Id of the request / operation. This is parroting back the - // requestId that was passed in the request. + // RequestId: Deprecated. This field is never set. RequestId string `json:"requestId,omitempty"` // SuccessCount: Count of entries that were processed successfully. @@ -1200,8 +1199,7 @@ type GoogleCloudRetailV2alphaImportMetadata struct { // `projects/{project}/topics/{topic}`. NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"` - // RequestId: Id of the request / operation. This is parroting back the - // requestId that was passed in the request. + // RequestId: Deprecated. This field is never set. RequestId string `json:"requestId,omitempty"` // SuccessCount: Count of entries that were processed successfully. @@ -1794,7 +1792,11 @@ type GoogleCloudRetailV2betaBigQuerySource struct { // * `user_event_ga4`: This feature is in private preview. Please // contact the support team for importing Google Analytics 4 events. The // schema is available here: - // https://support.google.com/analytics/answer/7029846. + // https://support.google.com/analytics/answer/7029846. Supported values + // for auto-completion imports: * `suggestions` (default): One JSON + // completion suggestion per line. * `denylist`: One JSON deny + // suggestion per line. * `allowlist`: One JSON allow suggestion per + // line. DataSchema string `json:"dataSchema,omitempty"` // DatasetId: Required. The BigQuery data set to copy the data from with @@ -1851,6 +1853,13 @@ type GoogleCloudRetailV2betaCatalog struct { // characters. Otherwise, an INVALID_ARGUMENT error is returned. DisplayName string `json:"displayName,omitempty"` + // MerchantCenterLinkingConfig: The Merchant Center linking + // configuration. Once a link is added, the data stream from Merchant + // Center to Cloud Retail will be enabled automatically. The requester + // must have access to the merchant center account in order to make + // changes to this field. + MerchantCenterLinkingConfig *GoogleCloudRetailV2betaMerchantCenterLinkingConfig `json:"merchantCenterLinkingConfig,omitempty"` + // Name: Required. Immutable. The fully qualified resource name of the // catalog. Name string `json:"name,omitempty"` @@ -2034,8 +2043,9 @@ func (s *GoogleCloudRetailV2betaColorInfo) MarshalJSON() ([]byte, error) { // auto-complete query. type GoogleCloudRetailV2betaCompleteQueryResponse struct { // AttributionToken: A unique complete token. This should be included in - // the SearchRequest resulting from this completion, which enables - // accurate attribution of complete model performance. + // the UserEvent.completion_detail for search events resulting from this + // completion, which enables accurate attribution of complete model + // performance. AttributionToken string `json:"attributionToken,omitempty"` // CompletionResults: Results of the matching suggestions. The result @@ -2086,7 +2096,10 @@ func (s *GoogleCloudRetailV2betaCompleteQueryResponse) MarshalJSON() ([]byte, er // GoogleCloudRetailV2betaCompleteQueryResponseCompletionResult: // Resource that represents completion results. type GoogleCloudRetailV2betaCompleteQueryResponseCompletionResult struct { - // Attributes: Additional custom attributes ingested through BigQuery. + // Attributes: Custom attributes for the suggestion term. * For + // "user-data", the attributes are additional custom attributes ingested + // through BigQuery. * For "cloud-retail", the attributes are product + // attributes generated by Cloud Retail. Attributes map[string]GoogleCloudRetailV2betaCustomAttribute `json:"attributes,omitempty"` // Suggestion: The suggestion for the query. @@ -2144,6 +2157,98 @@ func (s *GoogleCloudRetailV2betaCompleteQueryResponseRecentSearchResult) Marshal return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2betaCompletionConfig: Catalog level autocomplete +// config for customers to customize autocomplete feature's settings. +type GoogleCloudRetailV2betaCompletionConfig struct { + // AllowlistInputConfig: Output only. The input config for the import of + // the source data that contains the autocomplete allowlist phrases + // uploaded by the customer. + AllowlistInputConfig *GoogleCloudRetailV2betaCompletionDataInputConfig `json:"allowlistInputConfig,omitempty"` + + // AutoLearning: If set to true, the auto learning function is enabled. + // Auto learning uses user data to generate suggestions using ML + // techniques. Default value is false. Only after enabling auto learning + // can users use `cloud-retail` data in CompleteQueryRequest. + AutoLearning bool `json:"autoLearning,omitempty"` + + // DenylistInputConfig: Output only. The input config for the import of + // the source data that contains the / autocomplete denylist phrases + // uploaded by the customer. + DenylistInputConfig *GoogleCloudRetailV2betaCompletionDataInputConfig `json:"denylistInputConfig,omitempty"` + + // LastAllowlistImportOperation: Output only. LRO corresponding to the + // latest allowlist import. Can use GetOperation API to retrieve the + // latest state of the Long Running Operation. + LastAllowlistImportOperation string `json:"lastAllowlistImportOperation,omitempty"` + + // LastDenylistImportOperation: Output only. LRO corresponding to the + // latest denylist import. Can use GetOperation API to retrieve the + // latest state of the Long Running Operation. + LastDenylistImportOperation string `json:"lastDenylistImportOperation,omitempty"` + + // LastSuggestionsImportOperation: Output only. Name of the LRO + // corresponding to the latest suggestion terms list import. Can use + // GetOperation API to retrieve the latest state of the Long Running + // Operation. + LastSuggestionsImportOperation string `json:"lastSuggestionsImportOperation,omitempty"` + + // MatchingOrder: Specifies the matching order for autocomplete + // suggestions, e.g., a query consisting of 'sh' with 'out-of-order' + // specified would suggest "women's shoes", whereas a query of 'red s' + // with 'exact-prefix' specified would suggest "red shoes". Currently + // supported values: * 'out-of-order' * 'exact-prefix' Default value: + // 'exact-prefix'. + MatchingOrder string `json:"matchingOrder,omitempty"` + + // MaxSuggestions: The maximum number of autocomplete suggestions + // returned per term. The maximum allowed max suggestions is 20. Default + // value is 20. If left unset or set to 0, then will fallback to default + // value. + MaxSuggestions int64 `json:"maxSuggestions,omitempty"` + + // MinPrefixLength: The minimum number of characters needed to be typed + // in order to get suggestions. Default value is 2. If left unset or set + // to 0, then will fallback to default value. + MinPrefixLength int64 `json:"minPrefixLength,omitempty"` + + // Name: Required. Immutable. Fully qualified name + // projects/*/locations/*/catalogs/*/completionConfig + Name string `json:"name,omitempty"` + + // SuggestionsInputConfig: Output only. The input config for the import + // of the source data that contains the autocomplete phrases uploaded by + // the customer. + SuggestionsInputConfig *GoogleCloudRetailV2betaCompletionDataInputConfig `json:"suggestionsInputConfig,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AllowlistInputConfig") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllowlistInputConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2betaCompletionConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaCompletionConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaCompletionDataInputConfig: The input config // source for completion data. type GoogleCloudRetailV2betaCompletionDataInputConfig struct { @@ -2907,8 +3012,7 @@ type GoogleCloudRetailV2betaImportMetadata struct { // `projects/{project}/topics/{topic}`. NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"` - // RequestId: Id of the request / operation. This is parroting back the - // requestId that was passed in the request. + // RequestId: Deprecated. This field is never set. RequestId string `json:"requestId,omitempty"` // SuccessCount: Count of entries that were processed successfully. @@ -2979,12 +3083,7 @@ type GoogleCloudRetailV2betaImportProductsRequest struct { // if you are interested in using Retail Search. ReconciliationMode string `json:"reconciliationMode,omitempty"` - // RequestId: Unique identifier provided by client, within the ancestor - // dataset scope. Ensures idempotency and used for request - // deduplication. Server-generated if unspecified. Up to 128 characters - // long and must match the pattern: `[a-zA-Z0-9_]+`. This is returned as - // Operation.name in ImportMetadata. Only supported when - // ImportProductsRequest.reconciliation_mode is set to `FULL`. + // RequestId: Deprecated. This field has no effect. RequestId string `json:"requestId,omitempty"` // UpdateMask: Indicates which fields in the provided imported @@ -3332,6 +3431,100 @@ func (s *GoogleCloudRetailV2betaListServingConfigsResponse) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2betaMerchantCenterLink: Represents a link between +// a Merchant Center account and a branch. Once a link is established, +// products from the linked merchant center account will be streamed to +// the linked branch. +type GoogleCloudRetailV2betaMerchantCenterLink struct { + // BranchId: The branch id (e.g. 0/1/2) within this catalog that + // products from merchant_center_account_id are streamed to. When + // updating this field, an empty value will use the currently configured + // default branch. However, changing the default branch later on won't + // change the linked branch here. A single branch id can only have one + // linked merchant center account id. + BranchId string `json:"branchId,omitempty"` + + // Destinations: String representing the destination to import for, all + // if left empty. List of possible values can be found here. + // [https://support.google.com/merchants/answer/7501026] List of allowed + // string values: "Shopping_ads", "Buy_on_google_listings", + // "Display_ads", "Local_inventory _ads", "Free_listings", + // "Free_local_listings" NOTE: The string values are case sensitive. + Destinations []string `json:"destinations,omitempty"` + + // LanguageCode: Language of the title/description and other string + // attributes. Use language tags defined by BCP 47 + // (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). ISO 639-1. This + // specifies the language of offers in Merchant Center that will be + // accepted. If empty no language filtering will be performed. + LanguageCode string `json:"languageCode,omitempty"` + + // MerchantCenterAccountId: Required. The linked Merchant center account + // id + // (https://developers.google.com/shopping-content/guides/accountstatuses). + // The account must be a standalone account or a sub-account of a MCA. + MerchantCenterAccountId int64 `json:"merchantCenterAccountId,omitempty,string"` + + // RegionCode: Region code of offers to accept. 2-letter Uppercase ISO + // 3166-1 alpha-2 code. List of values can be found here + // (https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry) + // under the `region` tag. If left blank no region filtering will be + // performed. Example value: `US`. + RegionCode string `json:"regionCode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BranchId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BranchId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2betaMerchantCenterLink) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaMerchantCenterLink + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2betaMerchantCenterLinkingConfig: Configures +// Merchant Center linking. Links contained in the config will be used +// to sync data from a Merchant Center account to a Cloud Retail branch. +type GoogleCloudRetailV2betaMerchantCenterLinkingConfig struct { + // Links: Links between Merchant Center accounts and branches. + Links []*GoogleCloudRetailV2betaMerchantCenterLink `json:"links,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Links") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Links") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2betaMerchantCenterLinkingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaMerchantCenterLinkingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaPredictRequest: Request message for Predict // method. type GoogleCloudRetailV2betaPredictRequest struct { @@ -6604,8 +6797,7 @@ func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { // avoid defining duplicated empty messages in your APIs. A typical // example is to use it as the request or the response type of an API // method. For instance: service Foo { rpc Bar(google.protobuf.Empty) -// returns (google.protobuf.Empty); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -7105,6 +7297,155 @@ func (c *ProjectsLocationsCatalogsGetAttributesConfigCall) Do(opts ...googleapi. } +// method id "retail.projects.locations.catalogs.getCompletionConfig": + +type ProjectsLocationsCatalogsGetCompletionConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetCompletionConfig: Gets a CompletionConfig. +// +// - name: Full CompletionConfig resource name. Format: +// projects/{project_number}/locations/{location_id}/catalogs/{catalog_ +// id}/completionConfig. +func (r *ProjectsLocationsCatalogsService) GetCompletionConfig(name string) *ProjectsLocationsCatalogsGetCompletionConfigCall { + c := &ProjectsLocationsCatalogsGetCompletionConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsGetCompletionConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsGetCompletionConfigCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) Context(ctx context.Context) *ProjectsLocationsCatalogsGetCompletionConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.getCompletionConfig" call. +// Exactly one of *GoogleCloudRetailV2betaCompletionConfig or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudRetailV2betaCompletionConfig.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2betaCompletionConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRetailV2betaCompletionConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a CompletionConfig.", + // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", + // "httpMethod": "GET", + // "id": "retail.projects.locations.catalogs.getCompletionConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Full CompletionConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+name}", + // "response": { + // "$ref": "GoogleCloudRetailV2betaCompletionConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "retail.projects.locations.catalogs.getDefaultBranch": type ProjectsLocationsCatalogsGetDefaultBranchCall struct { @@ -7945,35 +8286,43 @@ func (c *ProjectsLocationsCatalogsUpdateAttributesConfigCall) Do(opts ...googlea } -// method id "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute": +// method id "retail.projects.locations.catalogs.updateCompletionConfig": -type ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall struct { - s *Service - attributesConfig string - googlecloudretailv2betaaddcatalogattributerequest *GoogleCloudRetailV2betaAddCatalogAttributeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCatalogsUpdateCompletionConfigCall struct { + s *Service + name string + googlecloudretailv2betacompletionconfig *GoogleCloudRetailV2betaCompletionConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AddCatalogAttribute: Adds the specified CatalogAttribute to the -// AttributesConfig. If the CatalogAttribute to add already exists, an -// ALREADY_EXISTS error is returned. +// UpdateCompletionConfig: Updates the CompletionConfigs. // -// - attributesConfig: Full AttributesConfig resource name. Format: -// projects/{project_number}/locations/{location_id}/catalogs/{catalog_ -// id}/attributesConfig. -func (r *ProjectsLocationsCatalogsAttributesConfigService) AddCatalogAttribute(attributesConfig string, googlecloudretailv2betaaddcatalogattributerequest *GoogleCloudRetailV2betaAddCatalogAttributeRequest) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { - c := &ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.attributesConfig = attributesConfig - c.googlecloudretailv2betaaddcatalogattributerequest = googlecloudretailv2betaaddcatalogattributerequest +// - name: Immutable. Fully qualified name +// projects/*/locations/*/catalogs/*/completionConfig. +func (r *ProjectsLocationsCatalogsService) UpdateCompletionConfig(name string, googlecloudretailv2betacompletionconfig *GoogleCloudRetailV2betaCompletionConfig) *ProjectsLocationsCatalogsUpdateCompletionConfigCall { + c := &ProjectsLocationsCatalogsUpdateCompletionConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudretailv2betacompletionconfig = googlecloudretailv2betacompletionconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided CompletionConfig to update. The following are +// the only supported fields: * CompletionConfig.matching_order * +// CompletionConfig.max_suggestions * CompletionConfig.min_prefix_length +// * CompletionConfig.auto_learning If not set, all supported fields are +// updated. +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsUpdateCompletionConfigCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsUpdateCompletionConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7981,21 +8330,21 @@ func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Field // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Context(ctx context.Context) *ProjectsLocationsCatalogsUpdateCompletionConfigCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Header() http.Header { +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -8003,35 +8352,35 @@ func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) doReq } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2betaaddcatalogattributerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2betacompletionconfig) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+attributesConfig}:addCatalogAttribute") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "attributesConfig": c.attributesConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute" call. -// Exactly one of *GoogleCloudRetailV2betaAttributesConfig or error will +// Do executes the "retail.projects.locations.catalogs.updateCompletionConfig" call. +// Exactly one of *GoogleCloudRetailV2betaCompletionConfig or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either -// *GoogleCloudRetailV2betaAttributesConfig.ServerResponse.Header or (if +// *GoogleCloudRetailV2betaCompletionConfig.ServerResponse.Header or (if // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2betaAttributesConfig, error) { +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2betaCompletionConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8050,7 +8399,7 @@ func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudRetailV2betaAttributesConfig{ + ret := &GoogleCloudRetailV2betaCompletionConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8062,9 +8411,162 @@ func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(op } return ret, nil // { - // "description": "Adds the specified CatalogAttribute to the AttributesConfig. If the CatalogAttribute to add already exists, an ALREADY_EXISTS error is returned.", - // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:addCatalogAttribute", - // "httpMethod": "POST", + // "description": "Updates the CompletionConfigs.", + // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", + // "httpMethod": "PATCH", + // "id": "retail.projects.locations.catalogs.updateCompletionConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Immutable. Fully qualified name projects/*/locations/*/catalogs/*/completionConfig", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided CompletionConfig to update. The following are the only supported fields: * CompletionConfig.matching_order * CompletionConfig.max_suggestions * CompletionConfig.min_prefix_length * CompletionConfig.auto_learning If not set, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2beta/{+name}", + // "request": { + // "$ref": "GoogleCloudRetailV2betaCompletionConfig" + // }, + // "response": { + // "$ref": "GoogleCloudRetailV2betaCompletionConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute": + +type ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall struct { + s *Service + attributesConfig string + googlecloudretailv2betaaddcatalogattributerequest *GoogleCloudRetailV2betaAddCatalogAttributeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AddCatalogAttribute: Adds the specified CatalogAttribute to the +// AttributesConfig. If the CatalogAttribute to add already exists, an +// ALREADY_EXISTS error is returned. +// +// - attributesConfig: Full AttributesConfig resource name. Format: +// projects/{project_number}/locations/{location_id}/catalogs/{catalog_ +// id}/attributesConfig. +func (r *ProjectsLocationsCatalogsAttributesConfigService) AddCatalogAttribute(attributesConfig string, googlecloudretailv2betaaddcatalogattributerequest *GoogleCloudRetailV2betaAddCatalogAttributeRequest) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { + c := &ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.attributesConfig = attributesConfig + c.googlecloudretailv2betaaddcatalogattributerequest = googlecloudretailv2betaaddcatalogattributerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2betaaddcatalogattributerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+attributesConfig}:addCatalogAttribute") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "attributesConfig": c.attributesConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute" call. +// Exactly one of *GoogleCloudRetailV2betaAttributesConfig or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudRetailV2betaAttributesConfig.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2betaAttributesConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRetailV2betaAttributesConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Adds the specified CatalogAttribute to the AttributesConfig. If the CatalogAttribute to add already exists, an ALREADY_EXISTS error is returned.", + // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:addCatalogAttribute", + // "httpMethod": "POST", // "id": "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute", // "parameterOrder": [ // "attributesConfig" @@ -10044,10 +10546,13 @@ type ProjectsLocationsCatalogsCompletionDataImportCall struct { } // Import: Bulk import of processed completion dataset. Request -// processing may be synchronous. Partial updating is not supported. -// This feature is only available for users who have Retail Search -// enabled. Please submit a form here (https://cloud.google.com/contact) -// to contact cloud sales if you are interested in using Retail Search. +// processing is asynchronous. Partial updating is not supported. The +// operation is successfully finished only after the imported +// suggestions are indexed successfully and ready for serving. The +// process takes hours. This feature is only available for users who +// have Retail Search enabled. Please submit a form here +// (https://cloud.google.com/contact) to contact cloud sales if you are +// interested in using Retail Search. // // - parent: The catalog which the suggestions dataset belongs to. // Format: `projects/1234/locations/global/catalogs/default_catalog`. @@ -10149,7 +10654,7 @@ func (c *ProjectsLocationsCatalogsCompletionDataImportCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Bulk import of processed completion dataset. Request processing may be synchronous. Partial updating is not supported. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", + // "description": "Bulk import of processed completion dataset. Request processing is asynchronous. Partial updating is not supported. The operation is successfully finished only after the imported suggestions are indexed successfully and ready for serving. The process takes hours. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionData:import", // "httpMethod": "POST", // "id": "retail.projects.locations.catalogs.completionData.import", @@ -11370,7 +11875,9 @@ type ProjectsLocationsCatalogsPlacementsPredictCall struct { // // - placement: Full resource name of the format: // {name=projects/*/locations/global/catalogs/default_catalog/placement -// s/*} The ID of the Recommendations AI placement. Before you can +// s/*} or +// {name=projects/*/locations/global/catalogs/default_catalog/servingCo +// nfigs/*} The ID of the Recommendations AI placement. Before you can // request predictions from your model, you must create at least one // placement for it. For more information, see Managing placements // (https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). @@ -11484,7 +11991,7 @@ func (c *ProjectsLocationsCatalogsPlacementsPredictCall) Do(opts ...googleapi.Ca // ], // "parameters": { // "placement": { - // "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + // "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} or {name=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", // "required": true, @@ -11524,7 +12031,9 @@ type ProjectsLocationsCatalogsPlacementsSearchCall struct { // - placement: The resource name of the search engine placement, such // as // `projects/*/locations/global/catalogs/default_catalog/placements/def -// ault_search`. This field is used to identify the serving +// ault_search` or +// `projects/*/locations/global/catalogs/default_catalog/servingConfigs +// /default_serving_config` This field is used to identify the serving // configuration name and the set of models that will be used to make // the search. func (r *ProjectsLocationsCatalogsPlacementsService) Search(placement string, googlecloudretailv2betasearchrequest *GoogleCloudRetailV2betaSearchRequest) *ProjectsLocationsCatalogsPlacementsSearchCall { @@ -11635,7 +12144,7 @@ func (c *ProjectsLocationsCatalogsPlacementsSearchCall) Do(opts ...googleapi.Cal // ], // "parameters": { // "placement": { - // "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + // "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving configuration name and the set of models that will be used to make the search.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", // "required": true, @@ -12631,6 +13140,158 @@ func (c *ProjectsLocationsCatalogsServingConfigsPatchCall) Do(opts ...googleapi. } +// method id "retail.projects.locations.catalogs.servingConfigs.predict": + +type ProjectsLocationsCatalogsServingConfigsPredictCall struct { + s *Service + placement string + googlecloudretailv2betapredictrequest *GoogleCloudRetailV2betaPredictRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Predict: Makes a recommendation prediction. +// +// - placement: Full resource name of the format: +// {name=projects/*/locations/global/catalogs/default_catalog/placement +// s/*} or +// {name=projects/*/locations/global/catalogs/default_catalog/servingCo +// nfigs/*} The ID of the Recommendations AI placement. Before you can +// request predictions from your model, you must create at least one +// placement for it. For more information, see Managing placements +// (https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). +// The full list of available placements can be seen at +// https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements. +func (r *ProjectsLocationsCatalogsServingConfigsService) Predict(placement string, googlecloudretailv2betapredictrequest *GoogleCloudRetailV2betaPredictRequest) *ProjectsLocationsCatalogsServingConfigsPredictCall { + c := &ProjectsLocationsCatalogsServingConfigsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.placement = placement + c.googlecloudretailv2betapredictrequest = googlecloudretailv2betapredictrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsServingConfigsPredictCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) Context(ctx context.Context) *ProjectsLocationsCatalogsServingConfigsPredictCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2betapredictrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+placement}:predict") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "placement": c.placement, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.servingConfigs.predict" call. +// Exactly one of *GoogleCloudRetailV2betaPredictResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudRetailV2betaPredictResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2betaPredictResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRetailV2betaPredictResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Makes a recommendation prediction.", + // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:predict", + // "httpMethod": "POST", + // "id": "retail.projects.locations.catalogs.servingConfigs.predict", + // "parameterOrder": [ + // "placement" + // ], + // "parameters": { + // "placement": { + // "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} or {name=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+placement}:predict", + // "request": { + // "$ref": "GoogleCloudRetailV2betaPredictRequest" + // }, + // "response": { + // "$ref": "GoogleCloudRetailV2betaPredictResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "retail.projects.locations.catalogs.servingConfigs.removeControl": type ProjectsLocationsCatalogsServingConfigsRemoveControlCall struct { @@ -12778,6 +13439,180 @@ func (c *ProjectsLocationsCatalogsServingConfigsRemoveControlCall) Do(opts ...go } +// method id "retail.projects.locations.catalogs.servingConfigs.search": + +type ProjectsLocationsCatalogsServingConfigsSearchCall struct { + s *Service + placement string + googlecloudretailv2betasearchrequest *GoogleCloudRetailV2betaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Search: Performs a search. This feature is only available for users +// who have Retail Search enabled. Please submit a form here +// (https://cloud.google.com/contact) to contact cloud sales if you are +// interested in using Retail Search. +// +// - placement: The resource name of the search engine placement, such +// as +// `projects/*/locations/global/catalogs/default_catalog/placements/def +// ault_search` or +// `projects/*/locations/global/catalogs/default_catalog/servingConfigs +// /default_serving_config` This field is used to identify the serving +// configuration name and the set of models that will be used to make +// the search. +func (r *ProjectsLocationsCatalogsServingConfigsService) Search(placement string, googlecloudretailv2betasearchrequest *GoogleCloudRetailV2betaSearchRequest) *ProjectsLocationsCatalogsServingConfigsSearchCall { + c := &ProjectsLocationsCatalogsServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.placement = placement + c.googlecloudretailv2betasearchrequest = googlecloudretailv2betasearchrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsServingConfigsSearchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsServingConfigsSearchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2betasearchrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+placement}:search") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "placement": c.placement, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.servingConfigs.search" call. +// Exactly one of *GoogleCloudRetailV2betaSearchResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudRetailV2betaSearchResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2betaSearchResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRetailV2betaSearchResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Performs a search. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", + // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:search", + // "httpMethod": "POST", + // "id": "retail.projects.locations.catalogs.servingConfigs.search", + // "parameterOrder": [ + // "placement" + // ], + // "parameters": { + // "placement": { + // "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+placement}:search", + // "request": { + // "$ref": "GoogleCloudRetailV2betaSearchRequest" + // }, + // "response": { + // "$ref": "GoogleCloudRetailV2betaSearchResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudRetailV2betaSearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googlecloudretailv2betasearchrequest.PageToken = pt }(c.googlecloudretailv2betasearchrequest.PageToken) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.googlecloudretailv2betasearchrequest.PageToken = x.NextPageToken + } +} + // method id "retail.projects.locations.catalogs.userEvents.collect": type ProjectsLocationsCatalogsUserEventsCollectCall struct { diff --git a/runtimeconfig/v1beta1/runtimeconfig-api.json b/runtimeconfig/v1beta1/runtimeconfig-api.json index 17fb81d90da..1ece8c32a25 100644 --- a/runtimeconfig/v1beta1/runtimeconfig-api.json +++ b/runtimeconfig/v1beta1/runtimeconfig-api.json @@ -805,7 +805,7 @@ } } }, - "revision": "20211108", + "revision": "20220321", "rootUrl": "https://runtimeconfig.googleapis.com/", "schemas": { "Binding": { @@ -847,7 +847,7 @@ "type": "object" }, "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/runtimeconfig/v1beta1/runtimeconfig-gen.go b/runtimeconfig/v1beta1/runtimeconfig-gen.go index 8a99fc80fb9..67f8259d85a 100644 --- a/runtimeconfig/v1beta1/runtimeconfig-gen.go +++ b/runtimeconfig/v1beta1/runtimeconfig-gen.go @@ -322,8 +322,7 @@ func (s *Cardinality) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/secretmanager/v1/secretmanager-api.json b/secretmanager/v1/secretmanager-api.json index 71154ec0981..a725b718cc1 100644 --- a/secretmanager/v1/secretmanager-api.json +++ b/secretmanager/v1/secretmanager-api.json @@ -643,7 +643,7 @@ } } }, - "revision": "20220115", + "revision": "20220318", "rootUrl": "https://secretmanager.googleapis.com/", "schemas": { "AccessSecretVersionResponse": { @@ -810,7 +810,7 @@ "type": "object" }, "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/secretmanager/v1/secretmanager-gen.go b/secretmanager/v1/secretmanager-gen.go index a0dd002eb95..69b1b07d7ec 100644 --- a/secretmanager/v1/secretmanager-gen.go +++ b/secretmanager/v1/secretmanager-gen.go @@ -621,8 +621,7 @@ func (s *DisableSecretVersionRequest) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/secretmanager/v1beta1/secretmanager-api.json b/secretmanager/v1beta1/secretmanager-api.json index 518ad14d904..d0eb05ecff0 100644 --- a/secretmanager/v1beta1/secretmanager-api.json +++ b/secretmanager/v1beta1/secretmanager-api.json @@ -628,7 +628,7 @@ } } }, - "revision": "20211105", + "revision": "20220318", "rootUrl": "https://secretmanager.googleapis.com/", "schemas": { "AccessSecretVersionResponse": { @@ -746,7 +746,7 @@ "type": "object" }, "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/secretmanager/v1beta1/secretmanager-gen.go b/secretmanager/v1beta1/secretmanager-gen.go index 28096af616b..ec5cca9c6f1 100644 --- a/secretmanager/v1beta1/secretmanager-gen.go +++ b/secretmanager/v1beta1/secretmanager-gen.go @@ -437,8 +437,7 @@ type DisableSecretVersionRequest struct { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/sourcerepo/v1/sourcerepo-api.json b/sourcerepo/v1/sourcerepo-api.json index a67dc042807..8cd8823e106 100644 --- a/sourcerepo/v1/sourcerepo-api.json +++ b/sourcerepo/v1/sourcerepo-api.json @@ -450,7 +450,7 @@ } } }, - "revision": "20211206", + "revision": "20220319", "rootUrl": "https://sourcerepo.googleapis.com/", "schemas": { "AuditConfig": { @@ -524,7 +524,7 @@ "type": "object" }, "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/sourcerepo/v1/sourcerepo-gen.go b/sourcerepo/v1/sourcerepo-gen.go index cf57c0755bb..e091e4fe279 100644 --- a/sourcerepo/v1/sourcerepo-gen.go +++ b/sourcerepo/v1/sourcerepo-gen.go @@ -348,8 +348,7 @@ func (s *Binding) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server.