From 3bc9d4fbcddf61b4a2a83eeda2f83224d383451a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 21 Jul 2022 07:14:32 +0000 Subject: [PATCH] feat(all): auto-regenerate discovery clients --- alertcenter/v1beta1/alertcenter-api.json | 22 +- alertcenter/v1beta1/alertcenter-gen.go | 36 + analyticshub/v1beta1/analyticshub-api.json | 6 +- analyticshub/v1beta1/analyticshub-gen.go | 11 +- .../v1/bigquerydatatransfer-api.json | 4 +- .../v1/bigquerydatatransfer-gen.go | 11 +- cloudidentity/v1/cloudidentity-api.json | 256 ++- cloudidentity/v1/cloudidentity-gen.go | 1011 +++++++++++ .../v0.alpha/deploymentmanager-api.json | 20 +- .../v0.alpha/deploymentmanager-gen.go | 9 + .../v2/deploymentmanager-api.json | 20 +- deploymentmanager/v2/deploymentmanager-gen.go | 9 + .../v2beta/deploymentmanager-api.json | 20 +- .../v2beta/deploymentmanager-gen.go | 9 + iam/v2beta/iam-api.json | 4 +- iam/v2beta/iam-gen.go | 4 +- iap/v1/iap-api.json | 34 +- iap/v1/iap-gen.go | 71 +- logging/v2/logging-api.json | 8 +- logging/v2/logging-gen.go | 46 +- .../v1/networkconnectivity-api.json | 42 +- .../v1/networkconnectivity-gen.go | 70 +- .../v1alpha1/networkconnectivity-api.json | 127 +- .../v1alpha1/networkconnectivity-gen.go | 530 +++++- retail/v2/retail-api.json | 239 ++- retail/v2/retail-gen.go | 429 ++++- retail/v2alpha/retail-api.json | 495 ++++- retail/v2alpha/retail-gen.go | 1602 ++++++++++++++++- retail/v2beta/retail-api.json | 243 ++- retail/v2beta/retail-gen.go | 451 ++++- spanner/v1/spanner-api.json | 31 +- spanner/v1/spanner-gen.go | 153 ++ .../v1/streetviewpublish-api.json | 8 +- streetviewpublish/v1/streetviewpublish-gen.go | 9 +- youtube/v3/youtube-api.json | 27 +- 35 files changed, 5758 insertions(+), 309 deletions(-) diff --git a/alertcenter/v1beta1/alertcenter-api.json b/alertcenter/v1beta1/alertcenter-api.json index 206247a4e98..51b9a5c89dd 100644 --- a/alertcenter/v1beta1/alertcenter-api.json +++ b/alertcenter/v1beta1/alertcenter-api.json @@ -423,7 +423,7 @@ } } }, - "revision": "20220516", + "revision": "20220718", "rootUrl": "https://alertcenter.googleapis.com/", "schemas": { "AccountSuspensionDetails": { @@ -732,6 +732,26 @@ }, "type": "object" }, + "ApnsCertificateExpirationInfo": { + "description": "The explanation message associated with ApnsCertificationExpiring and ApnsCertificationExpired alerts.", + "id": "ApnsCertificateExpirationInfo", + "properties": { + "appleId": { + "description": "The Apple ID used for the certificate, may be blank if admins did not enter it.", + "type": "string" + }, + "expirationTime": { + "description": "The expiration date of the APNS Certificate.", + "format": "google-datetime", + "type": "string" + }, + "uid": { + "description": "The UID for the certificate.", + "type": "string" + } + }, + "type": "object" + }, "AppMakerSqlSetupNotification": { "description": "Alerts from App Maker to notify admins to set up default SQL instance.", "id": "AppMakerSqlSetupNotification", diff --git a/alertcenter/v1beta1/alertcenter-gen.go b/alertcenter/v1beta1/alertcenter-gen.go index 8e69089bcc1..f09ab86e687 100644 --- a/alertcenter/v1beta1/alertcenter-gen.go +++ b/alertcenter/v1beta1/alertcenter-gen.go @@ -587,6 +587,42 @@ func (s *AlertMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ApnsCertificateExpirationInfo: The explanation message associated +// with ApnsCertificationExpiring and ApnsCertificationExpired alerts. +type ApnsCertificateExpirationInfo struct { + // AppleId: The Apple ID used for the certificate, may be blank if + // admins did not enter it. + AppleId string `json:"appleId,omitempty"` + + // ExpirationTime: The expiration date of the APNS Certificate. + ExpirationTime string `json:"expirationTime,omitempty"` + + // Uid: The UID for the certificate. + Uid string `json:"uid,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AppleId") 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. "AppleId") 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 *ApnsCertificateExpirationInfo) MarshalJSON() ([]byte, error) { + type NoMethod ApnsCertificateExpirationInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AppMakerSqlSetupNotification: Alerts from App Maker to notify admins // to set up default SQL instance. type AppMakerSqlSetupNotification struct { diff --git a/analyticshub/v1beta1/analyticshub-api.json b/analyticshub/v1beta1/analyticshub-api.json index 4c95b46c0e0..cef8eecd88e 100644 --- a/analyticshub/v1beta1/analyticshub-api.json +++ b/analyticshub/v1beta1/analyticshub-api.json @@ -765,7 +765,7 @@ } } }, - "revision": "20220701", + "revision": "20220715", "rootUrl": "https://analyticshub.googleapis.com/", "schemas": { "AuditConfig": { @@ -858,7 +858,7 @@ "type": "string" }, "displayName": { - "description": "Required. Human-readable display name of the data exchange. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), and must not start or end with spaces. Default value is an empty string. Max length: 63 bytes.", + "description": "Required. Human-readable display name of the data exchange. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (\u0026) and must not start or end with spaces. Default value is an empty string. Max length: 63 bytes.", "type": "string" }, "documentation": { @@ -1140,7 +1140,7 @@ "type": "string" }, "displayName": { - "description": "Required. Human-readable display name of the listing. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), and can't start or end with spaces. Default value is an empty string. Max length: 63 bytes.", + "description": "Required. Human-readable display name of the listing. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (\u0026) and can't start or end with spaces. Default value is an empty string. Max length: 63 bytes.", "type": "string" }, "documentation": { diff --git a/analyticshub/v1beta1/analyticshub-gen.go b/analyticshub/v1beta1/analyticshub-gen.go index 124a70aee46..7d130da9eca 100644 --- a/analyticshub/v1beta1/analyticshub-gen.go +++ b/analyticshub/v1beta1/analyticshub-gen.go @@ -445,9 +445,9 @@ type DataExchange struct { // DisplayName: Required. Human-readable display name of the data // exchange. The display name must contain only Unicode letters, numbers - // (0-9), underscores (_), dashes (-), spaces ( ), and must not start or - // end with spaces. Default value is an empty string. Max length: 63 - // bytes. + // (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and + // must not start or end with spaces. Default value is an empty string. + // Max length: 63 bytes. DisplayName string `json:"displayName,omitempty"` // Documentation: Optional. Documentation describing the data exchange. @@ -947,8 +947,9 @@ type Listing struct { // DisplayName: Required. Human-readable display name of the listing. // The display name must contain only Unicode letters, numbers (0-9), - // underscores (_), dashes (-), spaces ( ), and can't start or end with - // spaces. Default value is an empty string. Max length: 63 bytes. + // underscores (_), dashes (-), spaces ( ), ampersands (&) and can't + // start or end with spaces. Default value is an empty string. Max + // length: 63 bytes. DisplayName string `json:"displayName,omitempty"` // Documentation: Optional. Documentation describing the listing. diff --git a/bigquerydatatransfer/v1/bigquerydatatransfer-api.json b/bigquerydatatransfer/v1/bigquerydatatransfer-api.json index b9f26aab8ef..137a6e5aeea 100644 --- a/bigquerydatatransfer/v1/bigquerydatatransfer-api.json +++ b/bigquerydatatransfer/v1/bigquerydatatransfer-api.json @@ -1340,7 +1340,7 @@ } } }, - "revision": "20220709", + "revision": "20220716", "rootUrl": "https://bigquerydatatransfer.googleapis.com/", "schemas": { "CheckValidCredsRequest": { @@ -1876,7 +1876,7 @@ "type": "integer" }, "dataSourceId": { - "description": "Data source id. Cannot be changed once data transfer is created. The full list of available data source ids can be returned through API call: https://cloud.google.com/bigquery-transfer/docs/reference/datatransfer/rest/v1/projects.locations.dataSources/list The individual data source id can also be found in the bq tab in the 'Setting up a data transfer' section for each data source. For example, the data source id for Cloud Storage transfers is listed here: https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq", + "description": "Data source ID. This cannot be changed once data transfer is created. The full list of available data source IDs can be returned through an API call: https://cloud.google.com/bigquery-transfer/docs/reference/datatransfer/rest/v1/projects.locations.dataSources/list", "type": "string" }, "datasetRegion": { diff --git a/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go b/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go index e4759f25e4b..28efda26b96 100644 --- a/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go +++ b/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go @@ -1139,15 +1139,10 @@ type TransferConfig struct { // the value to 0 to use the default value. DataRefreshWindowDays int64 `json:"dataRefreshWindowDays,omitempty"` - // DataSourceId: Data source id. Cannot be changed once data transfer is - // created. The full list of available data source ids can be returned - // through API call: + // DataSourceId: Data source ID. This cannot be changed once data + // transfer is created. The full list of available data source IDs can + // be returned through an API call: // https://cloud.google.com/bigquery-transfer/docs/reference/datatransfer/rest/v1/projects.locations.dataSources/list - // The individual data source id can also be found in the bq tab in the - // 'Setting up a data transfer' section for each data source. For - // example, the data source id for Cloud Storage transfers is listed - // here: - // https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq DataSourceId string `json:"dataSourceId,omitempty"` // DatasetRegion: Output only. Region in which BigQuery dataset is diff --git a/cloudidentity/v1/cloudidentity-api.json b/cloudidentity/v1/cloudidentity-api.json index 0033dad4be0..97744df4b71 100644 --- a/cloudidentity/v1/cloudidentity-api.json +++ b/cloudidentity/v1/cloudidentity-api.json @@ -20,6 +20,12 @@ "https://www.googleapis.com/auth/cloud-identity.groups.readonly": { "description": "See any Cloud Identity Groups that you can access, including group members and their emails" }, + "https://www.googleapis.com/auth/cloud-identity.userinvitations": { + "description": "See, send, or cancel any Cloud Identity UserInvitations to join your organization to users" + }, + "https://www.googleapis.com/auth/cloud-identity.userinvitations.readonly": { + "description": "See, send, or cancel any Cloud Identity UserInvitations to join your organization to users" + }, "https://www.googleapis.com/auth/cloud-platform": { "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." } @@ -123,6 +129,174 @@ }, "protocol": "rest", "resources": { + "customers": { + "resources": { + "userinvitations": { + "methods": { + "cancel": { + "description": "Cancels a UserInvitation that was already sent.", + "flatPath": "v1/customers/{customersId}/userinvitations/{userinvitationsId}:cancel", + "httpMethod": "POST", + "id": "cloudidentity.customers.userinvitations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. `UserInvitation` name in the format `customers/{customer}/userinvitations/{user_email_address}`", + "location": "path", + "pattern": "^customers/[^/]+/userinvitations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "CancelUserInvitationRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", + "https://www.googleapis.com/auth/cloud-identity.userinvitations" + ] + }, + "get": { + "description": "Retrieves a UserInvitation resource. **Note:** New consumer accounts with the customer's verified domain created within the previous 48 hours will not appear in the result. This delay also applies to newly-verified domains.", + "flatPath": "v1/customers/{customersId}/userinvitations/{userinvitationsId}", + "httpMethod": "GET", + "id": "cloudidentity.customers.userinvitations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. `UserInvitation` name in the format `customers/{customer}/userinvitations/{user_email_address}`", + "location": "path", + "pattern": "^customers/[^/]+/userinvitations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "UserInvitation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", + "https://www.googleapis.com/auth/cloud-identity.userinvitations", + "https://www.googleapis.com/auth/cloud-identity.userinvitations.readonly" + ] + }, + "isInvitableUser": { + "description": "Verifies whether a user account is eligible to receive a UserInvitation (is an unmanaged account). Eligibility is based on the following criteria: * the email address is a consumer account and it's the primary email address of the account, and * the domain of the email address matches an existing verified Google Workspace or Cloud Identity domain If both conditions are met, the user is eligible. **Note:** This method is not supported for Workspace Essentials customers.", + "flatPath": "v1/customers/{customersId}/userinvitations/{userinvitationsId}:isInvitableUser", + "httpMethod": "GET", + "id": "cloudidentity.customers.userinvitations.isInvitableUser", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. `UserInvitation` name in the format `customers/{customer}/userinvitations/{user_email_address}`", + "location": "path", + "pattern": "^customers/[^/]+/userinvitations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:isInvitableUser", + "response": { + "$ref": "IsInvitableUserResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", + "https://www.googleapis.com/auth/cloud-identity.userinvitations", + "https://www.googleapis.com/auth/cloud-identity.userinvitations.readonly" + ] + }, + "list": { + "description": "Retrieves a list of UserInvitation resources. **Note:** New consumer accounts with the customer's verified domain created within the previous 48 hours will not appear in the result. This delay also applies to newly-verified domains.", + "flatPath": "v1/customers/{customersId}/userinvitations", + "httpMethod": "GET", + "id": "cloudidentity.customers.userinvitations.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. A query string for filtering `UserInvitation` results by their current state, in the format: `\"state=='invited'\"`.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. The sort order of the list results. You can sort the results in descending order based on either email or last update timestamp but not both, using `order_by=\"email desc\"`. Currently, sorting is supported for `update_time asc`, `update_time desc`, `email asc`, and `email desc`. If not specified, results will be returned based on `email asc` order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of UserInvitation resources to return. If unspecified, at most 100 resources will be returned. The maximum value is 200; values above 200 will be set to 200.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListUserInvitations` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBooks` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The customer ID of the Google Workspace or Cloud Identity account the UserInvitation resources are associated with.", + "location": "path", + "pattern": "^customers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/userinvitations", + "response": { + "$ref": "ListUserInvitationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", + "https://www.googleapis.com/auth/cloud-identity.userinvitations", + "https://www.googleapis.com/auth/cloud-identity.userinvitations.readonly" + ] + }, + "send": { + "description": "Sends a UserInvitation to email. If the `UserInvitation` does not exist for this request and it is a valid request, the request creates a `UserInvitation`. **Note:** The `get` and `list` methods have a 48-hour delay where newly-created consumer accounts will not appear in the results. You can still send a `UserInvitation` to those accounts if you know the unmanaged email address and IsInvitableUser==True.", + "flatPath": "v1/customers/{customersId}/userinvitations/{userinvitationsId}:send", + "httpMethod": "POST", + "id": "cloudidentity.customers.userinvitations.send", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. `UserInvitation` name in the format `customers/{customer}/userinvitations/{user_email_address}`", + "location": "path", + "pattern": "^customers/[^/]+/userinvitations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:send", + "request": { + "$ref": "SendUserInvitationRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", + "https://www.googleapis.com/auth/cloud-identity.userinvitations" + ] + } + } + } + } + }, "devices": { "methods": { "cancelWipe": { @@ -1439,9 +1613,15 @@ } } }, - "revision": "20220620", + "revision": "20220718", "rootUrl": "https://cloudidentity.googleapis.com/", "schemas": { + "CancelUserInvitationRequest": { + "description": "Request to cancel sent invitation for target email in UserInvitation.", + "id": "CancelUserInvitationRequest", + "properties": {}, + "type": "object" + }, "CheckTransitiveMembershipResponse": { "description": "The response message for MembershipsService.CheckTransitiveMembership.", "id": "CheckTransitiveMembershipResponse", @@ -2479,6 +2659,17 @@ }, "type": "object" }, + "IsInvitableUserResponse": { + "description": "Response for IsInvitableUser RPC.", + "id": "IsInvitableUserResponse", + "properties": { + "isInvitableUser": { + "description": "Returns true if the email address is invitable.", + "type": "boolean" + } + }, + "type": "object" + }, "ListGroupsResponse": { "description": "Response message for ListGroups operation.", "id": "ListGroupsResponse", @@ -2515,6 +2706,24 @@ }, "type": "object" }, + "ListUserInvitationsResponse": { + "description": "Response message for UserInvitation listing request.", + "id": "ListUserInvitationsResponse", + "properties": { + "nextPageToken": { + "description": "The token for the next page. If not empty, indicates that there may be more `UserInvitation` resources that match the listing request; this value can be used in a subsequent ListUserInvitationsRequest to get continued results with the current list call.", + "type": "string" + }, + "userInvitations": { + "description": "The list of UserInvitation resources.", + "items": { + "$ref": "UserInvitation" + }, + "type": "array" + } + }, + "type": "object" + }, "LookupGroupNameResponse": { "description": "The response message for GroupsService.LookupGroupName.", "id": "LookupGroupNameResponse", @@ -2893,6 +3102,12 @@ }, "type": "object" }, + "SendUserInvitationRequest": { + "description": "A request to send email for inviting target user corresponding to the UserInvitation.", + "id": "SendUserInvitationRequest", + "properties": {}, + "type": "object" + }, "Status": { "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", "id": "Status", @@ -2958,6 +3173,45 @@ } }, "type": "object" + }, + "UserInvitation": { + "description": "The `UserInvitation` resource represents an email that can be sent to an unmanaged user account inviting them to join the customer's Google Workspace or Cloud Identity account. An unmanaged account shares an email address domain with the Google Workspace or Cloud Identity account but is not managed by it yet. If the user accepts the `UserInvitation`, the user account will become managed.", + "id": "UserInvitation", + "properties": { + "mailsSentCount": { + "description": "Number of invitation emails sent to the user.", + "format": "int64", + "type": "string" + }, + "name": { + "description": "Shall be of the form `customers/{customer}/userinvitations/{user_email_address}`.", + "type": "string" + }, + "state": { + "description": "State of the `UserInvitation`.", + "enum": [ + "STATE_UNSPECIFIED", + "NOT_YET_SENT", + "INVITED", + "ACCEPTED", + "DECLINED" + ], + "enumDescriptions": [ + "The default value. This value is used if the state is omitted.", + "The `UserInvitation` has been created and is ready for sending as an email.", + "The user has been invited by email.", + "The user has accepted the invitation and is part of the organization.", + "The user declined the invitation." + ], + "type": "string" + }, + "updateTime": { + "description": "Time when the `UserInvitation` was last updated.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/cloudidentity/v1/cloudidentity-gen.go b/cloudidentity/v1/cloudidentity-gen.go index 32df9aff45c..5676c10509e 100644 --- a/cloudidentity/v1/cloudidentity-gen.go +++ b/cloudidentity/v1/cloudidentity-gen.go @@ -106,6 +106,14 @@ const ( // members and their emails CloudIdentityGroupsReadonlyScope = "https://www.googleapis.com/auth/cloud-identity.groups.readonly" + // See, send, or cancel any Cloud Identity UserInvitations to join your + // organization to users + CloudIdentityUserinvitationsScope = "https://www.googleapis.com/auth/cloud-identity.userinvitations" + + // See, send, or cancel any Cloud Identity UserInvitations to join your + // organization to users + CloudIdentityUserinvitationsReadonlyScope = "https://www.googleapis.com/auth/cloud-identity.userinvitations.readonly" + // See, edit, configure, and delete your Google Cloud data and see the // email address for your Google Account. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" @@ -120,6 +128,8 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err "https://www.googleapis.com/auth/cloud-identity.devices.readonly", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", + "https://www.googleapis.com/auth/cloud-identity.userinvitations", + "https://www.googleapis.com/auth/cloud-identity.userinvitations.readonly", "https://www.googleapis.com/auth/cloud-platform", ) // NOTE: prepend, so we don't override user-specified scopes. @@ -150,6 +160,7 @@ func New(client *http.Client) (*Service, error) { return nil, errors.New("client is nil") } s := &Service{client: client, BasePath: basePath} + s.Customers = NewCustomersService(s) s.Devices = NewDevicesService(s) s.Groups = NewGroupsService(s) return s, nil @@ -160,6 +171,8 @@ type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment + Customers *CustomersService + Devices *DevicesService Groups *GroupsService @@ -172,6 +185,27 @@ func (s *Service) userAgent() string { return googleapi.UserAgent + " " + s.UserAgent } +func NewCustomersService(s *Service) *CustomersService { + rs := &CustomersService{s: s} + rs.Userinvitations = NewCustomersUserinvitationsService(s) + return rs +} + +type CustomersService struct { + s *Service + + Userinvitations *CustomersUserinvitationsService +} + +func NewCustomersUserinvitationsService(s *Service) *CustomersUserinvitationsService { + rs := &CustomersUserinvitationsService{s: s} + return rs +} + +type CustomersUserinvitationsService struct { + s *Service +} + func NewDevicesService(s *Service) *DevicesService { rs := &DevicesService{s: s} rs.DeviceUsers = NewDevicesDeviceUsersService(s) @@ -226,6 +260,11 @@ type GroupsMembershipsService struct { s *Service } +// CancelUserInvitationRequest: Request to cancel sent invitation for +// target email in UserInvitation. +type CancelUserInvitationRequest struct { +} + // CheckTransitiveMembershipResponse: The response message for // MembershipsService.CheckTransitiveMembership. type CheckTransitiveMembershipResponse struct { @@ -1752,6 +1791,39 @@ func (s *GroupRelation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// IsInvitableUserResponse: Response for IsInvitableUser RPC. +type IsInvitableUserResponse struct { + // IsInvitableUser: Returns true if the email address is invitable. + IsInvitableUser bool `json:"isInvitableUser,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "IsInvitableUser") 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. "IsInvitableUser") 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 *IsInvitableUserResponse) MarshalJSON() ([]byte, error) { + type NoMethod IsInvitableUserResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListGroupsResponse: Response message for ListGroups operation. type ListGroupsResponse struct { // Groups: Groups returned in response to list request. The results are @@ -1826,6 +1898,46 @@ func (s *ListMembershipsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListUserInvitationsResponse: Response message for UserInvitation +// listing request. +type ListUserInvitationsResponse struct { + // NextPageToken: The token for the next page. If not empty, indicates + // that there may be more `UserInvitation` resources that match the + // listing request; this value can be used in a subsequent + // ListUserInvitationsRequest to get continued results with the current + // list call. + NextPageToken string `json:"nextPageToken,omitempty"` + + // UserInvitations: The list of UserInvitation resources. + UserInvitations []*UserInvitation `json:"userInvitations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") 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. "NextPageToken") 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 *ListUserInvitationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListUserInvitationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // LookupGroupNameResponse: The response message for // GroupsService.LookupGroupName. type LookupGroupNameResponse struct { @@ -2531,6 +2643,11 @@ func (s *SecuritySettings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SendUserInvitationRequest: A request to send email for inviting +// target user corresponding to the UserInvitation. +type SendUserInvitationRequest struct { +} + // Status: The `Status` type defines a logical error model that is // suitable for different programming environments, including REST APIs // and RPC APIs. It is used by gRPC (https://github.com/grpc). Each @@ -2647,6 +2764,900 @@ func (s *UpdateMembershipRolesParams) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// UserInvitation: The `UserInvitation` resource represents an email +// that can be sent to an unmanaged user account inviting them to join +// the customer's Google Workspace or Cloud Identity account. An +// unmanaged account shares an email address domain with the Google +// Workspace or Cloud Identity account but is not managed by it yet. If +// the user accepts the `UserInvitation`, the user account will become +// managed. +type UserInvitation struct { + // MailsSentCount: Number of invitation emails sent to the user. + MailsSentCount int64 `json:"mailsSentCount,omitempty,string"` + + // Name: Shall be of the form + // `customers/{customer}/userinvitations/{user_email_address}`. + Name string `json:"name,omitempty"` + + // State: State of the `UserInvitation`. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value is used if the + // state is omitted. + // "NOT_YET_SENT" - The `UserInvitation` has been created and is ready + // for sending as an email. + // "INVITED" - The user has been invited by email. + // "ACCEPTED" - The user has accepted the invitation and is part of + // the organization. + // "DECLINED" - The user declined the invitation. + State string `json:"state,omitempty"` + + // UpdateTime: Time when the `UserInvitation` was last updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "MailsSentCount") 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. "MailsSentCount") 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 *UserInvitation) MarshalJSON() ([]byte, error) { + type NoMethod UserInvitation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "cloudidentity.customers.userinvitations.cancel": + +type CustomersUserinvitationsCancelCall struct { + s *Service + name string + canceluserinvitationrequest *CancelUserInvitationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Cancels a UserInvitation that was already sent. +// +// - name: `UserInvitation` name in the format +// `customers/{customer}/userinvitations/{user_email_address}`. +func (r *CustomersUserinvitationsService) Cancel(name string, canceluserinvitationrequest *CancelUserInvitationRequest) *CustomersUserinvitationsCancelCall { + c := &CustomersUserinvitationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceluserinvitationrequest = canceluserinvitationrequest + 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 *CustomersUserinvitationsCancelCall) Fields(s ...googleapi.Field) *CustomersUserinvitationsCancelCall { + 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 *CustomersUserinvitationsCancelCall) Context(ctx context.Context) *CustomersUserinvitationsCancelCall { + 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 *CustomersUserinvitationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersUserinvitationsCancelCall) 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.canceluserinvitationrequest) + 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, "v1/{+name}:cancel") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudidentity.customers.userinvitations.cancel" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.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 *CustomersUserinvitationsCancelCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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": "Cancels a UserInvitation that was already sent.", + // "flatPath": "v1/customers/{customersId}/userinvitations/{userinvitationsId}:cancel", + // "httpMethod": "POST", + // "id": "cloudidentity.customers.userinvitations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. `UserInvitation` name in the format `customers/{customer}/userinvitations/{user_email_address}`", + // "location": "path", + // "pattern": "^customers/[^/]+/userinvitations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:cancel", + // "request": { + // "$ref": "CancelUserInvitationRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", + // "https://www.googleapis.com/auth/cloud-identity.userinvitations" + // ] + // } + +} + +// method id "cloudidentity.customers.userinvitations.get": + +type CustomersUserinvitationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a UserInvitation resource. **Note:** New consumer +// accounts with the customer's verified domain created within the +// previous 48 hours will not appear in the result. This delay also +// applies to newly-verified domains. +// +// - name: `UserInvitation` name in the format +// `customers/{customer}/userinvitations/{user_email_address}`. +func (r *CustomersUserinvitationsService) Get(name string) *CustomersUserinvitationsGetCall { + c := &CustomersUserinvitationsGetCall{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 *CustomersUserinvitationsGetCall) Fields(s ...googleapi.Field) *CustomersUserinvitationsGetCall { + 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 *CustomersUserinvitationsGetCall) IfNoneMatch(entityTag string) *CustomersUserinvitationsGetCall { + 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 *CustomersUserinvitationsGetCall) Context(ctx context.Context) *CustomersUserinvitationsGetCall { + 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 *CustomersUserinvitationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersUserinvitationsGetCall) 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, "v1/{+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 "cloudidentity.customers.userinvitations.get" call. +// Exactly one of *UserInvitation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *UserInvitation.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 *CustomersUserinvitationsGetCall) Do(opts ...googleapi.CallOption) (*UserInvitation, 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 := &UserInvitation{ + 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": "Retrieves a UserInvitation resource. **Note:** New consumer accounts with the customer's verified domain created within the previous 48 hours will not appear in the result. This delay also applies to newly-verified domains.", + // "flatPath": "v1/customers/{customersId}/userinvitations/{userinvitationsId}", + // "httpMethod": "GET", + // "id": "cloudidentity.customers.userinvitations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. `UserInvitation` name in the format `customers/{customer}/userinvitations/{user_email_address}`", + // "location": "path", + // "pattern": "^customers/[^/]+/userinvitations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "UserInvitation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", + // "https://www.googleapis.com/auth/cloud-identity.userinvitations", + // "https://www.googleapis.com/auth/cloud-identity.userinvitations.readonly" + // ] + // } + +} + +// method id "cloudidentity.customers.userinvitations.isInvitableUser": + +type CustomersUserinvitationsIsInvitableUserCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// IsInvitableUser: Verifies whether a user account is eligible to +// receive a UserInvitation (is an unmanaged account). Eligibility is +// based on the following criteria: * the email address is a consumer +// account and it's the primary email address of the account, and * the +// domain of the email address matches an existing verified Google +// Workspace or Cloud Identity domain If both conditions are met, the +// user is eligible. **Note:** This method is not supported for +// Workspace Essentials customers. +// +// - name: `UserInvitation` name in the format +// `customers/{customer}/userinvitations/{user_email_address}`. +func (r *CustomersUserinvitationsService) IsInvitableUser(name string) *CustomersUserinvitationsIsInvitableUserCall { + c := &CustomersUserinvitationsIsInvitableUserCall{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 *CustomersUserinvitationsIsInvitableUserCall) Fields(s ...googleapi.Field) *CustomersUserinvitationsIsInvitableUserCall { + 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 *CustomersUserinvitationsIsInvitableUserCall) IfNoneMatch(entityTag string) *CustomersUserinvitationsIsInvitableUserCall { + 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 *CustomersUserinvitationsIsInvitableUserCall) Context(ctx context.Context) *CustomersUserinvitationsIsInvitableUserCall { + 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 *CustomersUserinvitationsIsInvitableUserCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersUserinvitationsIsInvitableUserCall) 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, "v1/{+name}:isInvitableUser") + 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 "cloudidentity.customers.userinvitations.isInvitableUser" call. +// Exactly one of *IsInvitableUserResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *IsInvitableUserResponse.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 *CustomersUserinvitationsIsInvitableUserCall) Do(opts ...googleapi.CallOption) (*IsInvitableUserResponse, 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 := &IsInvitableUserResponse{ + 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": "Verifies whether a user account is eligible to receive a UserInvitation (is an unmanaged account). Eligibility is based on the following criteria: * the email address is a consumer account and it's the primary email address of the account, and * the domain of the email address matches an existing verified Google Workspace or Cloud Identity domain If both conditions are met, the user is eligible. **Note:** This method is not supported for Workspace Essentials customers.", + // "flatPath": "v1/customers/{customersId}/userinvitations/{userinvitationsId}:isInvitableUser", + // "httpMethod": "GET", + // "id": "cloudidentity.customers.userinvitations.isInvitableUser", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. `UserInvitation` name in the format `customers/{customer}/userinvitations/{user_email_address}`", + // "location": "path", + // "pattern": "^customers/[^/]+/userinvitations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:isInvitableUser", + // "response": { + // "$ref": "IsInvitableUserResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", + // "https://www.googleapis.com/auth/cloud-identity.userinvitations", + // "https://www.googleapis.com/auth/cloud-identity.userinvitations.readonly" + // ] + // } + +} + +// method id "cloudidentity.customers.userinvitations.list": + +type CustomersUserinvitationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a list of UserInvitation resources. **Note:** New +// consumer accounts with the customer's verified domain created within +// the previous 48 hours will not appear in the result. This delay also +// applies to newly-verified domains. +// +// - parent: The customer ID of the Google Workspace or Cloud Identity +// account the UserInvitation resources are associated with. +func (r *CustomersUserinvitationsService) List(parent string) *CustomersUserinvitationsListCall { + c := &CustomersUserinvitationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A query string for +// filtering `UserInvitation` results by their current state, in the +// format: "state=='invited'". +func (c *CustomersUserinvitationsListCall) Filter(filter string) *CustomersUserinvitationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": The sort order of the +// list results. You can sort the results in descending order based on +// either email or last update timestamp but not both, using +// `order_by="email desc". Currently, sorting is supported for +// `update_time asc`, `update_time desc`, `email asc`, and `email desc`. +// If not specified, results will be returned based on `email asc` +// order. +func (c *CustomersUserinvitationsListCall) OrderBy(orderBy string) *CustomersUserinvitationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of UserInvitation resources to return. If unspecified, at most 100 +// resources will be returned. The maximum value is 200; values above +// 200 will be set to 200. +func (c *CustomersUserinvitationsListCall) PageSize(pageSize int64) *CustomersUserinvitationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListUserInvitations` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListBooks` must match the call that provided the page +// token. +func (c *CustomersUserinvitationsListCall) PageToken(pageToken string) *CustomersUserinvitationsListCall { + c.urlParams_.Set("pageToken", pageToken) + 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 *CustomersUserinvitationsListCall) Fields(s ...googleapi.Field) *CustomersUserinvitationsListCall { + 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 *CustomersUserinvitationsListCall) IfNoneMatch(entityTag string) *CustomersUserinvitationsListCall { + 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 *CustomersUserinvitationsListCall) Context(ctx context.Context) *CustomersUserinvitationsListCall { + 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 *CustomersUserinvitationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersUserinvitationsListCall) 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, "v1/{+parent}/userinvitations") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudidentity.customers.userinvitations.list" call. +// Exactly one of *ListUserInvitationsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListUserInvitationsResponse.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 *CustomersUserinvitationsListCall) Do(opts ...googleapi.CallOption) (*ListUserInvitationsResponse, 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 := &ListUserInvitationsResponse{ + 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": "Retrieves a list of UserInvitation resources. **Note:** New consumer accounts with the customer's verified domain created within the previous 48 hours will not appear in the result. This delay also applies to newly-verified domains.", + // "flatPath": "v1/customers/{customersId}/userinvitations", + // "httpMethod": "GET", + // "id": "cloudidentity.customers.userinvitations.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. A query string for filtering `UserInvitation` results by their current state, in the format: `\"state=='invited'\"`.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. The sort order of the list results. You can sort the results in descending order based on either email or last update timestamp but not both, using `order_by=\"email desc\"`. Currently, sorting is supported for `update_time asc`, `update_time desc`, `email asc`, and `email desc`. If not specified, results will be returned based on `email asc` order.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of UserInvitation resources to return. If unspecified, at most 100 resources will be returned. The maximum value is 200; values above 200 will be set to 200.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous `ListUserInvitations` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBooks` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The customer ID of the Google Workspace or Cloud Identity account the UserInvitation resources are associated with.", + // "location": "path", + // "pattern": "^customers/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/userinvitations", + // "response": { + // "$ref": "ListUserInvitationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", + // "https://www.googleapis.com/auth/cloud-identity.userinvitations", + // "https://www.googleapis.com/auth/cloud-identity.userinvitations.readonly" + // ] + // } + +} + +// 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 *CustomersUserinvitationsListCall) Pages(ctx context.Context, f func(*ListUserInvitationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("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.PageToken(x.NextPageToken) + } +} + +// method id "cloudidentity.customers.userinvitations.send": + +type CustomersUserinvitationsSendCall struct { + s *Service + name string + senduserinvitationrequest *SendUserInvitationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Send: Sends a UserInvitation to email. If the `UserInvitation` does +// not exist for this request and it is a valid request, the request +// creates a `UserInvitation`. **Note:** The `get` and `list` methods +// have a 48-hour delay where newly-created consumer accounts will not +// appear in the results. You can still send a `UserInvitation` to those +// accounts if you know the unmanaged email address and +// IsInvitableUser==True. +// +// - name: `UserInvitation` name in the format +// `customers/{customer}/userinvitations/{user_email_address}`. +func (r *CustomersUserinvitationsService) Send(name string, senduserinvitationrequest *SendUserInvitationRequest) *CustomersUserinvitationsSendCall { + c := &CustomersUserinvitationsSendCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.senduserinvitationrequest = senduserinvitationrequest + 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 *CustomersUserinvitationsSendCall) Fields(s ...googleapi.Field) *CustomersUserinvitationsSendCall { + 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 *CustomersUserinvitationsSendCall) Context(ctx context.Context) *CustomersUserinvitationsSendCall { + 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 *CustomersUserinvitationsSendCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersUserinvitationsSendCall) 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.senduserinvitationrequest) + 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, "v1/{+name}:send") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudidentity.customers.userinvitations.send" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.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 *CustomersUserinvitationsSendCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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": "Sends a UserInvitation to email. If the `UserInvitation` does not exist for this request and it is a valid request, the request creates a `UserInvitation`. **Note:** The `get` and `list` methods have a 48-hour delay where newly-created consumer accounts will not appear in the results. You can still send a `UserInvitation` to those accounts if you know the unmanaged email address and IsInvitableUser==True.", + // "flatPath": "v1/customers/{customersId}/userinvitations/{userinvitationsId}:send", + // "httpMethod": "POST", + // "id": "cloudidentity.customers.userinvitations.send", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. `UserInvitation` name in the format `customers/{customer}/userinvitations/{user_email_address}`", + // "location": "path", + // "pattern": "^customers/[^/]+/userinvitations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:send", + // "request": { + // "$ref": "SendUserInvitationRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", + // "https://www.googleapis.com/auth/cloud-identity.userinvitations" + // ] + // } + +} + // method id "cloudidentity.devices.cancelWipe": type DevicesCancelWipeCall struct { diff --git a/deploymentmanager/v0.alpha/deploymentmanager-api.json b/deploymentmanager/v0.alpha/deploymentmanager-api.json index ec5da9dbc05..5b02d5f313e 100644 --- a/deploymentmanager/v0.alpha/deploymentmanager-api.json +++ b/deploymentmanager/v0.alpha/deploymentmanager-api.json @@ -1588,7 +1588,7 @@ } } }, - "revision": "20220520", + "revision": "20220714", "rootUrl": "https://deploymentmanager.googleapis.com/", "schemas": { "AsyncOptions": { @@ -2412,7 +2412,8 @@ "DEPRECATED_TYPE_USED", "PARTIAL_SUCCESS", "LARGE_DEPLOYMENT_WARNING", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" ], "enumDescriptions": [ "A link to a deprecated resource was created.", @@ -2440,7 +2441,8 @@ "When deploying and at least one of the resources has a type marked as deprecated", "Success is reported, but some results may be missing due to errors", "When deploying a deployment with a exceedingly large number of resources", - "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route." + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2." ], "type": "string" }, @@ -2686,7 +2688,8 @@ "DEPRECATED_TYPE_USED", "PARTIAL_SUCCESS", "LARGE_DEPLOYMENT_WARNING", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" ], "enumDescriptions": [ "A link to a deprecated resource was created.", @@ -2714,7 +2717,8 @@ "When deploying and at least one of the resources has a type marked as deprecated", "Success is reported, but some results may be missing due to errors", "When deploying a deployment with a exceedingly large number of resources", - "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route." + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2." ], "type": "string" }, @@ -2897,7 +2901,8 @@ "DEPRECATED_TYPE_USED", "PARTIAL_SUCCESS", "LARGE_DEPLOYMENT_WARNING", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" ], "enumDescriptions": [ "A link to a deprecated resource was created.", @@ -2925,7 +2930,8 @@ "When deploying and at least one of the resources has a type marked as deprecated", "Success is reported, but some results may be missing due to errors", "When deploying a deployment with a exceedingly large number of resources", - "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route." + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2." ], "type": "string" }, diff --git a/deploymentmanager/v0.alpha/deploymentmanager-gen.go b/deploymentmanager/v0.alpha/deploymentmanager-gen.go index 46df553d94d..aeacf18916d 100644 --- a/deploymentmanager/v0.alpha/deploymentmanager-gen.go +++ b/deploymentmanager/v0.alpha/deploymentmanager-gen.go @@ -1718,6 +1718,9 @@ type OperationWarnings struct { // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's // nextHopInstance URL refers to an instance that does not have an ipv6 // interface on the same network as the route. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. Code string `json:"code,omitempty"` // Data: [Output Only] Metadata about this warning in key: value format. @@ -2171,6 +2174,9 @@ type ResourceWarnings struct { // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's // nextHopInstance URL refers to an instance that does not have an ipv6 // interface on the same network as the route. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. Code string `json:"code,omitempty"` // Data: [Output Only] Metadata about this warning in key: value format. @@ -2485,6 +2491,9 @@ type ResourceUpdateWarnings struct { // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's // nextHopInstance URL refers to an instance that does not have an ipv6 // interface on the same network as the route. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. Code string `json:"code,omitempty"` // Data: [Output Only] Metadata about this warning in key: value format. diff --git a/deploymentmanager/v2/deploymentmanager-api.json b/deploymentmanager/v2/deploymentmanager-api.json index bb6179046c1..b1663763dda 100644 --- a/deploymentmanager/v2/deploymentmanager-api.json +++ b/deploymentmanager/v2/deploymentmanager-api.json @@ -988,7 +988,7 @@ } } }, - "revision": "20220520", + "revision": "20220714", "rootUrl": "https://deploymentmanager.googleapis.com/", "schemas": { "AuditConfig": { @@ -1510,7 +1510,8 @@ "DEPRECATED_TYPE_USED", "PARTIAL_SUCCESS", "LARGE_DEPLOYMENT_WARNING", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" ], "enumDescriptions": [ "A link to a deprecated resource was created.", @@ -1538,7 +1539,8 @@ "When deploying and at least one of the resources has a type marked as deprecated", "Success is reported, but some results may be missing due to errors", "When deploying a deployment with a exceedingly large number of resources", - "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route." + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2." ], "type": "string" }, @@ -1703,7 +1705,8 @@ "DEPRECATED_TYPE_USED", "PARTIAL_SUCCESS", "LARGE_DEPLOYMENT_WARNING", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" ], "enumDescriptions": [ "A link to a deprecated resource was created.", @@ -1731,7 +1734,8 @@ "When deploying and at least one of the resources has a type marked as deprecated", "Success is reported, but some results may be missing due to errors", "When deploying a deployment with a exceedingly large number of resources", - "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route." + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2." ], "type": "string" }, @@ -1891,7 +1895,8 @@ "DEPRECATED_TYPE_USED", "PARTIAL_SUCCESS", "LARGE_DEPLOYMENT_WARNING", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" ], "enumDescriptions": [ "A link to a deprecated resource was created.", @@ -1919,7 +1924,8 @@ "When deploying and at least one of the resources has a type marked as deprecated", "Success is reported, but some results may be missing due to errors", "When deploying a deployment with a exceedingly large number of resources", - "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route." + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2." ], "type": "string" }, diff --git a/deploymentmanager/v2/deploymentmanager-gen.go b/deploymentmanager/v2/deploymentmanager-gen.go index 4ebcdbae6af..d28a41e86b4 100644 --- a/deploymentmanager/v2/deploymentmanager-gen.go +++ b/deploymentmanager/v2/deploymentmanager-gen.go @@ -1207,6 +1207,9 @@ type OperationWarnings struct { // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's // nextHopInstance URL refers to an instance that does not have an ipv6 // interface on the same network as the route. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. Code string `json:"code,omitempty"` // Data: [Output Only] Metadata about this warning in key: value format. @@ -1558,6 +1561,9 @@ type ResourceWarnings struct { // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's // nextHopInstance URL refers to an instance that does not have an ipv6 // interface on the same network as the route. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. Code string `json:"code,omitempty"` // Data: [Output Only] Metadata about this warning in key: value format. @@ -1854,6 +1860,9 @@ type ResourceUpdateWarnings struct { // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's // nextHopInstance URL refers to an instance that does not have an ipv6 // interface on the same network as the route. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. Code string `json:"code,omitempty"` // Data: [Output Only] Metadata about this warning in key: value format. diff --git a/deploymentmanager/v2beta/deploymentmanager-api.json b/deploymentmanager/v2beta/deploymentmanager-api.json index 0b3a07eee0e..3de5f362726 100644 --- a/deploymentmanager/v2beta/deploymentmanager-api.json +++ b/deploymentmanager/v2beta/deploymentmanager-api.json @@ -1552,7 +1552,7 @@ } } }, - "revision": "20220520", + "revision": "20220714", "rootUrl": "https://deploymentmanager.googleapis.com/", "schemas": { "AsyncOptions": { @@ -2315,7 +2315,8 @@ "DEPRECATED_TYPE_USED", "PARTIAL_SUCCESS", "LARGE_DEPLOYMENT_WARNING", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" ], "enumDescriptions": [ "A link to a deprecated resource was created.", @@ -2343,7 +2344,8 @@ "When deploying and at least one of the resources has a type marked as deprecated", "Success is reported, but some results may be missing due to errors", "When deploying a deployment with a exceedingly large number of resources", - "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route." + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2." ], "type": "string" }, @@ -2566,7 +2568,8 @@ "DEPRECATED_TYPE_USED", "PARTIAL_SUCCESS", "LARGE_DEPLOYMENT_WARNING", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" ], "enumDescriptions": [ "A link to a deprecated resource was created.", @@ -2594,7 +2597,8 @@ "When deploying and at least one of the resources has a type marked as deprecated", "Success is reported, but some results may be missing due to errors", "When deploying a deployment with a exceedingly large number of resources", - "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route." + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2." ], "type": "string" }, @@ -2754,7 +2758,8 @@ "DEPRECATED_TYPE_USED", "PARTIAL_SUCCESS", "LARGE_DEPLOYMENT_WARNING", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" ], "enumDescriptions": [ "A link to a deprecated resource was created.", @@ -2782,7 +2787,8 @@ "When deploying and at least one of the resources has a type marked as deprecated", "Success is reported, but some results may be missing due to errors", "When deploying a deployment with a exceedingly large number of resources", - "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route." + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2." ], "type": "string" }, diff --git a/deploymentmanager/v2beta/deploymentmanager-gen.go b/deploymentmanager/v2beta/deploymentmanager-gen.go index e2e57a7d288..acf46e3841d 100644 --- a/deploymentmanager/v2beta/deploymentmanager-gen.go +++ b/deploymentmanager/v2beta/deploymentmanager-gen.go @@ -1626,6 +1626,9 @@ type OperationWarnings struct { // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's // nextHopInstance URL refers to an instance that does not have an ipv6 // interface on the same network as the route. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. Code string `json:"code,omitempty"` // Data: [Output Only] Metadata about this warning in key: value format. @@ -2067,6 +2070,9 @@ type ResourceWarnings struct { // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's // nextHopInstance URL refers to an instance that does not have an ipv6 // interface on the same network as the route. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. Code string `json:"code,omitempty"` // Data: [Output Only] Metadata about this warning in key: value format. @@ -2363,6 +2369,9 @@ type ResourceUpdateWarnings struct { // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's // nextHopInstance URL refers to an instance that does not have an ipv6 // interface on the same network as the route. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. Code string `json:"code,omitempty"` // Data: [Output Only] Metadata about this warning in key: value format. diff --git a/iam/v2beta/iam-api.json b/iam/v2beta/iam-api.json index 55edaac654e..94b89429ca9 100644 --- a/iam/v2beta/iam-api.json +++ b/iam/v2beta/iam-api.json @@ -293,7 +293,7 @@ } } }, - "revision": "20220526", + "revision": "20220713", "rootUrl": "https://iam.googleapis.com/", "schemas": { "GoogleIamAdminV1AuditData": { @@ -408,7 +408,7 @@ "type": "array" }, "deniedPrincipals": { - "description": "The identities that are prevented from using one or more permissions on Google Cloud resources. This field can contain the following values: * `principalSet://goog/public:all`: A special identifier that represents any user who is on the internet, even if they do not have a Google Account or are not logged in. * `principal://goog/subject/{email_id}`: A specific Google Account. Includes Gmail, Cloud Identity, and Google Workspace user accounts. For example, `principal://goog/subject/alice@example.com`. * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific Google Account that was deleted recently. For example, `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If the Google Account is recovered, this identifier reverts to the standard identifier for a Google Account. * `principalSet://goog/group/{group_id}`: A Google group. For example, `principalSet://goog/group/admins@example.com`. * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group that was deleted recently. For example, `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If the Google group is restored, this identifier reverts to the standard identifier for a Google group. * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: A Google Cloud service account. For example, `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: A Google Cloud service account that was deleted recently. For example, `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. If the service account is undeleted, this identifier reverts to the standard identifier for a service account. * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the principals associated with the specified Google Workspace or Cloud Identity customer ID. For example, `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.", + "description": "The identities that are prevented from using one or more permissions on Google Cloud resources. This field can contain the following values: * `principalSet://goog/public:all`: A special identifier that represents any principal that is on the internet, even if they do not have a Google Account or are not logged in. * `principal://goog/subject/{email_id}`: A specific Google Account. Includes Gmail, Cloud Identity, and Google Workspace user accounts. For example, `principal://goog/subject/alice@example.com`. * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific Google Account that was deleted recently. For example, `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If the Google Account is recovered, this identifier reverts to the standard identifier for a Google Account. * `principalSet://goog/group/{group_id}`: A Google group. For example, `principalSet://goog/group/admins@example.com`. * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group that was deleted recently. For example, `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If the Google group is restored, this identifier reverts to the standard identifier for a Google group. * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: A Google Cloud service account. For example, `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: A Google Cloud service account that was deleted recently. For example, `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. If the service account is undeleted, this identifier reverts to the standard identifier for a service account. * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the principals associated with the specified Google Workspace or Cloud Identity customer ID. For example, `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.", "items": { "type": "string" }, diff --git a/iam/v2beta/iam-gen.go b/iam/v2beta/iam-gen.go index 8ccd3e372a3..da2df320968 100644 --- a/iam/v2beta/iam-gen.go +++ b/iam/v2beta/iam-gen.go @@ -356,8 +356,8 @@ type GoogleIamV2betaDenyRule struct { // DeniedPrincipals: The identities that are prevented from using one or // more permissions on Google Cloud resources. This field can contain // the following values: * `principalSet://goog/public:all`: A special - // identifier that represents any user who is on the internet, even if - // they do not have a Google Account or are not logged in. * + // identifier that represents any principal that is on the internet, + // even if they do not have a Google Account or are not logged in. * // `principal://goog/subject/{email_id}`: A specific Google Account. // Includes Gmail, Cloud Identity, and Google Workspace user accounts. // For example, `principal://goog/subject/alice@example.com`. * diff --git a/iap/v1/iap-api.json b/iap/v1/iap-api.json index 1ce30fcfa10..e5467f605f0 100644 --- a/iap/v1/iap-api.json +++ b/iap/v1/iap-api.json @@ -652,7 +652,7 @@ } } }, - "revision": "20220603", + "revision": "20220715", "rootUrl": "https://iap.googleapis.com/", "schemas": { "AccessDeniedPageSettings": { @@ -666,6 +666,10 @@ "generateTroubleshootingUri": { "description": "Whether to generate a troubleshooting URL on access denied events to this application.", "type": "boolean" + }, + "remediationTokenGenerationEnabled": { + "description": "Whether to generate remediation token on access denied events to this application.", + "type": "boolean" } }, "type": "object" @@ -674,6 +678,10 @@ "description": "Access related settings for IAP protected apps.", "id": "AccessSettings", "properties": { + "allowedDomainsSettings": { + "$ref": "AllowedDomainsSettings", + "description": "Settings to configure and enable allowed domains." + }, "corsSettings": { "$ref": "CorsSettings", "description": "Configuration to allow cross-origin requests via IAP." @@ -697,6 +705,24 @@ }, "type": "object" }, + "AllowedDomainsSettings": { + "description": "Configuration for IAP allowed domains. Allows the customers to restrict access to the app by only allowing requests from the listed trusted domains.", + "id": "AllowedDomainsSettings", + "properties": { + "domains": { + "description": "List of trusted domains.", + "items": { + "type": "string" + }, + "type": "array" + }, + "enable": { + "description": "Configuration for customers to opt in for the feature.", + "type": "boolean" + } + }, + "type": "object" + }, "ApplicationSettings": { "description": "Wrapper over application specific settings for IAP.", "id": "ApplicationSettings", @@ -775,7 +801,7 @@ "type": "object" }, "CsmSettings": { - "description": "Configuration for RCTokens generated for service mesh workloads protected by IAP. RCTokens are IAP generated JWTs that can be verified at the application. The RCToken is primarily used for service mesh deployments, and can be scoped to a single mesh by configuring the audience field accordingly", + "description": "Configuration for RCToken generated for service mesh workloads protected by IAP. RCToken are IAP generated JWTs that can be verified at the application. The RCToken is primarily used for service mesh deployments, and can be scoped to a single mesh by configuring the audience field accordingly.", "id": "CsmSettings", "properties": { "rctokenAud": { @@ -1036,13 +1062,11 @@ "enum": [ "METHOD_UNSPECIFIED", "LOGIN", - "PASSWORD", "SECURE_KEY" ], "enumDescriptions": [ "Reauthentication disabled.", - "Mimics the behavior as if the user had logged out and tried to log in again. Users with 2SV (2-step verification) enabled see their 2SV challenges if they did not opt to have their second factor responses saved. Apps Core (GSuites) admins can configure settings to disable 2SV cookies and require 2SV for all Apps Core users in their domains.", - "User must type their password.", + "Prompts the user to log in again.", "User must use their secure key 2nd factor device." ], "type": "string" diff --git a/iap/v1/iap-gen.go b/iap/v1/iap-gen.go index 67377c461f3..554fd559445 100644 --- a/iap/v1/iap-gen.go +++ b/iap/v1/iap-gen.go @@ -231,6 +231,10 @@ type AccessDeniedPageSettings struct { // on access denied events to this application. GenerateTroubleshootingUri bool `json:"generateTroubleshootingUri,omitempty"` + // RemediationTokenGenerationEnabled: Whether to generate remediation + // token on access denied events to this application. + RemediationTokenGenerationEnabled bool `json:"remediationTokenGenerationEnabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "AccessDeniedPageUri") // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -257,6 +261,10 @@ func (s *AccessDeniedPageSettings) MarshalJSON() ([]byte, error) { // AccessSettings: Access related settings for IAP protected apps. type AccessSettings struct { + // AllowedDomainsSettings: Settings to configure and enable allowed + // domains. + AllowedDomainsSettings *AllowedDomainsSettings `json:"allowedDomainsSettings,omitempty"` + // CorsSettings: Configuration to allow cross-origin requests via IAP. CorsSettings *CorsSettings `json:"corsSettings,omitempty"` @@ -275,7 +283,42 @@ type AccessSettings struct { // IAP. ReauthSettings *ReauthSettings `json:"reauthSettings,omitempty"` - // ForceSendFields is a list of field names (e.g. "CorsSettings") to + // ForceSendFields is a list of field names (e.g. + // "AllowedDomainsSettings") 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. "AllowedDomainsSettings") + // 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 *AccessSettings) MarshalJSON() ([]byte, error) { + type NoMethod AccessSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AllowedDomainsSettings: Configuration for IAP allowed domains. Allows +// the customers to restrict access to the app by only allowing requests +// from the listed trusted domains. +type AllowedDomainsSettings struct { + // Domains: List of trusted domains. + Domains []string `json:"domains,omitempty"` + + // Enable: Configuration for customers to opt in for the feature. + Enable bool `json:"enable,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Domains") 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 @@ -283,17 +326,17 @@ type AccessSettings struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CorsSettings") 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 + // NullFields is a list of field names (e.g. "Domains") 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 *AccessSettings) MarshalJSON() ([]byte, error) { - type NoMethod AccessSettings +func (s *AllowedDomainsSettings) MarshalJSON() ([]byte, error) { + type NoMethod AllowedDomainsSettings raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -489,11 +532,11 @@ func (s *CorsSettings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// CsmSettings: Configuration for RCTokens generated for service mesh -// workloads protected by IAP. RCTokens are IAP generated JWTs that can +// CsmSettings: Configuration for RCToken generated for service mesh +// workloads protected by IAP. RCToken are IAP generated JWTs that can // be verified at the application. The RCToken is primarily used for // service mesh deployments, and can be scoped to a single mesh by -// configuring the audience field accordingly +// configuring the audience field accordingly. type CsmSettings struct { // RctokenAud: Audience claim set in the generated RCToken. This value // is not validated by IAP. @@ -1131,13 +1174,7 @@ type ReauthSettings struct { // // Possible values: // "METHOD_UNSPECIFIED" - Reauthentication disabled. - // "LOGIN" - Mimics the behavior as if the user had logged out and - // tried to log in again. Users with 2SV (2-step verification) enabled - // see their 2SV challenges if they did not opt to have their second - // factor responses saved. Apps Core (GSuites) admins can configure - // settings to disable 2SV cookies and require 2SV for all Apps Core - // users in their domains. - // "PASSWORD" - User must type their password. + // "LOGIN" - Prompts the user to log in again. // "SECURE_KEY" - User must use their secure key 2nd factor device. Method string `json:"method,omitempty"` diff --git a/logging/v2/logging-api.json b/logging/v2/logging-api.json index 370a72f0369..af440d53e4f 100644 --- a/logging/v2/logging-api.json +++ b/logging/v2/logging-api.json @@ -6007,7 +6007,7 @@ } } }, - "revision": "20220624", + "revision": "20220714", "rootUrl": "https://logging.googleapis.com/", "schemas": { "BigQueryOptions": { @@ -6771,7 +6771,7 @@ "description": "Optional. Source code location information associated with the log entry, if any." }, "spanId": { - "description": "Optional. The span ID within the trace associated with the log entry.For Trace spans, this is the same format that the Trace API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such as 000000000000004a.", + "description": "Optional. The ID of the Cloud Trace (https://cloud.google.com/trace) span associated with the current operation in which the log is being written. For example, if a span has the REST resource name of \"projects/some-project/traces/some-trace/spans/some-span-id\", then the span_id field is \"some-span-id\".A Span (https://cloud.google.com/trace/docs/reference/v2/rest/v2/projects.traces/batchWrite#Span) represents a single operation within a trace. Whereas a trace may involve multiple different microservices running on multiple different machines, a span generally corresponds to a single logical operation being performed in a single instance of a microservice on one specific machine. Spans are the nodes within the tree that is a trace.Applications that are instrumented for tracing (https://cloud.google.com/trace/docs/setup) will generally assign a new, unique span ID on each incoming request. It is also common to create and record additional spans corresponding to internal processing elements as well as issuing requests to dependencies.The span ID is expected to be a 16-character, hexadecimal encoding of an 8-byte array and should not be zero. It should be unique within the trace and should, ideally, be generated in a manner that is uniformly random.Example values: 000000000000004a 7a2190356c3fc94b 0000f00300090021 d39223e101960076", "type": "string" }, "split": { @@ -6788,7 +6788,7 @@ "type": "string" }, "trace": { - "description": "Optional. Resource name of the trace associated with the log entry, if any. If it contains a relative resource name, the name is assumed to be relative to //tracing.googleapis.com. Example: projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824", + "description": "Optional. The REST resource name of the trace being written to Cloud Trace (https://cloud.google.com/trace) in association with this log entry. For example, if your trace data is stored in the Cloud project \"my-trace-project\" and if the service that is creating the log entry receives a trace header that includes the trace ID \"12345\", then the service should use \"projects/my-tracing-project/traces/12345\".The trace field provides the link between logs and traces. By using this field, you can navigate from a log entry to a trace.", "type": "string" }, "traceSampled": { @@ -7054,7 +7054,7 @@ "type": "string" }, "writerIdentity": { - "description": "Output only. An IAM identity—a service account or group—under which Cloud Logging writes the exported log entries to the sink's destination. This field is set by sinks.create and sinks.update based on the value of unique_writer_identity in those methods.Until you grant this identity write-access to the destination, log entry exports from this sink will fail. For more information, see Granting Access for a Resource (https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). Consult the destination service's documentation to determine the appropriate IAM roles to assign to the identity.Sinks that have a destination that is a log bucket in the same project as the sink do not have a writer_identity and no additional permissions are required.", + "description": "Output only. An IAM identity—a service account or group—under which Cloud Logging writes the exported log entries to the sink's destination. This field is either set by specifying custom_writer_identity or set automatically by sinks.create and sinks.update based on the value of unique_writer_identity in those methods.Until you grant this identity write-access to the destination, log entry exports from this sink will fail. For more information, see Granting Access for a Resource (https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). Consult the destination service's documentation to determine the appropriate IAM roles to assign to the identity.Sinks that have a destination that is a log bucket in the same project as the sink cannot have a writer_identity and no additional permissions are required.", "readOnly": true, "type": "string" } diff --git a/logging/v2/logging-gen.go b/logging/v2/logging-gen.go index 3691cf29a07..ec7c2d7f2dd 100644 --- a/logging/v2/logging-gen.go +++ b/logging/v2/logging-gen.go @@ -2078,10 +2078,28 @@ type LogEntry struct { // with the log entry, if any. SourceLocation *LogEntrySourceLocation `json:"sourceLocation,omitempty"` - // SpanId: Optional. The span ID within the trace associated with the - // log entry.For Trace spans, this is the same format that the Trace API - // v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such - // as 000000000000004a. + // SpanId: Optional. The ID of the Cloud Trace + // (https://cloud.google.com/trace) span associated with the current + // operation in which the log is being written. For example, if a span + // has the REST resource name of + // "projects/some-project/traces/some-trace/spans/some-span-id", then + // the span_id field is "some-span-id".A Span + // (https://cloud.google.com/trace/docs/reference/v2/rest/v2/projects.traces/batchWrite#Span) + // represents a single operation within a trace. Whereas a trace may + // involve multiple different microservices running on multiple + // different machines, a span generally corresponds to a single logical + // operation being performed in a single instance of a microservice on + // one specific machine. Spans are the nodes within the tree that is a + // trace.Applications that are instrumented for tracing + // (https://cloud.google.com/trace/docs/setup) will generally assign a + // new, unique span ID on each incoming request. It is also common to + // create and record additional spans corresponding to internal + // processing elements as well as issuing requests to dependencies.The + // span ID is expected to be a 16-character, hexadecimal encoding of an + // 8-byte array and should not be zero. It should be unique within the + // trace and should, ideally, be generated in a manner that is uniformly + // random.Example values: 000000000000004a 7a2190356c3fc94b + // 0000f00300090021 d39223e101960076 SpanId string `json:"spanId,omitempty"` // Split: Optional. Information indicating this LogEntry is part of a @@ -2104,10 +2122,15 @@ type LogEntry struct { // outside those time boundaries aren't ingested by Logging. Timestamp string `json:"timestamp,omitempty"` - // Trace: Optional. Resource name of the trace associated with the log - // entry, if any. If it contains a relative resource name, the name is - // assumed to be relative to //tracing.googleapis.com. Example: - // projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824 + // Trace: Optional. The REST resource name of the trace being written to + // Cloud Trace (https://cloud.google.com/trace) in association with this + // log entry. For example, if your trace data is stored in the Cloud + // project "my-trace-project" and if the service that is creating the + // log entry receives a trace header that includes the trace ID "12345", + // then the service should use + // "projects/my-tracing-project/traces/12345".The trace field provides + // the link between logs and traces. By using this field, you can + // navigate from a log entry to a trace. Trace string `json:"trace,omitempty"` // TraceSampled: Optional. The sampling decision of the trace associated @@ -2561,7 +2584,8 @@ type LogSink struct { // WriterIdentity: Output only. An IAM identity—a service account or // group—under which Cloud Logging writes the exported log entries to - // the sink's destination. This field is set by sinks.create and + // the sink's destination. This field is either set by specifying + // custom_writer_identity or set automatically by sinks.create and // sinks.update based on the value of unique_writer_identity in those // methods.Until you grant this identity write-access to the // destination, log entry exports from this sink will fail. For more @@ -2569,8 +2593,8 @@ type LogSink struct { // (https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). // Consult the destination service's documentation to determine the // appropriate IAM roles to assign to the identity.Sinks that have a - // destination that is a log bucket in the same project as the sink do - // not have a writer_identity and no additional permissions are + // destination that is a log bucket in the same project as the sink + // cannot have a writer_identity and no additional permissions are // required. WriterIdentity string `json:"writerIdentity,omitempty"` diff --git a/networkconnectivity/v1/networkconnectivity-api.json b/networkconnectivity/v1/networkconnectivity-api.json index 6657530b825..274e24d2fc3 100644 --- a/networkconnectivity/v1/networkconnectivity-api.json +++ b/networkconnectivity/v1/networkconnectivity-api.json @@ -12,7 +12,7 @@ "baseUrl": "https://networkconnectivity.googleapis.com/", "batchPath": "batch", "canonicalName": "networkconnectivity", - "description": "The Network Connectivity API provides access to Network Connectivity Center.", + "description": "This API enables connectivity with and between Google Cloud resources.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest", "fullyEncodeReservedExpansion": true, @@ -182,7 +182,7 @@ "hubs": { "methods": { "create": { - "description": "Creates a new hub in the specified project.", + "description": "Creates a new Network Connectivity Center hub in the specified project.", "flatPath": "v1/projects/{projectsId}/locations/global/hubs", "httpMethod": "POST", "id": "networkconnectivity.projects.locations.global.hubs.create", @@ -220,7 +220,7 @@ ] }, "delete": { - "description": "Deletes the specified hub.", + "description": "Deletes a Network Connectivity Center hub.", "flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}", "httpMethod": "DELETE", "id": "networkconnectivity.projects.locations.global.hubs.delete", @@ -250,7 +250,7 @@ ] }, "get": { - "description": "Gets details about the specified hub.", + "description": "Gets details about a Network Connectivity Center hub.", "flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}", "httpMethod": "GET", "id": "networkconnectivity.projects.locations.global.hubs.get", @@ -306,7 +306,7 @@ ] }, "list": { - "description": "Lists hubs in a given project.", + "description": "Lists the Network Connectivity Center hubs associated with a given project.", "flatPath": "v1/projects/{projectsId}/locations/global/hubs", "httpMethod": "GET", "id": "networkconnectivity.projects.locations.global.hubs.list", @@ -352,7 +352,7 @@ ] }, "patch": { - "description": "Updates the description and/or labels of the specified hub.", + "description": "Updates the description and/or labels of a Network Connectivity Center hub.", "flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}", "httpMethod": "PATCH", "id": "networkconnectivity.projects.locations.global.hubs.patch", @@ -667,7 +667,7 @@ "spokes": { "methods": { "create": { - "description": "Creates a spoke in the specified project and location.", + "description": "Creates a Network Connectivity Center spoke.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes", "httpMethod": "POST", "id": "networkconnectivity.projects.locations.spokes.create", @@ -705,7 +705,7 @@ ] }, "delete": { - "description": "Deletes the specified spoke.", + "description": "Deletes a Network Connectivity Center spoke.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}", "httpMethod": "DELETE", "id": "networkconnectivity.projects.locations.spokes.delete", @@ -735,7 +735,7 @@ ] }, "get": { - "description": "Gets details about the specified spoke.", + "description": "Gets details about a Network Connectivity Center spoke.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}", "httpMethod": "GET", "id": "networkconnectivity.projects.locations.spokes.get", @@ -791,7 +791,7 @@ ] }, "list": { - "description": "Lists the spokes in the specified project and location.", + "description": "Lists the Network Connectivity Center spokes in a specified project and location.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes", "httpMethod": "GET", "id": "networkconnectivity.projects.locations.spokes.list", @@ -837,7 +837,7 @@ ] }, "patch": { - "description": "Updates the parameters of the specified spoke.", + "description": "Updates the parameters of a Network Connectivity Center spoke.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}", "httpMethod": "PATCH", "id": "networkconnectivity.projects.locations.spokes.patch", @@ -938,7 +938,7 @@ } } }, - "revision": "20220505", + "revision": "20220715", "rootUrl": "https://networkconnectivity.googleapis.com/", "schemas": { "AuditConfig": { @@ -1127,7 +1127,7 @@ "type": "object" }, "Hub": { - "description": "A hub is a collection of spokes. A single hub can contain spokes from multiple regions. However, if any of a hub's spokes use the data transfer feature, the resources associated with those spokes must all reside in the same VPC network. Spokes that do not use data transfer can be associated with any VPC network in your project.", + "description": "A Network Connectivity Center hub is a collection of spokes. A single hub can contain spokes from multiple regions. However, if any of a hub's spokes use the data transfer feature, the resources associated with those spokes must all reside in the same VPC network. Spokes that do not use data transfer can be associated with any VPC network in your project.", "id": "Hub", "properties": { "createTime": { @@ -1164,13 +1164,15 @@ "STATE_UNSPECIFIED", "CREATING", "ACTIVE", - "DELETING" + "DELETING", + "UPDATING" ], "enumDescriptions": [ "No state information available", "The resource's create operation is in progress", "The resource is active", - "The resource's Delete operation is in progress" + "The resource's Delete operation is in progress", + "The resource's Update operation is in progress" ], "readOnly": true, "type": "string" @@ -1460,7 +1462,7 @@ "type": "object" }, "RoutingVPC": { - "description": "RoutingVPC contains information about the VPC networks that are associated with a hub's spokes.", + "description": "RoutingVPC contains information about the VPC networks associated with the spokes of a Network Connectivity Center hub.", "id": "RoutingVPC", "properties": { "requiredForNewSiteToSiteDataTransferSpokes": { @@ -1492,7 +1494,7 @@ "type": "object" }, "Spoke": { - "description": "A spoke represents a connection between your Google Cloud network resources and a non-Google-Cloud network. When you create a spoke, you associate it with a hub. You must also identify a value for exactly one of the following fields: * linked_vpn_tunnels * linked_interconnect_attachments * linked_router_appliance_instances", + "description": "A Network Connectivity Center spoke represents a connection between your Google Cloud network resources and a non-Google-Cloud network. When you create a spoke, you associate it with a hub. You must also identify a value for exactly one of the following fields: * linked_vpn_tunnels * linked_interconnect_attachments * linked_router_appliance_instances", "id": "Spoke", "properties": { "createTime": { @@ -1538,13 +1540,15 @@ "STATE_UNSPECIFIED", "CREATING", "ACTIVE", - "DELETING" + "DELETING", + "UPDATING" ], "enumDescriptions": [ "No state information available", "The resource's create operation is in progress", "The resource is active", - "The resource's Delete operation is in progress" + "The resource's Delete operation is in progress", + "The resource's Update operation is in progress" ], "readOnly": true, "type": "string" diff --git a/networkconnectivity/v1/networkconnectivity-gen.go b/networkconnectivity/v1/networkconnectivity-gen.go index f5a25dd3916..36b28570434 100644 --- a/networkconnectivity/v1/networkconnectivity-gen.go +++ b/networkconnectivity/v1/networkconnectivity-gen.go @@ -607,11 +607,12 @@ func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Hub: A hub is a collection of spokes. A single hub can contain spokes -// from multiple regions. However, if any of a hub's spokes use the data -// transfer feature, the resources associated with those spokes must all -// reside in the same VPC network. Spokes that do not use data transfer -// can be associated with any VPC network in your project. +// Hub: A Network Connectivity Center hub is a collection of spokes. A +// single hub can contain spokes from multiple regions. However, if any +// of a hub's spokes use the data transfer feature, the resources +// associated with those spokes must all reside in the same VPC network. +// Spokes that do not use data transfer can be associated with any VPC +// network in your project. type Hub struct { // CreateTime: Output only. The time the hub was created. CreateTime string `json:"createTime,omitempty"` @@ -641,6 +642,7 @@ type Hub struct { // "CREATING" - The resource's create operation is in progress // "ACTIVE" - The resource is active // "DELETING" - The resource's Delete operation is in progress + // "UPDATING" - The resource's Update operation is in progress State string `json:"state,omitempty"` // UniqueId: Output only. The Google-generated UUID for the hub. This @@ -1197,7 +1199,7 @@ func (s *RouterApplianceInstance) MarshalJSON() ([]byte, error) { } // RoutingVPC: RoutingVPC contains information about the VPC networks -// that are associated with a hub's spokes. +// associated with the spokes of a Network Connectivity Center hub. type RoutingVPC struct { // RequiredForNewSiteToSiteDataTransferSpokes: Output only. If true, // indicates that this VPC network is currently associated with spokes @@ -1272,11 +1274,12 @@ func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Spoke: A spoke represents a connection between your Google Cloud -// network resources and a non-Google-Cloud network. When you create a -// spoke, you associate it with a hub. You must also identify a value -// for exactly one of the following fields: * linked_vpn_tunnels * -// linked_interconnect_attachments * linked_router_appliance_instances +// Spoke: A Network Connectivity Center spoke represents a connection +// between your Google Cloud network resources and a non-Google-Cloud +// network. When you create a spoke, you associate it with a hub. You +// must also identify a value for exactly one of the following fields: * +// linked_vpn_tunnels * linked_interconnect_attachments * +// linked_router_appliance_instances type Spoke struct { // CreateTime: Output only. The time the spoke was created. CreateTime string `json:"createTime,omitempty"` @@ -1315,6 +1318,7 @@ type Spoke struct { // "CREATING" - The resource's create operation is in progress // "ACTIVE" - The resource is active // "DELETING" - The resource's Delete operation is in progress + // "UPDATING" - The resource's Update operation is in progress State string `json:"state,omitempty"` // UniqueId: Output only. The Google-generated UUID for the spoke. This @@ -1785,7 +1789,8 @@ type ProjectsLocationsGlobalHubsCreateCall struct { header_ http.Header } -// Create: Creates a new hub in the specified project. +// Create: Creates a new Network Connectivity Center hub in the +// specified project. // // - parent: The parent resource. func (r *ProjectsLocationsGlobalHubsService) Create(parent string, hub *Hub) *ProjectsLocationsGlobalHubsCreateCall { @@ -1911,7 +1916,7 @@ func (c *ProjectsLocationsGlobalHubsCreateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates a new hub in the specified project.", + // "description": "Creates a new Network Connectivity Center hub in the specified project.", // "flatPath": "v1/projects/{projectsId}/locations/global/hubs", // "httpMethod": "POST", // "id": "networkconnectivity.projects.locations.global.hubs.create", @@ -1961,7 +1966,7 @@ type ProjectsLocationsGlobalHubsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified hub. +// Delete: Deletes a Network Connectivity Center hub. // // - name: The name of the hub to delete. func (r *ProjectsLocationsGlobalHubsService) Delete(name string) *ProjectsLocationsGlobalHubsDeleteCall { @@ -2074,7 +2079,7 @@ func (c *ProjectsLocationsGlobalHubsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes the specified hub.", + // "description": "Deletes a Network Connectivity Center hub.", // "flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}", // "httpMethod": "DELETE", // "id": "networkconnectivity.projects.locations.global.hubs.delete", @@ -2117,7 +2122,7 @@ type ProjectsLocationsGlobalHubsGetCall struct { header_ http.Header } -// Get: Gets details about the specified hub. +// Get: Gets details about a Network Connectivity Center hub. // // - name: The name of the hub resource to get. func (r *ProjectsLocationsGlobalHubsService) Get(name string) *ProjectsLocationsGlobalHubsGetCall { @@ -2225,7 +2230,7 @@ func (c *ProjectsLocationsGlobalHubsGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets details about the specified hub.", + // "description": "Gets details about a Network Connectivity Center hub.", // "flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}", // "httpMethod": "GET", // "id": "networkconnectivity.projects.locations.global.hubs.get", @@ -2438,7 +2443,8 @@ type ProjectsLocationsGlobalHubsListCall struct { header_ http.Header } -// List: Lists hubs in a given project. +// List: Lists the Network Connectivity Center hubs associated with a +// given project. // // - parent: The parent resource's name. func (r *ProjectsLocationsGlobalHubsService) List(parent string) *ProjectsLocationsGlobalHubsListCall { @@ -2573,7 +2579,7 @@ func (c *ProjectsLocationsGlobalHubsListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists hubs in a given project.", + // "description": "Lists the Network Connectivity Center hubs associated with a given project.", // "flatPath": "v1/projects/{projectsId}/locations/global/hubs", // "httpMethod": "GET", // "id": "networkconnectivity.projects.locations.global.hubs.list", @@ -2653,7 +2659,8 @@ type ProjectsLocationsGlobalHubsPatchCall struct { header_ http.Header } -// Patch: Updates the description and/or labels of the specified hub. +// Patch: Updates the description and/or labels of a Network +// Connectivity Center hub. // // - name: Immutable. The name of the hub. Hub names must be unique. // They use the following form: @@ -2785,7 +2792,7 @@ func (c *ProjectsLocationsGlobalHubsPatchCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Updates the description and/or labels of the specified hub.", + // "description": "Updates the description and/or labels of a Network Connectivity Center hub.", // "flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}", // "httpMethod": "PATCH", // "id": "networkconnectivity.projects.locations.global.hubs.patch", @@ -4254,7 +4261,7 @@ type ProjectsLocationsSpokesCreateCall struct { header_ http.Header } -// Create: Creates a spoke in the specified project and location. +// Create: Creates a Network Connectivity Center spoke. // // - parent: The parent resource. func (r *ProjectsLocationsSpokesService) Create(parent string, spoke *Spoke) *ProjectsLocationsSpokesCreateCall { @@ -4380,7 +4387,7 @@ func (c *ProjectsLocationsSpokesCreateCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Creates a spoke in the specified project and location.", + // "description": "Creates a Network Connectivity Center spoke.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes", // "httpMethod": "POST", // "id": "networkconnectivity.projects.locations.spokes.create", @@ -4430,7 +4437,7 @@ type ProjectsLocationsSpokesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified spoke. +// Delete: Deletes a Network Connectivity Center spoke. // // - name: The name of the spoke to delete. func (r *ProjectsLocationsSpokesService) Delete(name string) *ProjectsLocationsSpokesDeleteCall { @@ -4543,7 +4550,7 @@ func (c *ProjectsLocationsSpokesDeleteCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Deletes the specified spoke.", + // "description": "Deletes a Network Connectivity Center spoke.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}", // "httpMethod": "DELETE", // "id": "networkconnectivity.projects.locations.spokes.delete", @@ -4586,7 +4593,7 @@ type ProjectsLocationsSpokesGetCall struct { header_ http.Header } -// Get: Gets details about the specified spoke. +// Get: Gets details about a Network Connectivity Center spoke. // // - name: The name of the spoke resource. func (r *ProjectsLocationsSpokesService) Get(name string) *ProjectsLocationsSpokesGetCall { @@ -4694,7 +4701,7 @@ func (c *ProjectsLocationsSpokesGetCall) Do(opts ...googleapi.CallOption) (*Spok } return ret, nil // { - // "description": "Gets details about the specified spoke.", + // "description": "Gets details about a Network Connectivity Center spoke.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}", // "httpMethod": "GET", // "id": "networkconnectivity.projects.locations.spokes.get", @@ -4907,7 +4914,8 @@ type ProjectsLocationsSpokesListCall struct { header_ http.Header } -// List: Lists the spokes in the specified project and location. +// List: Lists the Network Connectivity Center spokes in a specified +// project and location. // // - parent: The parent resource. func (r *ProjectsLocationsSpokesService) List(parent string) *ProjectsLocationsSpokesListCall { @@ -5042,7 +5050,7 @@ func (c *ProjectsLocationsSpokesListCall) Do(opts ...googleapi.CallOption) (*Lis } return ret, nil // { - // "description": "Lists the spokes in the specified project and location.", + // "description": "Lists the Network Connectivity Center spokes in a specified project and location.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes", // "httpMethod": "GET", // "id": "networkconnectivity.projects.locations.spokes.list", @@ -5122,7 +5130,7 @@ type ProjectsLocationsSpokesPatchCall struct { header_ http.Header } -// Patch: Updates the parameters of the specified spoke. +// Patch: Updates the parameters of a Network Connectivity Center spoke. // // - name: Immutable. The name of the spoke. Spoke names must be unique. // They use the following form: @@ -5254,7 +5262,7 @@ func (c *ProjectsLocationsSpokesPatchCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Updates the parameters of the specified spoke.", + // "description": "Updates the parameters of a Network Connectivity Center spoke.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}", // "httpMethod": "PATCH", // "id": "networkconnectivity.projects.locations.spokes.patch", diff --git a/networkconnectivity/v1alpha1/networkconnectivity-api.json b/networkconnectivity/v1alpha1/networkconnectivity-api.json index b26e93bbec3..abf7481d6b5 100644 --- a/networkconnectivity/v1alpha1/networkconnectivity-api.json +++ b/networkconnectivity/v1alpha1/networkconnectivity-api.json @@ -12,7 +12,7 @@ "baseUrl": "https://networkconnectivity.googleapis.com/", "batchPath": "batch", "canonicalName": "networkconnectivity", - "description": "The Network Connectivity API provides access to Network Connectivity Center.", + "description": "This API enables connectivity with and between Google Cloud resources.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest", "fullyEncodeReservedExpansion": true, @@ -273,7 +273,7 @@ "hubs": { "methods": { "create": { - "description": "Creates a new Hub in a given project and location.", + "description": "Creates a new Network Connectivity Center hub in the specified project.", "flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs", "httpMethod": "POST", "id": "networkconnectivity.projects.locations.global.hubs.create", @@ -311,7 +311,7 @@ ] }, "delete": { - "description": "Deletes a single Hub.", + "description": "Deletes a Network Connectivity Center hub.", "flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs/{hubsId}", "httpMethod": "DELETE", "id": "networkconnectivity.projects.locations.global.hubs.delete", @@ -341,7 +341,7 @@ ] }, "get": { - "description": "Gets details of a single Hub.", + "description": "Gets details about a Network Connectivity Center hub.", "flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs/{hubsId}", "httpMethod": "GET", "id": "networkconnectivity.projects.locations.global.hubs.get", @@ -397,7 +397,7 @@ ] }, "list": { - "description": "Lists Hubs in a given project and location.", + "description": "Lists the Network Connectivity Center hubs associated with a given project.", "flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs", "httpMethod": "GET", "id": "networkconnectivity.projects.locations.global.hubs.list", @@ -443,7 +443,7 @@ ] }, "patch": { - "description": "Updates the parameters of a single Hub.", + "description": "Updates the description and/or labels of a Network Connectivity Center hub.", "flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs/{hubsId}", "httpMethod": "PATCH", "id": "networkconnectivity.projects.locations.global.hubs.patch", @@ -755,6 +755,97 @@ } } }, + "serviceIdentifiers": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceIdentifiers/{serviceIdentifiersId}:getIamPolicy", + "httpMethod": "GET", + "id": "networkconnectivity.projects.locations.serviceIdentifiers.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceIdentifiers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceIdentifiers/{serviceIdentifiersId}:setIamPolicy", + "httpMethod": "POST", + "id": "networkconnectivity.projects.locations.serviceIdentifiers.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceIdentifiers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceIdentifiers/{serviceIdentifiersId}:testIamPermissions", + "httpMethod": "POST", + "id": "networkconnectivity.projects.locations.serviceIdentifiers.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceIdentifiers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "serviceInstances": { "methods": { "getIamPolicy": { @@ -849,7 +940,7 @@ "spokes": { "methods": { "create": { - "description": "Creates a new Spoke in a given project and location.", + "description": "Creates a Network Connectivity Center spoke.", "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/spokes", "httpMethod": "POST", "id": "networkconnectivity.projects.locations.spokes.create", @@ -887,7 +978,7 @@ ] }, "delete": { - "description": "Deletes a single Spoke.", + "description": "Deletes a Network Connectivity Center spoke.", "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}", "httpMethod": "DELETE", "id": "networkconnectivity.projects.locations.spokes.delete", @@ -917,7 +1008,7 @@ ] }, "get": { - "description": "Gets details of a single Spoke.", + "description": "Gets details about a Network Connectivity Center spoke.", "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}", "httpMethod": "GET", "id": "networkconnectivity.projects.locations.spokes.get", @@ -973,7 +1064,7 @@ ] }, "list": { - "description": "Lists Spokes in a given project and location.", + "description": "Lists the Network Connectivity Center spokes in a specified project and location.", "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/spokes", "httpMethod": "GET", "id": "networkconnectivity.projects.locations.spokes.list", @@ -1019,7 +1110,7 @@ ] }, "patch": { - "description": "Updates the parameters of a single Spoke.", + "description": "Updates the parameters of a Network Connectivity Center spoke.", "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}", "httpMethod": "PATCH", "id": "networkconnectivity.projects.locations.spokes.patch", @@ -1120,7 +1211,7 @@ } } }, - "revision": "20220505", + "revision": "20220715", "rootUrl": "https://networkconnectivity.googleapis.com/", "schemas": { "AuditConfig": { @@ -1346,13 +1437,15 @@ "STATE_UNSPECIFIED", "CREATING", "ACTIVE", - "DELETING" + "DELETING", + "UPDATING" ], "enumDescriptions": [ "No state information available", "The resource's create operation is in progress", "The resource is active", - "The resource's Delete operation is in progress" + "The resource's Delete operation is in progress", + "The resource's Update operation is in progress" ], "readOnly": true, "type": "string" @@ -1636,13 +1729,15 @@ "STATE_UNSPECIFIED", "CREATING", "ACTIVE", - "DELETING" + "DELETING", + "UPDATING" ], "enumDescriptions": [ "No state information available", "The resource's create operation is in progress", "The resource is active", - "The resource's Delete operation is in progress" + "The resource's Delete operation is in progress", + "The resource's Update operation is in progress" ], "readOnly": true, "type": "string" diff --git a/networkconnectivity/v1alpha1/networkconnectivity-gen.go b/networkconnectivity/v1alpha1/networkconnectivity-gen.go index d28d2a1d173..2bdd27341ce 100644 --- a/networkconnectivity/v1alpha1/networkconnectivity-gen.go +++ b/networkconnectivity/v1alpha1/networkconnectivity-gen.go @@ -155,6 +155,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.Global = NewProjectsLocationsGlobalService(s) rs.InternalRanges = NewProjectsLocationsInternalRangesService(s) rs.Operations = NewProjectsLocationsOperationsService(s) + rs.ServiceIdentifiers = NewProjectsLocationsServiceIdentifiersService(s) rs.ServiceInstances = NewProjectsLocationsServiceInstancesService(s) rs.Spokes = NewProjectsLocationsSpokesService(s) return rs @@ -171,6 +172,8 @@ type ProjectsLocationsService struct { Operations *ProjectsLocationsOperationsService + ServiceIdentifiers *ProjectsLocationsServiceIdentifiersService + ServiceInstances *ProjectsLocationsServiceInstancesService Spokes *ProjectsLocationsSpokesService @@ -224,6 +227,15 @@ type ProjectsLocationsOperationsService struct { s *Service } +func NewProjectsLocationsServiceIdentifiersService(s *Service) *ProjectsLocationsServiceIdentifiersService { + rs := &ProjectsLocationsServiceIdentifiersService{s: s} + return rs +} + +type ProjectsLocationsServiceIdentifiersService struct { + s *Service +} + func NewProjectsLocationsServiceInstancesService(s *Service) *ProjectsLocationsServiceInstancesService { rs := &ProjectsLocationsServiceInstancesService{s: s} return rs @@ -660,6 +672,7 @@ type Hub struct { // "CREATING" - The resource's create operation is in progress // "ACTIVE" - The resource is active // "DELETING" - The resource's Delete operation is in progress + // "UPDATING" - The resource's Update operation is in progress State string `json:"state,omitempty"` // UniqueId: Output only. Google-generated UUID for this resource. This @@ -1136,6 +1149,7 @@ type Spoke struct { // "CREATING" - The resource's create operation is in progress // "ACTIVE" - The resource is active // "DELETING" - The resource's Delete operation is in progress + // "UPDATING" - The resource's Update operation is in progress State string `json:"state,omitempty"` // UniqueId: Output only. Google-generated UUID for this resource. This @@ -2078,7 +2092,8 @@ type ProjectsLocationsGlobalHubsCreateCall struct { header_ http.Header } -// Create: Creates a new Hub in a given project and location. +// Create: Creates a new Network Connectivity Center hub in the +// specified project. // // - parent: The parent resource's name of the Hub. func (r *ProjectsLocationsGlobalHubsService) Create(parent string, hub *Hub) *ProjectsLocationsGlobalHubsCreateCall { @@ -2204,7 +2219,7 @@ func (c *ProjectsLocationsGlobalHubsCreateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates a new Hub in a given project and location.", + // "description": "Creates a new Network Connectivity Center hub in the specified project.", // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs", // "httpMethod": "POST", // "id": "networkconnectivity.projects.locations.global.hubs.create", @@ -2254,7 +2269,7 @@ type ProjectsLocationsGlobalHubsDeleteCall struct { header_ http.Header } -// Delete: Deletes a single Hub. +// Delete: Deletes a Network Connectivity Center hub. // // - name: The name of the Hub to delete. func (r *ProjectsLocationsGlobalHubsService) Delete(name string) *ProjectsLocationsGlobalHubsDeleteCall { @@ -2367,7 +2382,7 @@ func (c *ProjectsLocationsGlobalHubsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a single Hub.", + // "description": "Deletes a Network Connectivity Center hub.", // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs/{hubsId}", // "httpMethod": "DELETE", // "id": "networkconnectivity.projects.locations.global.hubs.delete", @@ -2410,7 +2425,7 @@ type ProjectsLocationsGlobalHubsGetCall struct { header_ http.Header } -// Get: Gets details of a single Hub. +// Get: Gets details about a Network Connectivity Center hub. // // - name: Name of the Hub resource to get. func (r *ProjectsLocationsGlobalHubsService) Get(name string) *ProjectsLocationsGlobalHubsGetCall { @@ -2518,7 +2533,7 @@ func (c *ProjectsLocationsGlobalHubsGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets details of a single Hub.", + // "description": "Gets details about a Network Connectivity Center hub.", // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs/{hubsId}", // "httpMethod": "GET", // "id": "networkconnectivity.projects.locations.global.hubs.get", @@ -2731,7 +2746,8 @@ type ProjectsLocationsGlobalHubsListCall struct { header_ http.Header } -// List: Lists Hubs in a given project and location. +// List: Lists the Network Connectivity Center hubs associated with a +// given project. // // - parent: The parent resource's name. func (r *ProjectsLocationsGlobalHubsService) List(parent string) *ProjectsLocationsGlobalHubsListCall { @@ -2866,7 +2882,7 @@ func (c *ProjectsLocationsGlobalHubsListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists Hubs in a given project and location.", + // "description": "Lists the Network Connectivity Center hubs associated with a given project.", // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs", // "httpMethod": "GET", // "id": "networkconnectivity.projects.locations.global.hubs.list", @@ -2946,7 +2962,8 @@ type ProjectsLocationsGlobalHubsPatchCall struct { header_ http.Header } -// Patch: Updates the parameters of a single Hub. +// Patch: Updates the description and/or labels of a Network +// Connectivity Center hub. // // - name: Immutable. The name of a Hub resource. func (r *ProjectsLocationsGlobalHubsService) Patch(name string, hub *Hub) *ProjectsLocationsGlobalHubsPatchCall { @@ -3076,7 +3093,7 @@ func (c *ProjectsLocationsGlobalHubsPatchCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Updates the parameters of a single Hub.", + // "description": "Updates the description and/or labels of a Network Connectivity Center hub.", // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs/{hubsId}", // "httpMethod": "PATCH", // "id": "networkconnectivity.projects.locations.global.hubs.patch", @@ -4534,6 +4551,478 @@ func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func( } } +// method id "networkconnectivity.projects.locations.serviceIdentifiers.getIamPolicy": + +type ProjectsLocationsServiceIdentifiersGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServiceIdentifiersService) GetIamPolicy(resource string) *ProjectsLocationsServiceIdentifiersGetIamPolicyCall { + c := &ProjectsLocationsServiceIdentifiersGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsServiceIdentifiersGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceIdentifiersGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + 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 *ProjectsLocationsServiceIdentifiersGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceIdentifiersGetIamPolicyCall { + 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 *ProjectsLocationsServiceIdentifiersGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceIdentifiersGetIamPolicyCall { + 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 *ProjectsLocationsServiceIdentifiersGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceIdentifiersGetIamPolicyCall { + 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 *ProjectsLocationsServiceIdentifiersGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceIdentifiersGetIamPolicyCall) 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, "v1alpha1/{+resource}:getIamPolicy") + 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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.serviceIdentifiers.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.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 *ProjectsLocationsServiceIdentifiersGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ + 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 the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceIdentifiers/{serviceIdentifiersId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.serviceIdentifiers.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceIdentifiers/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceIdentifiers.setIamPolicy": + +type ProjectsLocationsServiceIdentifiersSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServiceIdentifiersService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceIdentifiersSetIamPolicyCall { + c := &ProjectsLocationsServiceIdentifiersSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + 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 *ProjectsLocationsServiceIdentifiersSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceIdentifiersSetIamPolicyCall { + 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 *ProjectsLocationsServiceIdentifiersSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceIdentifiersSetIamPolicyCall { + 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 *ProjectsLocationsServiceIdentifiersSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceIdentifiersSetIamPolicyCall) 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.setiampolicyrequest) + 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, "v1alpha1/{+resource}:setIamPolicy") + 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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.serviceIdentifiers.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.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 *ProjectsLocationsServiceIdentifiersSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ + 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": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceIdentifiers/{serviceIdentifiersId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "networkconnectivity.projects.locations.serviceIdentifiers.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceIdentifiers/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceIdentifiers.testIamPermissions": + +type ProjectsLocationsServiceIdentifiersTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServiceIdentifiersService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceIdentifiersTestIamPermissionsCall { + c := &ProjectsLocationsServiceIdentifiersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + 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 *ProjectsLocationsServiceIdentifiersTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceIdentifiersTestIamPermissionsCall { + 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 *ProjectsLocationsServiceIdentifiersTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceIdentifiersTestIamPermissionsCall { + 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 *ProjectsLocationsServiceIdentifiersTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceIdentifiersTestIamPermissionsCall) 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.testiampermissionsrequest) + 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, "v1alpha1/{+resource}:testIamPermissions") + 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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.serviceIdentifiers.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.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 *ProjectsLocationsServiceIdentifiersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, 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 := &TestIamPermissionsResponse{ + 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": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceIdentifiers/{serviceIdentifiersId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "networkconnectivity.projects.locations.serviceIdentifiers.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceIdentifiers/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "networkconnectivity.projects.locations.serviceInstances.getIamPolicy": type ProjectsLocationsServiceInstancesGetIamPolicyCall struct { @@ -5017,7 +5506,7 @@ type ProjectsLocationsSpokesCreateCall struct { header_ http.Header } -// Create: Creates a new Spoke in a given project and location. +// Create: Creates a Network Connectivity Center spoke. // // - parent: The parent's resource name of the Spoke. func (r *ProjectsLocationsSpokesService) Create(parent string, spoke *Spoke) *ProjectsLocationsSpokesCreateCall { @@ -5143,7 +5632,7 @@ func (c *ProjectsLocationsSpokesCreateCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Creates a new Spoke in a given project and location.", + // "description": "Creates a Network Connectivity Center spoke.", // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/spokes", // "httpMethod": "POST", // "id": "networkconnectivity.projects.locations.spokes.create", @@ -5193,7 +5682,7 @@ type ProjectsLocationsSpokesDeleteCall struct { header_ http.Header } -// Delete: Deletes a single Spoke. +// Delete: Deletes a Network Connectivity Center spoke. // // - name: The name of the Spoke to delete. func (r *ProjectsLocationsSpokesService) Delete(name string) *ProjectsLocationsSpokesDeleteCall { @@ -5306,7 +5795,7 @@ func (c *ProjectsLocationsSpokesDeleteCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Deletes a single Spoke.", + // "description": "Deletes a Network Connectivity Center spoke.", // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}", // "httpMethod": "DELETE", // "id": "networkconnectivity.projects.locations.spokes.delete", @@ -5349,7 +5838,7 @@ type ProjectsLocationsSpokesGetCall struct { header_ http.Header } -// Get: Gets details of a single Spoke. +// Get: Gets details about a Network Connectivity Center spoke. // // - name: The name of Spoke resource. func (r *ProjectsLocationsSpokesService) Get(name string) *ProjectsLocationsSpokesGetCall { @@ -5457,7 +5946,7 @@ func (c *ProjectsLocationsSpokesGetCall) Do(opts ...googleapi.CallOption) (*Spok } return ret, nil // { - // "description": "Gets details of a single Spoke.", + // "description": "Gets details about a Network Connectivity Center spoke.", // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}", // "httpMethod": "GET", // "id": "networkconnectivity.projects.locations.spokes.get", @@ -5670,7 +6159,8 @@ type ProjectsLocationsSpokesListCall struct { header_ http.Header } -// List: Lists Spokes in a given project and location. +// List: Lists the Network Connectivity Center spokes in a specified +// project and location. // // - parent: The parent's resource name. func (r *ProjectsLocationsSpokesService) List(parent string) *ProjectsLocationsSpokesListCall { @@ -5805,7 +6295,7 @@ func (c *ProjectsLocationsSpokesListCall) Do(opts ...googleapi.CallOption) (*Lis } return ret, nil // { - // "description": "Lists Spokes in a given project and location.", + // "description": "Lists the Network Connectivity Center spokes in a specified project and location.", // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/spokes", // "httpMethod": "GET", // "id": "networkconnectivity.projects.locations.spokes.list", @@ -5885,7 +6375,7 @@ type ProjectsLocationsSpokesPatchCall struct { header_ http.Header } -// Patch: Updates the parameters of a single Spoke. +// Patch: Updates the parameters of a Network Connectivity Center spoke. // // - name: Immutable. The name of a Spoke resource. func (r *ProjectsLocationsSpokesService) Patch(name string, spoke *Spoke) *ProjectsLocationsSpokesPatchCall { @@ -6015,7 +6505,7 @@ func (c *ProjectsLocationsSpokesPatchCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Updates the parameters of a single Spoke.", + // "description": "Updates the parameters of a Network Connectivity Center spoke.", // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}", // "httpMethod": "PATCH", // "id": "networkconnectivity.projects.locations.spokes.patch", diff --git a/retail/v2/retail-api.json b/retail/v2/retail-api.json index b12588abd8f..50c68ec94a4 100644 --- a/retail/v2/retail-api.json +++ b/retail/v2/retail-api.json @@ -781,7 +781,7 @@ ], "parameters": { "placement": { - "description": "Required. Full resource name of the format: {placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} or {placement=projects/*/locations/global/catalogs/default_catalog/placements/*}. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", + "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", "required": true, @@ -841,7 +841,7 @@ ], "parameters": { "placement": { - "description": "Required. Full resource name of the format: {placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} or {placement=projects/*/locations/global/catalogs/default_catalog/placements/*}. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", + "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -1193,7 +1193,7 @@ } } }, - "revision": "20220707", + "revision": "20220716", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -1550,7 +1550,7 @@ "additionalProperties": { "$ref": "GoogleCloudRetailV2CustomAttribute" }, - "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. This is an experimental feature. Contact Retail Search support team if you are interested in enabling it.", + "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. It requires UserEvent.product_details is imported properly.", "type": "object" }, "suggestion": { @@ -1978,7 +1978,7 @@ "id": "GoogleCloudRetailV2PredictRequest", "properties": { "filter": { - "description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: \"Recently viewed\" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, the API will return generic (unfiltered) popular products. If you only want results strictly matching the filters, set `strictFiltering` to True in `PredictRequest.params` to receive empty results instead. Note that the API will never return items with storageStatus of \"EXPIRED\" or \"DELETED\" regardless of filter choices. If `filterSyntaxV2` is set to true under the `params` field, then attribute based expressions are expected instead of the above described tag-based syntax. Examples: * (colors: ANY(\"Red\", \"Blue\")) AND NOT (categories: ANY(\"Phones\")) * (availability: ANY(\"IN_STOCK\")) AND (colors: ANY(\"Red\") OR categories: ANY(\"Phones\"))", + "description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: \"Recently viewed\" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, the API will return generic (unfiltered) popular products. If you only want results strictly matching the filters, set `strictFiltering` to True in `PredictRequest.params` to receive empty results instead. Note that the API will never return items with storageStatus of \"EXPIRED\" or \"DELETED\" regardless of filter choices. If `filterSyntaxV2` is set to true under the `params` field, then attribute-based expressions are expected instead of the above described tag-based syntax. Examples: * (colors: ANY(\"Red\", \"Blue\")) AND NOT (categories: ANY(\"Phones\")) * (availability: ANY(\"IN_STOCK\")) AND (colors: ANY(\"Red\") OR categories: ANY(\"Phones\"))", "type": "string" }, "labels": { @@ -1994,14 +1994,14 @@ "type": "integer" }, "pageToken": { - "description": "This field is not used for now, please leave it unset.", + "description": "This field is not used for now, leave it unset.", "type": "string" }, "params": { "additionalProperties": { "type": "any" }, - "description": "Additional domain specific parameters for the predictions. Allowed values: * `returnProduct`: Boolean. If set to true, the associated product object will be returned in the `results.metadata` field in the prediction response. * `returnScore`: Boolean. If set to true, the prediction 'score' corresponding to each returned product will be set in the `results.metadata` field in the prediction response. The given 'score' indicates the probability of an product being clicked/purchased given the user's context and history. * `strictFiltering`: Boolean. True by default. If set to false, the service will return generic (unfiltered) popular products instead of empty if your filter blocks all prediction results. * `priceRerankLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-price-reranking', 'low-price-reranking', 'medium-price-reranking', 'high-price-reranking'}. This gives request-level control and adjusts prediction results based on product price. * `diversityLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-diversity', 'low-diversity', 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives request-level control and adjusts prediction results based on product category. * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` field will be interpreteted according to the new, attribute-based syntax.", + "description": "Additional domain specific parameters for the predictions. Allowed values: * `returnProduct`: Boolean. If set to true, the associated product object will be returned in the `results.metadata` field in the prediction response. * `returnScore`: Boolean. If set to true, the prediction 'score' corresponding to each returned product will be set in the `results.metadata` field in the prediction response. The given 'score' indicates the probability of an product being clicked/purchased given the user's context and history. * `strictFiltering`: Boolean. True by default. If set to false, the service will return generic (unfiltered) popular products instead of empty if your filter blocks all prediction results. * `priceRerankLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-price-reranking', 'low-price-reranking', 'medium-price-reranking', 'high-price-reranking'}. This gives request-level control and adjusts prediction results based on product price. * `diversityLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-diversity', 'low-diversity', 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives request-level control and adjusts prediction results based on product category. * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` field is interpreteted according to the new, attribute-based syntax.", "type": "object" }, "userEvent": { @@ -2932,7 +2932,7 @@ "type": "string" }, "correctedQuery": { - "description": "Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on corrected_query. Otherwise the original query will be used for search.", + "description": "Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on corrected_query. Otherwise the original query is used for search.", "type": "string" }, "facets": { @@ -3323,6 +3323,17 @@ "properties": {}, "type": "object" }, + "GoogleCloudRetailV2alphaCreateModelMetadata": { + "description": "Metadata associated with a create operation.", + "id": "GoogleCloudRetailV2alphaCreateModelMetadata", + "properties": { + "model": { + "description": "The resource name of the model that this create applies to. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaExportErrorsConfig": { "description": "Configuration of destination for Export related errors.", "id": "GoogleCloudRetailV2alphaExportErrorsConfig", @@ -3487,6 +3498,201 @@ }, "type": "object" }, + "GoogleCloudRetailV2alphaModel": { + "description": "Metadata that describes the training and serving parameters of a Model. A Model can be associated with a ServingConfig and then queried through the Predict api.", + "id": "GoogleCloudRetailV2alphaModel", + "properties": { + "createTime": { + "description": "Output only. Timestamp the Recommendation Model was created at.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "dataState": { + "description": "Output only. The state of data requirements for this model: DATA_OK and DATA_ERROR. Recommendation model cannot be trained if the data is in DATA_ERROR state. Recommendation model can have DATA_ERROR state even if serving state is ACTIVE: models were trained successfully before, but cannot be refreshed because model no longer has sufficient data for training.", + "enum": [ + "DATA_STATE_UNSPECIFIED", + "DATA_OK", + "DATA_ERROR" + ], + "enumDescriptions": [ + "Unspecified default value - should never be explicitly set.", + "The model has sufficient training data.", + "The model does not have sufficient training data. Error messages can be queried via Stackdriver." + ], + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Required. The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Pantheon Dashboard. UTF-8 encoded string with limit of 1024 characters.", + "type": "string" + }, + "filteringOption": { + "description": "Optional. If RECOMMENDATIONS_FILTERING_ENABLED, recommendation filtering by attributes is enabled for the model.", + "enum": [ + "RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED", + "RECOMMENDATIONS_FILTERING_DISABLED", + "RECOMMENDATIONS_FILTERING_ENABLED" + ], + "enumDescriptions": [ + "Value used when unset. Defaults to RECOMMENDATIONS_FILTERING_DISABLED.", + "Recommendation filtering is disabled.", + "Recommendation filtering is enabled." + ], + "type": "string" + }, + "lastTuneTime": { + "description": "Output only. The timestamp when the latest successful tune finished.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Required. The fully qualified resource name of the model. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id} catalog_id has char limit of 50. recommendation_model_id has char limit of 40.", + "type": "string" + }, + "optimizationObjective": { + "description": "Optional. The optimization objective e.g. `cvr`. Currently supported values: `ctr`, `cvr`, `revenue-per-order`. If not specified, we choose default based on model type. Default depends on type of recommendation: `recommended-for-you` =\u003e `ctr` `others-you-may-like` =\u003e `ctr` `frequently-bought-together` =\u003e `revenue_per_order`", + "type": "string" + }, + "pageOptimizationConfig": { + "$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfig", + "description": "Optional. The page optimization config." + }, + "periodicTuningState": { + "description": "Optional. The state of periodic tuning. The period we use is 3 months - to do a one-off tune earlier use the TuneModel method. Default value is PERIODIC_TUNING_ENABLED.", + "enum": [ + "PERIODIC_TUNING_STATE_UNSPECIFIED", + "PERIODIC_TUNING_DISABLED", + "ALL_TUNING_DISABLED", + "PERIODIC_TUNING_ENABLED" + ], + "enumDescriptions": [ + "Unspecified default value - should never be explicitly set.", + "The model has periodic tuning disabled. Tuning can be reenabled by calling the EnableModelPeriodicTuning method or by calling the TuneModel method.", + "The model cannot be tuned with periodic tuning OR the TuneModel method. Hide the options in customer UI and reject any requests through the backend self serve API.", + "The model has periodic tuning enabled. Tuning can be disabled by calling the DisableModelPeriodicTuning method." + ], + "type": "string" + }, + "servingState": { + "description": "Output only. The serving state of the model: ACTIVE, NOT_ACTIVE.", + "enum": [ + "SERVING_STATE_UNSPECIFIED", + "INACTIVE", + "ACTIVE", + "TUNED" + ], + "enumDescriptions": [ + "Unspecified serving state.", + "The model is not serving.", + "The model is serving and can be queried.", + "The model is trained on tuned hyperparameters, and can be queried." + ], + "readOnly": true, + "type": "string" + }, + "trainingState": { + "description": "Optional. The training state that the model is in (e.g. TRAINING or PAUSED). Since part of the cost of running the service is frequency of training - this can be used to determine when to train model in order to control cost. If not specified: the default value for CreateModel method is TRAINING. the default value for UpdateModel method is to keep the state the same as before.", + "enum": [ + "TRAINING_STATE_UNSPECIFIED", + "PAUSED", + "TRAINING" + ], + "enumDescriptions": [ + "Unspecified training state.", + "The model training is paused.", + "The model is training." + ], + "type": "string" + }, + "tuningOperation": { + "description": "Output only. The tune operation associated with the model. Can be used to determine if there is an ongoing tune for this recommendation. Empty field implies no tune is goig on.", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Required. The type of model e.g. `home-page`. Currently supported values: `recommended-for-you`, `others-you-may-like`, `frequently-bought-together`, `page-optimization`, 'similar-items', 'buy-it-again', `recently-viewed`(readonly value).", + "type": "string" + }, + "updateTime": { + "description": "Output only. Timestamp the Recommendation Model was last updated. E.g. if a Recommendation Model was paused - this would be the time the pause was initiated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaModelPageOptimizationConfig": { + "description": "The PageOptimizationConfig for model training. This determines how many panels to optimize for, and which serving configurations to consider for each panel. The purpose of this model is to optimize which ServingConfig to show on which panels in way that optimizes the visitors shopping journey.", + "id": "GoogleCloudRetailV2alphaModelPageOptimizationConfig", + "properties": { + "pageOptimizationEventType": { + "description": "Required. The type of UserEvent this page optimization is shown for. Each page has an associated event type - this will be the corresponding event type for the page that the page optimization model is used on. Supported types: * `add-to-cart`: Products being added to cart. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed * `category-page-view`: Homepage viewed * `shopping-cart-page-view`: User viewing a shopping cart. `home-page-view` only allows models with type `recommended-for-you`. All other page_optimization_event_type allow all Model.types.", + "type": "string" + }, + "panels": { + "description": "Required. A list of panel configurations. Limit = 5.", + "items": { + "$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel" + }, + "type": "array" + }, + "restriction": { + "description": "Optional. How to restrict results across panels e.g. can the same ServingConfig be shown on multiple panels at once. If unspecified, default to `UNIQUE_MODEL_RESTRICTION`.", + "enum": [ + "RESTRICTION_UNSPECIFIED", + "NO_RESTRICTION", + "UNIQUE_SERVING_CONFIG_RESTRICTION", + "UNIQUE_MODEL_RESTRICTION", + "UNIQUE_MODEL_TYPE_RESTRICTION" + ], + "enumDescriptions": [ + "Unspecified value for restriction.", + "Allow any ServingConfig to be show on any number of panels. Example: `Panel1 candidates`: pdp_ctr, pdp_cvr, home_page_ctr_no_diversity `Panel2 candidates`: home_page_ctr_no_diversity, home_page_ctr_diversity, pdp_cvr_no_diversity `Restriction` = NO_RESTRICTION `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity) * (pdp_cvr, pdp_cvr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_diversity) * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid combinations`: []", + "Do not allow the same ServingConfig.name to be shown on multiple panels. Example: `Panel1 candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * `Panel2 candidates`: * home_page_ctr_no_diversity, home_page_ctr_diversity_low, pdp_cvr_no_diversity * `Restriction` = UNIQUE_SERVING_CONFIG_RESTRICTION `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity_low) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity_low) * (pdp_cvr, pdp_cvr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_diversity_low) * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid combinations`: * * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) *", + "Do not allow multiple ServingConfigs with same Model.name to be show on on different panels. Example: `Panel1 candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * `Panel2 candidates`: * home_page_ctr_no_diversity, home_page_ctr_diversity_low, pdp_cvr_no_diversity * `Restriction` = UNIQUE_MODEL_RESTRICTION `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity_low) * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid combinations`: * * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * (pdp_cvr, pdp_cvr_no_diversity) *", + "Do not allow multiple ServingConfigs with same Model.type to be shown on different panels. Example: `Panel1 candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * `Panel2 candidates`: * home_page_ctr_no_diversity, home_page_ctr_diversity_low, pdp_cvr_no_diversity * `Restriction` = UNIQUE_MODEL_RESTRICTION `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity_low) * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid combinations`: * * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr, pdp_cvr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_diversity) *" + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate": { + "description": "A candidate to consider for a given panel. Currently only ServingConfig are valid candidates.", + "id": "GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate", + "properties": { + "servingConfigId": { + "description": "This has to be a valid ServingConfig identifier. e.g. for a ServingConfig with full name: `projects/*/locations/global/catalogs/default_catalog/servingConfigs/my_candidate_config` this would be 'my_candidate_config'", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel": { + "description": "An individual panel with a list of ServingConfigs to consider for it.", + "id": "GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel", + "properties": { + "candidates": { + "description": "Required. The candidates to consider on the panel. Limit = 10.", + "items": { + "$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate" + }, + "type": "array" + }, + "defaultCandidate": { + "$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate", + "description": "Required. The default candidate (in case the model fails at serving time, we can fall back to the default)." + }, + "displayName": { + "description": "Optional. The name to display for the panel.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaPurgeMetadata": { "description": "Metadata related to the progress of the Purge operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudRetailV2alphaPurgeMetadata", @@ -3605,6 +3811,23 @@ "properties": {}, "type": "object" }, + "GoogleCloudRetailV2alphaTuneModelMetadata": { + "description": "Metadata associated with a tune operation.", + "id": "GoogleCloudRetailV2alphaTuneModelMetadata", + "properties": { + "model": { + "description": "The resource name of the model that this tune applies to. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaTuneModelResponse": { + "description": "Response associated with a tune operation.", + "id": "GoogleCloudRetailV2alphaTuneModelResponse", + "properties": {}, + "type": "object" + }, "GoogleCloudRetailV2alphaUserEventImportSummary": { "description": "A summary of import result. The UserEventImportSummary summarizes the import status for user events.", "id": "GoogleCloudRetailV2alphaUserEventImportSummary", diff --git a/retail/v2/retail-gen.go b/retail/v2/retail-gen.go index 0771be5ec8d..bead4628696 100644 --- a/retail/v2/retail-gen.go +++ b/retail/v2/retail-gen.go @@ -988,9 +988,8 @@ type GoogleCloudRetailV2CompleteQueryResponseCompletionResult struct { // 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. This is an experimental - // feature. Contact Retail Search support team if you are interested in - // enabling it. + // attributes generated by Cloud Retail. It requires + // UserEvent.product_details is imported properly. Attributes map[string]GoogleCloudRetailV2CustomAttribute `json:"attributes,omitempty"` // Suggestion: The suggestion for the query. @@ -1909,7 +1908,7 @@ type GoogleCloudRetailV2PredictRequest struct { // results instead. Note that the API will never return items with // storageStatus of "EXPIRED" or "DELETED" regardless of filter choices. // If `filterSyntaxV2` is set to true under the `params` field, then - // attribute based expressions are expected instead of the above + // attribute-based expressions are expected instead of the above // described tag-based syntax. Examples: * (colors: ANY("Red", "Blue")) // AND NOT (categories: ANY("Phones")) * (availability: ANY("IN_STOCK")) // AND (colors: ANY("Red") OR categories: ANY("Phones")) @@ -1936,7 +1935,7 @@ type GoogleCloudRetailV2PredictRequest struct { // is 100. Values above 100 will be coerced to 100. PageSize int64 `json:"pageSize,omitempty"` - // PageToken: This field is not used for now, please leave it unset. + // PageToken: This field is not used for now, leave it unset. PageToken string `json:"pageToken,omitempty"` // Params: Additional domain specific parameters for the predictions. @@ -1960,8 +1959,8 @@ type GoogleCloudRetailV2PredictRequest struct { // 'high-diversity', 'auto-diversity'}. This gives request-level control // and adjusts prediction results based on product category. * // `filterSyntaxV2`: Boolean. False by default. If set to true, the - // `filter` field will be interpreteted according to the new, - // attribute-based syntax. + // `filter` field is interpreteted according to the new, attribute-based + // syntax. Params googleapi.RawMessage `json:"params,omitempty"` // UserEvent: Required. Context about the user, what they are looking at @@ -3835,8 +3834,7 @@ type GoogleCloudRetailV2SearchResponse struct { // CorrectedQuery: Contains the spell corrected query, if found. If the // spell correction type is AUTOMATIC, then the search results are based - // on corrected_query. Otherwise the original query will be used for - // search. + // on corrected_query. Otherwise the original query is used for search. CorrectedQuery string `json:"correctedQuery,omitempty"` // Facets: Results of facets requested by user. @@ -4601,6 +4599,38 @@ type GoogleCloudRetailV2alphaAddLocalInventoriesMetadata struct { type GoogleCloudRetailV2alphaAddLocalInventoriesResponse struct { } +// GoogleCloudRetailV2alphaCreateModelMetadata: Metadata associated with +// a create operation. +type GoogleCloudRetailV2alphaCreateModelMetadata struct { + // Model: The resource name of the model that this create applies to. + // Format: + // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id + // }/models/{model_id} + Model string `json:"model,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Model") 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. "Model") 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 *GoogleCloudRetailV2alphaCreateModelMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaCreateModelMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaExportErrorsConfig: Configuration of // destination for Export related errors. type GoogleCloudRetailV2alphaExportErrorsConfig struct { @@ -4932,6 +4962,330 @@ func (s *GoogleCloudRetailV2alphaImportUserEventsResponse) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2alphaModel: Metadata that describes the training +// and serving parameters of a Model. A Model can be associated with a +// ServingConfig and then queried through the Predict api. +type GoogleCloudRetailV2alphaModel struct { + // CreateTime: Output only. Timestamp the Recommendation Model was + // created at. + CreateTime string `json:"createTime,omitempty"` + + // DataState: Output only. The state of data requirements for this + // model: DATA_OK and DATA_ERROR. Recommendation model cannot be trained + // if the data is in DATA_ERROR state. Recommendation model can have + // DATA_ERROR state even if serving state is ACTIVE: models were trained + // successfully before, but cannot be refreshed because model no longer + // has sufficient data for training. + // + // Possible values: + // "DATA_STATE_UNSPECIFIED" - Unspecified default value - should never + // be explicitly set. + // "DATA_OK" - The model has sufficient training data. + // "DATA_ERROR" - The model does not have sufficient training data. + // Error messages can be queried via Stackdriver. + DataState string `json:"dataState,omitempty"` + + // DisplayName: Required. The display name of the model. Should be human + // readable, used to display Recommendation Models in the Retail + // Pantheon Dashboard. UTF-8 encoded string with limit of 1024 + // characters. + DisplayName string `json:"displayName,omitempty"` + + // FilteringOption: Optional. If RECOMMENDATIONS_FILTERING_ENABLED, + // recommendation filtering by attributes is enabled for the model. + // + // Possible values: + // "RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED" - Value used when + // unset. Defaults to RECOMMENDATIONS_FILTERING_DISABLED. + // "RECOMMENDATIONS_FILTERING_DISABLED" - Recommendation filtering is + // disabled. + // "RECOMMENDATIONS_FILTERING_ENABLED" - Recommendation filtering is + // enabled. + FilteringOption string `json:"filteringOption,omitempty"` + + // LastTuneTime: Output only. The timestamp when the latest successful + // tune finished. + LastTuneTime string `json:"lastTuneTime,omitempty"` + + // Name: Required. The fully qualified resource name of the model. + // Format: + // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id + // }/models/{model_id} catalog_id has char limit of 50. + // recommendation_model_id has char limit of 40. + Name string `json:"name,omitempty"` + + // OptimizationObjective: Optional. The optimization objective e.g. + // `cvr`. Currently supported values: `ctr`, `cvr`, `revenue-per-order`. + // If not specified, we choose default based on model type. Default + // depends on type of recommendation: `recommended-for-you` => `ctr` + // `others-you-may-like` => `ctr` `frequently-bought-together` => + // `revenue_per_order` + OptimizationObjective string `json:"optimizationObjective,omitempty"` + + // PageOptimizationConfig: Optional. The page optimization config. + PageOptimizationConfig *GoogleCloudRetailV2alphaModelPageOptimizationConfig `json:"pageOptimizationConfig,omitempty"` + + // PeriodicTuningState: Optional. The state of periodic tuning. The + // period we use is 3 months - to do a one-off tune earlier use the + // TuneModel method. Default value is PERIODIC_TUNING_ENABLED. + // + // Possible values: + // "PERIODIC_TUNING_STATE_UNSPECIFIED" - Unspecified default value - + // should never be explicitly set. + // "PERIODIC_TUNING_DISABLED" - The model has periodic tuning + // disabled. Tuning can be reenabled by calling the + // EnableModelPeriodicTuning method or by calling the TuneModel method. + // "ALL_TUNING_DISABLED" - The model cannot be tuned with periodic + // tuning OR the TuneModel method. Hide the options in customer UI and + // reject any requests through the backend self serve API. + // "PERIODIC_TUNING_ENABLED" - The model has periodic tuning enabled. + // Tuning can be disabled by calling the DisableModelPeriodicTuning + // method. + PeriodicTuningState string `json:"periodicTuningState,omitempty"` + + // ServingState: Output only. The serving state of the model: ACTIVE, + // NOT_ACTIVE. + // + // Possible values: + // "SERVING_STATE_UNSPECIFIED" - Unspecified serving state. + // "INACTIVE" - The model is not serving. + // "ACTIVE" - The model is serving and can be queried. + // "TUNED" - The model is trained on tuned hyperparameters, and can be + // queried. + ServingState string `json:"servingState,omitempty"` + + // TrainingState: Optional. The training state that the model is in + // (e.g. TRAINING or PAUSED). Since part of the cost of running the + // service is frequency of training - this can be used to determine when + // to train model in order to control cost. If not specified: the + // default value for CreateModel method is TRAINING. the default value + // for UpdateModel method is to keep the state the same as before. + // + // Possible values: + // "TRAINING_STATE_UNSPECIFIED" - Unspecified training state. + // "PAUSED" - The model training is paused. + // "TRAINING" - The model is training. + TrainingState string `json:"trainingState,omitempty"` + + // TuningOperation: Output only. The tune operation associated with the + // model. Can be used to determine if there is an ongoing tune for this + // recommendation. Empty field implies no tune is goig on. + TuningOperation string `json:"tuningOperation,omitempty"` + + // Type: Required. The type of model e.g. `home-page`. Currently + // supported values: `recommended-for-you`, `others-you-may-like`, + // `frequently-bought-together`, `page-optimization`, 'similar-items', + // 'buy-it-again', `recently-viewed`(readonly value). + Type string `json:"type,omitempty"` + + // UpdateTime: Output only. Timestamp the Recommendation Model was last + // updated. E.g. if a Recommendation Model was paused - this would be + // the time the pause was initiated. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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 *GoogleCloudRetailV2alphaModel) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaModel + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaModelPageOptimizationConfig: The +// PageOptimizationConfig for model training. This determines how many +// panels to optimize for, and which serving configurations to consider +// for each panel. The purpose of this model is to optimize which +// ServingConfig to show on which panels in way that optimizes the +// visitors shopping journey. +type GoogleCloudRetailV2alphaModelPageOptimizationConfig struct { + // PageOptimizationEventType: Required. The type of UserEvent this page + // optimization is shown for. Each page has an associated event type - + // this will be the corresponding event type for the page that the page + // optimization model is used on. Supported types: * `add-to-cart`: + // Products being added to cart. * `detail-page-view`: Products detail + // page viewed. * `home-page-view`: Homepage viewed * + // `category-page-view`: Homepage viewed * `shopping-cart-page-view`: + // User viewing a shopping cart. `home-page-view` only allows models + // with type `recommended-for-you`. All other + // page_optimization_event_type allow all Model.types. + PageOptimizationEventType string `json:"pageOptimizationEventType,omitempty"` + + // Panels: Required. A list of panel configurations. Limit = 5. + Panels []*GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel `json:"panels,omitempty"` + + // Restriction: Optional. How to restrict results across panels e.g. can + // the same ServingConfig be shown on multiple panels at once. If + // unspecified, default to `UNIQUE_MODEL_RESTRICTION`. + // + // Possible values: + // "RESTRICTION_UNSPECIFIED" - Unspecified value for restriction. + // "NO_RESTRICTION" - Allow any ServingConfig to be show on any number + // of panels. Example: `Panel1 candidates`: pdp_ctr, pdp_cvr, + // home_page_ctr_no_diversity `Panel2 candidates`: + // home_page_ctr_no_diversity, home_page_ctr_diversity, + // pdp_cvr_no_diversity `Restriction` = NO_RESTRICTION `Valid + // combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, + // home_page_ctr_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * + // (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, + // home_page_ctr_diversity) * (pdp_cvr, pdp_cvr_no_diversity) * + // (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * + // (home_page_ctr_no_diversity, home_page_ctr_diversity) * + // (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid + // combinations`: [] + // "UNIQUE_SERVING_CONFIG_RESTRICTION" - Do not allow the same + // ServingConfig.name to be shown on multiple panels. Example: `Panel1 + // candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * `Panel2 + // candidates`: * home_page_ctr_no_diversity, + // home_page_ctr_diversity_low, pdp_cvr_no_diversity * `Restriction` = + // UNIQUE_SERVING_CONFIG_RESTRICTION `Valid combinations`: * * (pdp_ctr, + // home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity_low) + // * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * + // (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, + // home_page_ctr_diversity_low) * (pdp_cvr, pdp_cvr_no_diversity) * + // (home_page_ctr_no_diversity, home_page_ctr_diversity_low) * + // (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid + // combinations`: * * (home_page_ctr_no_diversity, + // home_page_ctr_no_diversity) * + // "UNIQUE_MODEL_RESTRICTION" - Do not allow multiple ServingConfigs + // with same Model.name to be show on on different panels. Example: + // `Panel1 candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * + // `Panel2 candidates`: * home_page_ctr_no_diversity, + // home_page_ctr_diversity_low, pdp_cvr_no_diversity * `Restriction` = + // UNIQUE_MODEL_RESTRICTION `Valid combinations`: * * (pdp_ctr, + // home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity) * + // (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * + // (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, + // home_page_ctr_diversity_low) * (home_page_ctr_no_diversity, + // pdp_cvr_no_diversity) * `Invalid combinations`: * * + // (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * (pdp_cvr, + // pdp_cvr_no_diversity) * + // "UNIQUE_MODEL_TYPE_RESTRICTION" - Do not allow multiple + // ServingConfigs with same Model.type to be shown on different panels. + // Example: `Panel1 candidates`: * pdp_ctr, pdp_cvr, + // home_page_ctr_no_diversity * `Panel2 candidates`: * + // home_page_ctr_no_diversity, home_page_ctr_diversity_low, + // pdp_cvr_no_diversity * `Restriction` = UNIQUE_MODEL_RESTRICTION + // `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * + // (pdp_ctr, home_page_ctr_diversity) * (pdp_cvr, + // home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity_low) + // * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid + // combinations`: * * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, + // pdp_cvr_no_diversity) * (pdp_cvr, pdp_cvr_no_diversity) * + // (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * + // (home_page_ctr_no_diversity, home_page_ctr_diversity) * + Restriction string `json:"restriction,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "PageOptimizationEventType") 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. + // "PageOptimizationEventType") 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 *GoogleCloudRetailV2alphaModelPageOptimizationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaModelPageOptimizationConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate: A +// candidate to consider for a given panel. Currently only ServingConfig +// are valid candidates. +type GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate struct { + // ServingConfigId: This has to be a valid ServingConfig identifier. + // e.g. for a ServingConfig with full name: + // `projects/*/locations/global/catalogs/default_catalog/servingConfigs/m + // y_candidate_config` this would be 'my_candidate_config' + ServingConfigId string `json:"servingConfigId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ServingConfigId") 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. "ServingConfigId") 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 *GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel: An +// individual panel with a list of ServingConfigs to consider for it. +type GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel struct { + // Candidates: Required. The candidates to consider on the panel. Limit + // = 10. + Candidates []*GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate `json:"candidates,omitempty"` + + // DefaultCandidate: Required. The default candidate (in case the model + // fails at serving time, we can fall back to the default). + DefaultCandidate *GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate `json:"defaultCandidate,omitempty"` + + // DisplayName: Optional. The name to display for the panel. + DisplayName string `json:"displayName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Candidates") 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. "Candidates") 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 *GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaPurgeMetadata: Metadata related to the // progress of the Purge operation. This will be returned by the // google.longrunning.Operation.metadata field. @@ -5127,6 +5481,43 @@ type GoogleCloudRetailV2alphaSetInventoryMetadata struct { type GoogleCloudRetailV2alphaSetInventoryResponse struct { } +// GoogleCloudRetailV2alphaTuneModelMetadata: Metadata associated with a +// tune operation. +type GoogleCloudRetailV2alphaTuneModelMetadata struct { + // Model: The resource name of the model that this tune applies to. + // Format: + // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id + // }/models/{model_id} + Model string `json:"model,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Model") 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. "Model") 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 *GoogleCloudRetailV2alphaTuneModelMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaTuneModelMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaTuneModelResponse: Response associated with a +// tune operation. +type GoogleCloudRetailV2alphaTuneModelResponse struct { +} + // GoogleCloudRetailV2alphaUserEventImportSummary: A summary of import // result. The UserEventImportSummary summarizes the import status for // user events. @@ -9289,10 +9680,10 @@ type ProjectsLocationsCatalogsPlacementsPredictCall struct { // Predict: Makes a recommendation prediction. // // - placement: Full resource name of the format: -// {placement=projects/*/locations/global/catalogs/default_catalog/serv -// ingConfigs/*} or -// {placement=projects/*/locations/global/catalogs/default_catalog/plac -// ements/*}. We recommend using the `servingConfigs` resource. +// `{placement=projects/*/locations/global/catalogs/default_catalog/ser +// vingConfigs/*}` or +// `{placement=projects/*/locations/global/catalogs/default_catalog/pla +// cements/*}`. We recommend using the `servingConfigs` resource. // `placements` is a legacy resource. The ID of the Recommendations AI // serving config or placement. Before you can request predictions // from your model, you must create at least one serving config or @@ -9409,7 +9800,7 @@ func (c *ProjectsLocationsCatalogsPlacementsPredictCall) Do(opts ...googleapi.Ca // ], // "parameters": { // "placement": { - // "description": "Required. Full resource name of the format: {placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} or {placement=projects/*/locations/global/catalogs/default_catalog/placements/*}. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", + // "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", // "required": true, @@ -9618,10 +10009,10 @@ type ProjectsLocationsCatalogsServingConfigsPredictCall struct { // Predict: Makes a recommendation prediction. // // - placement: Full resource name of the format: -// {placement=projects/*/locations/global/catalogs/default_catalog/serv -// ingConfigs/*} or -// {placement=projects/*/locations/global/catalogs/default_catalog/plac -// ements/*}. We recommend using the `servingConfigs` resource. +// `{placement=projects/*/locations/global/catalogs/default_catalog/ser +// vingConfigs/*}` or +// `{placement=projects/*/locations/global/catalogs/default_catalog/pla +// cements/*}`. We recommend using the `servingConfigs` resource. // `placements` is a legacy resource. The ID of the Recommendations AI // serving config or placement. Before you can request predictions // from your model, you must create at least one serving config or @@ -9738,7 +10129,7 @@ func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) Do(opts ...googleap // ], // "parameters": { // "placement": { - // "description": "Required. Full resource name of the format: {placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} or {placement=projects/*/locations/global/catalogs/default_catalog/placements/*}. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", + // "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", // "required": true, diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index 56a4238210f..8fc946d881a 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -1100,6 +1100,222 @@ } } }, + "models": { + "methods": { + "create": { + "description": "Creates a new model.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.models.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "dryRun": { + "description": "Optional. Whether to run a dry_run to validate the request (without actually creating the model).", + "location": "query", + "type": "boolean" + }, + "parent": { + "description": "Required. The parent resource under which to create the model. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+parent}/models", + "request": { + "$ref": "GoogleCloudRetailV2alphaModel" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes an existing model.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}", + "httpMethod": "DELETE", + "id": "retail.projects.locations.catalogs.models.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the [Model] to delete. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all the models linked to this event store.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models", + "httpMethod": "GET", + "id": "retail.projects.locations.catalogs.models.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListModels` call. Provide this to retrieve the subsequent page.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent for which to list models. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+parent}/models", + "response": { + "$ref": "GoogleCloudRetailV2alphaListModelsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Update of model metadata. Only fields that currently can be updated are: filtering_option, periodic_tuning_state. If other values are provided, this API method will ignore them.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}", + "httpMethod": "PATCH", + "id": "retail.projects.locations.catalogs.models.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The fully qualified resource name of the model. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id} catalog_id has char limit of 50. recommendation_model_id has char limit of 40.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Indicates which fields in the provided 'model' to update. If not set, will by default update all fields.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "request": { + "$ref": "GoogleCloudRetailV2alphaModel" + }, + "response": { + "$ref": "GoogleCloudRetailV2alphaModel" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "pause": { + "description": "Pauses the training of an existing model.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}:pause", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.models.pause", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the model to pause. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+name}:pause", + "request": { + "$ref": "GoogleCloudRetailV2alphaPauseModelRequest" + }, + "response": { + "$ref": "GoogleCloudRetailV2alphaModel" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "resume": { + "description": "Resumes the training of an existing model.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}:resume", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.models.resume", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the model to resume. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+name}:resume", + "request": { + "$ref": "GoogleCloudRetailV2alphaResumeModelRequest" + }, + "response": { + "$ref": "GoogleCloudRetailV2alphaModel" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "tune": { + "description": "Tunes an existing model.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}:tune", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.models.tune", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the model to tune. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+name}:tune", + "request": { + "$ref": "GoogleCloudRetailV2alphaTuneModelRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "operations": { "methods": { "get": { @@ -1182,7 +1398,7 @@ ], "parameters": { "placement": { - "description": "Required. Full resource name of the format: {placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} or {placement=projects/*/locations/global/catalogs/default_catalog/placements/*}. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", + "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", "required": true, @@ -1423,7 +1639,7 @@ ], "parameters": { "placement": { - "description": "Required. Full resource name of the format: {placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} or {placement=projects/*/locations/global/catalogs/default_catalog/placements/*}. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", + "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -1803,7 +2019,7 @@ } } }, - "revision": "20220707", + "revision": "20220716", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2519,7 +2735,7 @@ "additionalProperties": { "$ref": "GoogleCloudRetailV2alphaCustomAttribute" }, - "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. This is an experimental feature. Contact Retail Search support team if you are interested in enabling it.", + "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. It requires UserEvent.product_details is imported properly.", "type": "object" }, "suggestion": { @@ -2731,6 +2947,17 @@ }, "type": "object" }, + "GoogleCloudRetailV2alphaCreateModelMetadata": { + "description": "Metadata associated with a create operation.", + "id": "GoogleCloudRetailV2alphaCreateModelMetadata", + "properties": { + "model": { + "description": "The resource name of the model that this create applies to. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaCustomAttribute": { "description": "A custom attribute that is not explicitly modeled in Product.", "id": "GoogleCloudRetailV2alphaCustomAttribute", @@ -3141,6 +3368,24 @@ }, "type": "object" }, + "GoogleCloudRetailV2alphaListModelsResponse": { + "description": "Response to a ListModelRequest.", + "id": "GoogleCloudRetailV2alphaListModelsResponse", + "properties": { + "models": { + "description": "List of Models.", + "items": { + "$ref": "GoogleCloudRetailV2alphaModel" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Pagination token, if not returned indicates the last page.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaListProductsResponse": { "description": "Response message for ProductService.ListProducts method.", "id": "GoogleCloudRetailV2alphaListProductsResponse", @@ -3256,12 +3501,213 @@ }, "type": "object" }, + "GoogleCloudRetailV2alphaModel": { + "description": "Metadata that describes the training and serving parameters of a Model. A Model can be associated with a ServingConfig and then queried through the Predict api.", + "id": "GoogleCloudRetailV2alphaModel", + "properties": { + "createTime": { + "description": "Output only. Timestamp the Recommendation Model was created at.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "dataState": { + "description": "Output only. The state of data requirements for this model: DATA_OK and DATA_ERROR. Recommendation model cannot be trained if the data is in DATA_ERROR state. Recommendation model can have DATA_ERROR state even if serving state is ACTIVE: models were trained successfully before, but cannot be refreshed because model no longer has sufficient data for training.", + "enum": [ + "DATA_STATE_UNSPECIFIED", + "DATA_OK", + "DATA_ERROR" + ], + "enumDescriptions": [ + "Unspecified default value - should never be explicitly set.", + "The model has sufficient training data.", + "The model does not have sufficient training data. Error messages can be queried via Stackdriver." + ], + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Required. The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Pantheon Dashboard. UTF-8 encoded string with limit of 1024 characters.", + "type": "string" + }, + "filteringOption": { + "description": "Optional. If RECOMMENDATIONS_FILTERING_ENABLED, recommendation filtering by attributes is enabled for the model.", + "enum": [ + "RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED", + "RECOMMENDATIONS_FILTERING_DISABLED", + "RECOMMENDATIONS_FILTERING_ENABLED" + ], + "enumDescriptions": [ + "Value used when unset. Defaults to RECOMMENDATIONS_FILTERING_DISABLED.", + "Recommendation filtering is disabled.", + "Recommendation filtering is enabled." + ], + "type": "string" + }, + "lastTuneTime": { + "description": "Output only. The timestamp when the latest successful tune finished.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Required. The fully qualified resource name of the model. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id} catalog_id has char limit of 50. recommendation_model_id has char limit of 40.", + "type": "string" + }, + "optimizationObjective": { + "description": "Optional. The optimization objective e.g. `cvr`. Currently supported values: `ctr`, `cvr`, `revenue-per-order`. If not specified, we choose default based on model type. Default depends on type of recommendation: `recommended-for-you` =\u003e `ctr` `others-you-may-like` =\u003e `ctr` `frequently-bought-together` =\u003e `revenue_per_order`", + "type": "string" + }, + "pageOptimizationConfig": { + "$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfig", + "description": "Optional. The page optimization config." + }, + "periodicTuningState": { + "description": "Optional. The state of periodic tuning. The period we use is 3 months - to do a one-off tune earlier use the TuneModel method. Default value is PERIODIC_TUNING_ENABLED.", + "enum": [ + "PERIODIC_TUNING_STATE_UNSPECIFIED", + "PERIODIC_TUNING_DISABLED", + "ALL_TUNING_DISABLED", + "PERIODIC_TUNING_ENABLED" + ], + "enumDescriptions": [ + "Unspecified default value - should never be explicitly set.", + "The model has periodic tuning disabled. Tuning can be reenabled by calling the EnableModelPeriodicTuning method or by calling the TuneModel method.", + "The model cannot be tuned with periodic tuning OR the TuneModel method. Hide the options in customer UI and reject any requests through the backend self serve API.", + "The model has periodic tuning enabled. Tuning can be disabled by calling the DisableModelPeriodicTuning method." + ], + "type": "string" + }, + "servingState": { + "description": "Output only. The serving state of the model: ACTIVE, NOT_ACTIVE.", + "enum": [ + "SERVING_STATE_UNSPECIFIED", + "INACTIVE", + "ACTIVE", + "TUNED" + ], + "enumDescriptions": [ + "Unspecified serving state.", + "The model is not serving.", + "The model is serving and can be queried.", + "The model is trained on tuned hyperparameters, and can be queried." + ], + "readOnly": true, + "type": "string" + }, + "trainingState": { + "description": "Optional. The training state that the model is in (e.g. TRAINING or PAUSED). Since part of the cost of running the service is frequency of training - this can be used to determine when to train model in order to control cost. If not specified: the default value for CreateModel method is TRAINING. the default value for UpdateModel method is to keep the state the same as before.", + "enum": [ + "TRAINING_STATE_UNSPECIFIED", + "PAUSED", + "TRAINING" + ], + "enumDescriptions": [ + "Unspecified training state.", + "The model training is paused.", + "The model is training." + ], + "type": "string" + }, + "tuningOperation": { + "description": "Output only. The tune operation associated with the model. Can be used to determine if there is an ongoing tune for this recommendation. Empty field implies no tune is goig on.", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Required. The type of model e.g. `home-page`. Currently supported values: `recommended-for-you`, `others-you-may-like`, `frequently-bought-together`, `page-optimization`, 'similar-items', 'buy-it-again', `recently-viewed`(readonly value).", + "type": "string" + }, + "updateTime": { + "description": "Output only. Timestamp the Recommendation Model was last updated. E.g. if a Recommendation Model was paused - this would be the time the pause was initiated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaModelPageOptimizationConfig": { + "description": "The PageOptimizationConfig for model training. This determines how many panels to optimize for, and which serving configurations to consider for each panel. The purpose of this model is to optimize which ServingConfig to show on which panels in way that optimizes the visitors shopping journey.", + "id": "GoogleCloudRetailV2alphaModelPageOptimizationConfig", + "properties": { + "pageOptimizationEventType": { + "description": "Required. The type of UserEvent this page optimization is shown for. Each page has an associated event type - this will be the corresponding event type for the page that the page optimization model is used on. Supported types: * `add-to-cart`: Products being added to cart. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed * `category-page-view`: Homepage viewed * `shopping-cart-page-view`: User viewing a shopping cart. `home-page-view` only allows models with type `recommended-for-you`. All other page_optimization_event_type allow all Model.types.", + "type": "string" + }, + "panels": { + "description": "Required. A list of panel configurations. Limit = 5.", + "items": { + "$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel" + }, + "type": "array" + }, + "restriction": { + "description": "Optional. How to restrict results across panels e.g. can the same ServingConfig be shown on multiple panels at once. If unspecified, default to `UNIQUE_MODEL_RESTRICTION`.", + "enum": [ + "RESTRICTION_UNSPECIFIED", + "NO_RESTRICTION", + "UNIQUE_SERVING_CONFIG_RESTRICTION", + "UNIQUE_MODEL_RESTRICTION", + "UNIQUE_MODEL_TYPE_RESTRICTION" + ], + "enumDescriptions": [ + "Unspecified value for restriction.", + "Allow any ServingConfig to be show on any number of panels. Example: `Panel1 candidates`: pdp_ctr, pdp_cvr, home_page_ctr_no_diversity `Panel2 candidates`: home_page_ctr_no_diversity, home_page_ctr_diversity, pdp_cvr_no_diversity `Restriction` = NO_RESTRICTION `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity) * (pdp_cvr, pdp_cvr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_diversity) * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid combinations`: []", + "Do not allow the same ServingConfig.name to be shown on multiple panels. Example: `Panel1 candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * `Panel2 candidates`: * home_page_ctr_no_diversity, home_page_ctr_diversity_low, pdp_cvr_no_diversity * `Restriction` = UNIQUE_SERVING_CONFIG_RESTRICTION `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity_low) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity_low) * (pdp_cvr, pdp_cvr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_diversity_low) * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid combinations`: * * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) *", + "Do not allow multiple ServingConfigs with same Model.name to be show on on different panels. Example: `Panel1 candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * `Panel2 candidates`: * home_page_ctr_no_diversity, home_page_ctr_diversity_low, pdp_cvr_no_diversity * `Restriction` = UNIQUE_MODEL_RESTRICTION `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity_low) * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid combinations`: * * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * (pdp_cvr, pdp_cvr_no_diversity) *", + "Do not allow multiple ServingConfigs with same Model.type to be shown on different panels. Example: `Panel1 candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * `Panel2 candidates`: * home_page_ctr_no_diversity, home_page_ctr_diversity_low, pdp_cvr_no_diversity * `Restriction` = UNIQUE_MODEL_RESTRICTION `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity_low) * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid combinations`: * * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr, pdp_cvr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_diversity) *" + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate": { + "description": "A candidate to consider for a given panel. Currently only ServingConfig are valid candidates.", + "id": "GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate", + "properties": { + "servingConfigId": { + "description": "This has to be a valid ServingConfig identifier. e.g. for a ServingConfig with full name: `projects/*/locations/global/catalogs/default_catalog/servingConfigs/my_candidate_config` this would be 'my_candidate_config'", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel": { + "description": "An individual panel with a list of ServingConfigs to consider for it.", + "id": "GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel", + "properties": { + "candidates": { + "description": "Required. The candidates to consider on the panel. Limit = 10.", + "items": { + "$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate" + }, + "type": "array" + }, + "defaultCandidate": { + "$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate", + "description": "Required. The default candidate (in case the model fails at serving time, we can fall back to the default)." + }, + "displayName": { + "description": "Optional. The name to display for the panel.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaPauseModelRequest": { + "description": "Request for pausing training of a model.", + "id": "GoogleCloudRetailV2alphaPauseModelRequest", + "properties": {}, + "type": "object" + }, "GoogleCloudRetailV2alphaPredictRequest": { "description": "Request message for Predict method.", "id": "GoogleCloudRetailV2alphaPredictRequest", "properties": { "filter": { - "description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: \"Recently viewed\" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, the API will return generic (unfiltered) popular products. If you only want results strictly matching the filters, set `strictFiltering` to True in `PredictRequest.params` to receive empty results instead. Note that the API will never return items with storageStatus of \"EXPIRED\" or \"DELETED\" regardless of filter choices. If `filterSyntaxV2` is set to true under the `params` field, then attribute based expressions are expected instead of the above described tag-based syntax. Examples: * (colors: ANY(\"Red\", \"Blue\")) AND NOT (categories: ANY(\"Phones\")) * (availability: ANY(\"IN_STOCK\")) AND (colors: ANY(\"Red\") OR categories: ANY(\"Phones\"))", + "description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: \"Recently viewed\" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, the API will return generic (unfiltered) popular products. If you only want results strictly matching the filters, set `strictFiltering` to True in `PredictRequest.params` to receive empty results instead. Note that the API will never return items with storageStatus of \"EXPIRED\" or \"DELETED\" regardless of filter choices. If `filterSyntaxV2` is set to true under the `params` field, then attribute-based expressions are expected instead of the above described tag-based syntax. Examples: * (colors: ANY(\"Red\", \"Blue\")) AND NOT (categories: ANY(\"Phones\")) * (availability: ANY(\"IN_STOCK\")) AND (colors: ANY(\"Red\") OR categories: ANY(\"Phones\"))", "type": "string" }, "labels": { @@ -3277,14 +3723,14 @@ "type": "integer" }, "pageToken": { - "description": "This field is not used for now, please leave it unset.", + "description": "This field is not used for now, leave it unset.", "type": "string" }, "params": { "additionalProperties": { "type": "any" }, - "description": "Additional domain specific parameters for the predictions. Allowed values: * `returnProduct`: Boolean. If set to true, the associated product object will be returned in the `results.metadata` field in the prediction response. * `returnScore`: Boolean. If set to true, the prediction 'score' corresponding to each returned product will be set in the `results.metadata` field in the prediction response. The given 'score' indicates the probability of an product being clicked/purchased given the user's context and history. * `strictFiltering`: Boolean. True by default. If set to false, the service will return generic (unfiltered) popular products instead of empty if your filter blocks all prediction results. * `priceRerankLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-price-reranking', 'low-price-reranking', 'medium-price-reranking', 'high-price-reranking'}. This gives request-level control and adjusts prediction results based on product price. * `diversityLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-diversity', 'low-diversity', 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives request-level control and adjusts prediction results based on product category. * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` field will be interpreteted according to the new, attribute-based syntax.", + "description": "Additional domain specific parameters for the predictions. Allowed values: * `returnProduct`: Boolean. If set to true, the associated product object will be returned in the `results.metadata` field in the prediction response. * `returnScore`: Boolean. If set to true, the prediction 'score' corresponding to each returned product will be set in the `results.metadata` field in the prediction response. The given 'score' indicates the probability of an product being clicked/purchased given the user's context and history. * `strictFiltering`: Boolean. True by default. If set to false, the service will return generic (unfiltered) popular products instead of empty if your filter blocks all prediction results. * `priceRerankLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-price-reranking', 'low-price-reranking', 'medium-price-reranking', 'high-price-reranking'}. This gives request-level control and adjusts prediction results based on product price. * `diversityLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-diversity', 'low-diversity', 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives request-level control and adjusts prediction results based on product category. * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` field is interpreteted according to the new, attribute-based syntax.", "type": "object" }, "userEvent": { @@ -3987,6 +4433,12 @@ }, "type": "object" }, + "GoogleCloudRetailV2alphaResumeModelRequest": { + "description": "Request for resuming training of a model.", + "id": "GoogleCloudRetailV2alphaResumeModelRequest", + "properties": {}, + "type": "object" + }, "GoogleCloudRetailV2alphaRule": { "description": "A rule is a condition-action pair * A condition defines when a rule is to be triggered. * An action specifies what occurs on that trigger. Currently only boost rules are supported. Currently only supported by the search endpoint.", "id": "GoogleCloudRetailV2alphaRule", @@ -4075,7 +4527,7 @@ "type": "object" }, "GoogleCloudRetailV2alphaRuleFilterAction": { - "description": "* Rule Condition: - No Condition provided is a global match. - 1 or more Condition provided is combined with OR operator. * Action Input: The request query and filter that will be applied to the retrieved products, in addition to any filters already provided with the SearchRequest. The AND operator is used to combine the query's existing filters with the filter rule(s). NOTE: May result in 0 results when filters conflict. * Action Result: Filters the returned objects to be ONLY those that passed the filter.", + "description": "* Rule Condition: - No Condition.query_terms provided is a global match. - 1 or more Condition.query_terms provided is combined with OR operator. * Action Input: The request query and filter that are applied to the retrieved products, in addition to any filters already provided with the SearchRequest. The AND operator is used to combine the query's existing filters with the filter rule(s). NOTE: May result in 0 results when filters conflict. * Action Result: Filters the returned objects to be ONLY those that passed the filter.", "id": "GoogleCloudRetailV2alphaRuleFilterAction", "properties": { "filter": { @@ -4128,7 +4580,7 @@ "type": "object" }, "GoogleCloudRetailV2alphaRuleRedirectAction": { - "description": "Redirects a shopper to a specific page. * Rule Condition: - Must specify Condition. * Action Input: Request Query * Action Result: Redirects shopper to provided uri.", + "description": "Redirects a shopper to a specific page. * Rule Condition: - Must specify Condition.query_terms. * Action Input: Request Query * Action Result: Redirects shopper to provided uri.", "id": "GoogleCloudRetailV2alphaRuleRedirectAction", "properties": { "redirectUri": { @@ -4519,7 +4971,7 @@ "type": "string" }, "correctedQuery": { - "description": "Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on corrected_query. Otherwise the original query will be used for search.", + "description": "Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on corrected_query. Otherwise the original query is used for search.", "type": "string" }, "facets": { @@ -4827,6 +5279,29 @@ "properties": {}, "type": "object" }, + "GoogleCloudRetailV2alphaTuneModelMetadata": { + "description": "Metadata associated with a tune operation.", + "id": "GoogleCloudRetailV2alphaTuneModelMetadata", + "properties": { + "model": { + "description": "The resource name of the model that this tune applies to. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaTuneModelRequest": { + "description": "Request to manually start a tuning process now (instead of waiting for the periodically scheduled tuning to happen).", + "id": "GoogleCloudRetailV2alphaTuneModelRequest", + "properties": {}, + "type": "object" + }, + "GoogleCloudRetailV2alphaTuneModelResponse": { + "description": "Response associated with a tune operation.", + "id": "GoogleCloudRetailV2alphaTuneModelResponse", + "properties": {}, + "type": "object" + }, "GoogleCloudRetailV2alphaUserEvent": { "description": "UserEvent captures all metadata information Retail API needs to know about how end users interact with customers' website.", "id": "GoogleCloudRetailV2alphaUserEvent", diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index b8025f712c4..b1340db3f91 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -173,6 +173,7 @@ func NewProjectsLocationsCatalogsService(s *Service) *ProjectsLocationsCatalogsS rs.Branches = NewProjectsLocationsCatalogsBranchesService(s) rs.CompletionData = NewProjectsLocationsCatalogsCompletionDataService(s) rs.Controls = NewProjectsLocationsCatalogsControlsService(s) + rs.Models = NewProjectsLocationsCatalogsModelsService(s) rs.Operations = NewProjectsLocationsCatalogsOperationsService(s) rs.Placements = NewProjectsLocationsCatalogsPlacementsService(s) rs.ServingConfigs = NewProjectsLocationsCatalogsServingConfigsService(s) @@ -191,6 +192,8 @@ type ProjectsLocationsCatalogsService struct { Controls *ProjectsLocationsCatalogsControlsService + Models *ProjectsLocationsCatalogsModelsService + Operations *ProjectsLocationsCatalogsOperationsService Placements *ProjectsLocationsCatalogsPlacementsService @@ -260,6 +263,15 @@ type ProjectsLocationsCatalogsControlsService struct { s *Service } +func NewProjectsLocationsCatalogsModelsService(s *Service) *ProjectsLocationsCatalogsModelsService { + rs := &ProjectsLocationsCatalogsModelsService{s: s} + return rs +} + +type ProjectsLocationsCatalogsModelsService struct { + s *Service +} + func NewProjectsLocationsCatalogsOperationsService(s *Service) *ProjectsLocationsCatalogsOperationsService { rs := &ProjectsLocationsCatalogsOperationsService{s: s} return rs @@ -1632,9 +1644,8 @@ type GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResult struct { // 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. This is an experimental - // feature. Contact Retail Search support team if you are interested in - // enabling it. + // attributes generated by Cloud Retail. It requires + // UserEvent.product_details is imported properly. Attributes map[string]GoogleCloudRetailV2alphaCustomAttribute `json:"attributes,omitempty"` // Suggestion: The suggestion for the query. @@ -2035,6 +2046,38 @@ func (s *GoogleCloudRetailV2alphaControl) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2alphaCreateModelMetadata: Metadata associated with +// a create operation. +type GoogleCloudRetailV2alphaCreateModelMetadata struct { + // Model: The resource name of the model that this create applies to. + // Format: + // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id + // }/models/{model_id} + Model string `json:"model,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Model") 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. "Model") 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 *GoogleCloudRetailV2alphaCreateModelMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaCreateModelMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaCustomAttribute: A custom attribute that is // not explicitly modeled in Product. type GoogleCloudRetailV2alphaCustomAttribute struct { @@ -2884,6 +2927,43 @@ func (s *GoogleCloudRetailV2alphaListControlsResponse) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2alphaListModelsResponse: Response to a +// ListModelRequest. +type GoogleCloudRetailV2alphaListModelsResponse struct { + // Models: List of Models. + Models []*GoogleCloudRetailV2alphaModel `json:"models,omitempty"` + + // NextPageToken: Pagination token, if not returned indicates the last + // page. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Models") 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. "Models") 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 *GoogleCloudRetailV2alphaListModelsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaListModelsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaListProductsResponse: Response message for // ProductService.ListProducts method. type GoogleCloudRetailV2alphaListProductsResponse struct { @@ -3120,6 +3200,339 @@ func (s *GoogleCloudRetailV2alphaMerchantCenterLinkingConfig) MarshalJSON() ([]b return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2alphaModel: Metadata that describes the training +// and serving parameters of a Model. A Model can be associated with a +// ServingConfig and then queried through the Predict api. +type GoogleCloudRetailV2alphaModel struct { + // CreateTime: Output only. Timestamp the Recommendation Model was + // created at. + CreateTime string `json:"createTime,omitempty"` + + // DataState: Output only. The state of data requirements for this + // model: DATA_OK and DATA_ERROR. Recommendation model cannot be trained + // if the data is in DATA_ERROR state. Recommendation model can have + // DATA_ERROR state even if serving state is ACTIVE: models were trained + // successfully before, but cannot be refreshed because model no longer + // has sufficient data for training. + // + // Possible values: + // "DATA_STATE_UNSPECIFIED" - Unspecified default value - should never + // be explicitly set. + // "DATA_OK" - The model has sufficient training data. + // "DATA_ERROR" - The model does not have sufficient training data. + // Error messages can be queried via Stackdriver. + DataState string `json:"dataState,omitempty"` + + // DisplayName: Required. The display name of the model. Should be human + // readable, used to display Recommendation Models in the Retail + // Pantheon Dashboard. UTF-8 encoded string with limit of 1024 + // characters. + DisplayName string `json:"displayName,omitempty"` + + // FilteringOption: Optional. If RECOMMENDATIONS_FILTERING_ENABLED, + // recommendation filtering by attributes is enabled for the model. + // + // Possible values: + // "RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED" - Value used when + // unset. Defaults to RECOMMENDATIONS_FILTERING_DISABLED. + // "RECOMMENDATIONS_FILTERING_DISABLED" - Recommendation filtering is + // disabled. + // "RECOMMENDATIONS_FILTERING_ENABLED" - Recommendation filtering is + // enabled. + FilteringOption string `json:"filteringOption,omitempty"` + + // LastTuneTime: Output only. The timestamp when the latest successful + // tune finished. + LastTuneTime string `json:"lastTuneTime,omitempty"` + + // Name: Required. The fully qualified resource name of the model. + // Format: + // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id + // }/models/{model_id} catalog_id has char limit of 50. + // recommendation_model_id has char limit of 40. + Name string `json:"name,omitempty"` + + // OptimizationObjective: Optional. The optimization objective e.g. + // `cvr`. Currently supported values: `ctr`, `cvr`, `revenue-per-order`. + // If not specified, we choose default based on model type. Default + // depends on type of recommendation: `recommended-for-you` => `ctr` + // `others-you-may-like` => `ctr` `frequently-bought-together` => + // `revenue_per_order` + OptimizationObjective string `json:"optimizationObjective,omitempty"` + + // PageOptimizationConfig: Optional. The page optimization config. + PageOptimizationConfig *GoogleCloudRetailV2alphaModelPageOptimizationConfig `json:"pageOptimizationConfig,omitempty"` + + // PeriodicTuningState: Optional. The state of periodic tuning. The + // period we use is 3 months - to do a one-off tune earlier use the + // TuneModel method. Default value is PERIODIC_TUNING_ENABLED. + // + // Possible values: + // "PERIODIC_TUNING_STATE_UNSPECIFIED" - Unspecified default value - + // should never be explicitly set. + // "PERIODIC_TUNING_DISABLED" - The model has periodic tuning + // disabled. Tuning can be reenabled by calling the + // EnableModelPeriodicTuning method or by calling the TuneModel method. + // "ALL_TUNING_DISABLED" - The model cannot be tuned with periodic + // tuning OR the TuneModel method. Hide the options in customer UI and + // reject any requests through the backend self serve API. + // "PERIODIC_TUNING_ENABLED" - The model has periodic tuning enabled. + // Tuning can be disabled by calling the DisableModelPeriodicTuning + // method. + PeriodicTuningState string `json:"periodicTuningState,omitempty"` + + // ServingState: Output only. The serving state of the model: ACTIVE, + // NOT_ACTIVE. + // + // Possible values: + // "SERVING_STATE_UNSPECIFIED" - Unspecified serving state. + // "INACTIVE" - The model is not serving. + // "ACTIVE" - The model is serving and can be queried. + // "TUNED" - The model is trained on tuned hyperparameters, and can be + // queried. + ServingState string `json:"servingState,omitempty"` + + // TrainingState: Optional. The training state that the model is in + // (e.g. TRAINING or PAUSED). Since part of the cost of running the + // service is frequency of training - this can be used to determine when + // to train model in order to control cost. If not specified: the + // default value for CreateModel method is TRAINING. the default value + // for UpdateModel method is to keep the state the same as before. + // + // Possible values: + // "TRAINING_STATE_UNSPECIFIED" - Unspecified training state. + // "PAUSED" - The model training is paused. + // "TRAINING" - The model is training. + TrainingState string `json:"trainingState,omitempty"` + + // TuningOperation: Output only. The tune operation associated with the + // model. Can be used to determine if there is an ongoing tune for this + // recommendation. Empty field implies no tune is goig on. + TuningOperation string `json:"tuningOperation,omitempty"` + + // Type: Required. The type of model e.g. `home-page`. Currently + // supported values: `recommended-for-you`, `others-you-may-like`, + // `frequently-bought-together`, `page-optimization`, 'similar-items', + // 'buy-it-again', `recently-viewed`(readonly value). + Type string `json:"type,omitempty"` + + // UpdateTime: Output only. Timestamp the Recommendation Model was last + // updated. E.g. if a Recommendation Model was paused - this would be + // the time the pause was initiated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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 *GoogleCloudRetailV2alphaModel) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaModel + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaModelPageOptimizationConfig: The +// PageOptimizationConfig for model training. This determines how many +// panels to optimize for, and which serving configurations to consider +// for each panel. The purpose of this model is to optimize which +// ServingConfig to show on which panels in way that optimizes the +// visitors shopping journey. +type GoogleCloudRetailV2alphaModelPageOptimizationConfig struct { + // PageOptimizationEventType: Required. The type of UserEvent this page + // optimization is shown for. Each page has an associated event type - + // this will be the corresponding event type for the page that the page + // optimization model is used on. Supported types: * `add-to-cart`: + // Products being added to cart. * `detail-page-view`: Products detail + // page viewed. * `home-page-view`: Homepage viewed * + // `category-page-view`: Homepage viewed * `shopping-cart-page-view`: + // User viewing a shopping cart. `home-page-view` only allows models + // with type `recommended-for-you`. All other + // page_optimization_event_type allow all Model.types. + PageOptimizationEventType string `json:"pageOptimizationEventType,omitempty"` + + // Panels: Required. A list of panel configurations. Limit = 5. + Panels []*GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel `json:"panels,omitempty"` + + // Restriction: Optional. How to restrict results across panels e.g. can + // the same ServingConfig be shown on multiple panels at once. If + // unspecified, default to `UNIQUE_MODEL_RESTRICTION`. + // + // Possible values: + // "RESTRICTION_UNSPECIFIED" - Unspecified value for restriction. + // "NO_RESTRICTION" - Allow any ServingConfig to be show on any number + // of panels. Example: `Panel1 candidates`: pdp_ctr, pdp_cvr, + // home_page_ctr_no_diversity `Panel2 candidates`: + // home_page_ctr_no_diversity, home_page_ctr_diversity, + // pdp_cvr_no_diversity `Restriction` = NO_RESTRICTION `Valid + // combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, + // home_page_ctr_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * + // (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, + // home_page_ctr_diversity) * (pdp_cvr, pdp_cvr_no_diversity) * + // (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * + // (home_page_ctr_no_diversity, home_page_ctr_diversity) * + // (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid + // combinations`: [] + // "UNIQUE_SERVING_CONFIG_RESTRICTION" - Do not allow the same + // ServingConfig.name to be shown on multiple panels. Example: `Panel1 + // candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * `Panel2 + // candidates`: * home_page_ctr_no_diversity, + // home_page_ctr_diversity_low, pdp_cvr_no_diversity * `Restriction` = + // UNIQUE_SERVING_CONFIG_RESTRICTION `Valid combinations`: * * (pdp_ctr, + // home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity_low) + // * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * + // (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, + // home_page_ctr_diversity_low) * (pdp_cvr, pdp_cvr_no_diversity) * + // (home_page_ctr_no_diversity, home_page_ctr_diversity_low) * + // (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid + // combinations`: * * (home_page_ctr_no_diversity, + // home_page_ctr_no_diversity) * + // "UNIQUE_MODEL_RESTRICTION" - Do not allow multiple ServingConfigs + // with same Model.name to be show on on different panels. Example: + // `Panel1 candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * + // `Panel2 candidates`: * home_page_ctr_no_diversity, + // home_page_ctr_diversity_low, pdp_cvr_no_diversity * `Restriction` = + // UNIQUE_MODEL_RESTRICTION `Valid combinations`: * * (pdp_ctr, + // home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity) * + // (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * + // (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, + // home_page_ctr_diversity_low) * (home_page_ctr_no_diversity, + // pdp_cvr_no_diversity) * `Invalid combinations`: * * + // (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * (pdp_cvr, + // pdp_cvr_no_diversity) * + // "UNIQUE_MODEL_TYPE_RESTRICTION" - Do not allow multiple + // ServingConfigs with same Model.type to be shown on different panels. + // Example: `Panel1 candidates`: * pdp_ctr, pdp_cvr, + // home_page_ctr_no_diversity * `Panel2 candidates`: * + // home_page_ctr_no_diversity, home_page_ctr_diversity_low, + // pdp_cvr_no_diversity * `Restriction` = UNIQUE_MODEL_RESTRICTION + // `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * + // (pdp_ctr, home_page_ctr_diversity) * (pdp_cvr, + // home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity_low) + // * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid + // combinations`: * * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, + // pdp_cvr_no_diversity) * (pdp_cvr, pdp_cvr_no_diversity) * + // (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * + // (home_page_ctr_no_diversity, home_page_ctr_diversity) * + Restriction string `json:"restriction,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "PageOptimizationEventType") 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. + // "PageOptimizationEventType") 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 *GoogleCloudRetailV2alphaModelPageOptimizationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaModelPageOptimizationConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate: A +// candidate to consider for a given panel. Currently only ServingConfig +// are valid candidates. +type GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate struct { + // ServingConfigId: This has to be a valid ServingConfig identifier. + // e.g. for a ServingConfig with full name: + // `projects/*/locations/global/catalogs/default_catalog/servingConfigs/m + // y_candidate_config` this would be 'my_candidate_config' + ServingConfigId string `json:"servingConfigId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ServingConfigId") 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. "ServingConfigId") 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 *GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel: An +// individual panel with a list of ServingConfigs to consider for it. +type GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel struct { + // Candidates: Required. The candidates to consider on the panel. Limit + // = 10. + Candidates []*GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate `json:"candidates,omitempty"` + + // DefaultCandidate: Required. The default candidate (in case the model + // fails at serving time, we can fall back to the default). + DefaultCandidate *GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate `json:"defaultCandidate,omitempty"` + + // DisplayName: Optional. The name to display for the panel. + DisplayName string `json:"displayName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Candidates") 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. "Candidates") 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 *GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaPauseModelRequest: Request for pausing +// training of a model. +type GoogleCloudRetailV2alphaPauseModelRequest struct { +} + // GoogleCloudRetailV2alphaPredictRequest: Request message for Predict // method. type GoogleCloudRetailV2alphaPredictRequest struct { @@ -3143,7 +3556,7 @@ type GoogleCloudRetailV2alphaPredictRequest struct { // results instead. Note that the API will never return items with // storageStatus of "EXPIRED" or "DELETED" regardless of filter choices. // If `filterSyntaxV2` is set to true under the `params` field, then - // attribute based expressions are expected instead of the above + // attribute-based expressions are expected instead of the above // described tag-based syntax. Examples: * (colors: ANY("Red", "Blue")) // AND NOT (categories: ANY("Phones")) * (availability: ANY("IN_STOCK")) // AND (colors: ANY("Red") OR categories: ANY("Phones")) @@ -3170,7 +3583,7 @@ type GoogleCloudRetailV2alphaPredictRequest struct { // is 100. Values above 100 will be coerced to 100. PageSize int64 `json:"pageSize,omitempty"` - // PageToken: This field is not used for now, please leave it unset. + // PageToken: This field is not used for now, leave it unset. PageToken string `json:"pageToken,omitempty"` // Params: Additional domain specific parameters for the predictions. @@ -3194,8 +3607,8 @@ type GoogleCloudRetailV2alphaPredictRequest struct { // 'high-diversity', 'auto-diversity'}. This gives request-level control // and adjusts prediction results based on product category. * // `filterSyntaxV2`: Boolean. False by default. If set to true, the - // `filter` field will be interpreteted according to the new, - // attribute-based syntax. + // `filter` field is interpreteted according to the new, attribute-based + // syntax. Params googleapi.RawMessage `json:"params,omitempty"` // UserEvent: Required. Context about the user, what they are looking at @@ -4631,6 +5044,11 @@ func (s *GoogleCloudRetailV2alphaReplaceCatalogAttributeRequest) MarshalJSON() ( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2alphaResumeModelRequest: Request for resuming +// training of a model. +type GoogleCloudRetailV2alphaResumeModelRequest struct { +} + // GoogleCloudRetailV2alphaRule: A rule is a condition-action pair * A // condition defines when a rule is to be triggered. * An action // specifies what occurs on that trigger. Currently only boost rules are @@ -4795,14 +5213,14 @@ func (s *GoogleCloudRetailV2alphaRuleDoNotAssociateAction) MarshalJSON() ([]byte } // GoogleCloudRetailV2alphaRuleFilterAction: * Rule Condition: - No -// Condition provided is a global match. - 1 or more Condition provided -// is combined with OR operator. * Action Input: The request query and -// filter that will be applied to the retrieved products, in addition to -// any filters already provided with the SearchRequest. The AND operator -// is used to combine the query's existing filters with the filter -// rule(s). NOTE: May result in 0 results when filters conflict. * -// Action Result: Filters the returned objects to be ONLY those that -// passed the filter. +// Condition.query_terms provided is a global match. - 1 or more +// Condition.query_terms provided is combined with OR operator. * Action +// Input: The request query and filter that are applied to the retrieved +// products, in addition to any filters already provided with the +// SearchRequest. The AND operator is used to combine the query's +// existing filters with the filter rule(s). NOTE: May result in 0 +// results when filters conflict. * Action Result: Filters the returned +// objects to be ONLY those that passed the filter. type GoogleCloudRetailV2alphaRuleFilterAction struct { // Filter: A filter to apply on the matching condition results. // Supported features: * filter must be set. * Filter syntax is @@ -4907,9 +5325,9 @@ func (s *GoogleCloudRetailV2alphaRuleOnewaySynonymsAction) MarshalJSON() ([]byte } // GoogleCloudRetailV2alphaRuleRedirectAction: Redirects a shopper to a -// specific page. * Rule Condition: - Must specify Condition. * Action -// Input: Request Query * Action Result: Redirects shopper to provided -// uri. +// specific page. * Rule Condition: - Must specify +// Condition.query_terms. * Action Input: Request Query * Action Result: +// Redirects shopper to provided uri. type GoogleCloudRetailV2alphaRuleRedirectAction struct { // RedirectUri: URL must have length equal or less than 2000 characters. RedirectUri string `json:"redirectUri,omitempty"` @@ -5685,8 +6103,7 @@ type GoogleCloudRetailV2alphaSearchResponse struct { // CorrectedQuery: Contains the spell corrected query, if found. If the // spell correction type is AUTOMATIC, then the search results are based - // on corrected_query. Otherwise the original query will be used for - // search. + // on corrected_query. Otherwise the original query is used for search. CorrectedQuery string `json:"correctedQuery,omitempty"` // Facets: Results of facets requested by user. @@ -6221,6 +6638,49 @@ func (s *GoogleCloudRetailV2alphaSetInventoryRequest) MarshalJSON() ([]byte, err type GoogleCloudRetailV2alphaSetInventoryResponse struct { } +// GoogleCloudRetailV2alphaTuneModelMetadata: Metadata associated with a +// tune operation. +type GoogleCloudRetailV2alphaTuneModelMetadata struct { + // Model: The resource name of the model that this tune applies to. + // Format: + // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id + // }/models/{model_id} + Model string `json:"model,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Model") 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. "Model") 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 *GoogleCloudRetailV2alphaTuneModelMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaTuneModelMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaTuneModelRequest: Request to manually start a +// tuning process now (instead of waiting for the periodically scheduled +// tuning to happen). +type GoogleCloudRetailV2alphaTuneModelRequest struct { +} + +// GoogleCloudRetailV2alphaTuneModelResponse: Response associated with a +// tune operation. +type GoogleCloudRetailV2alphaTuneModelResponse struct { +} + // GoogleCloudRetailV2alphaUserEvent: UserEvent captures all metadata // information Retail API needs to know about how end users interact // with customers' website. @@ -12397,6 +12857,1088 @@ func (c *ProjectsLocationsCatalogsControlsPatchCall) Do(opts ...googleapi.CallOp } +// method id "retail.projects.locations.catalogs.models.create": + +type ProjectsLocationsCatalogsModelsCreateCall struct { + s *Service + parent string + googlecloudretailv2alphamodel *GoogleCloudRetailV2alphaModel + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new model. +// +// - parent: The parent resource under which to create the model. +// Format: +// projects/{project_number}/locations/{location_id}/catalogs/{catalog_ +// id}. +func (r *ProjectsLocationsCatalogsModelsService) Create(parent string, googlecloudretailv2alphamodel *GoogleCloudRetailV2alphaModel) *ProjectsLocationsCatalogsModelsCreateCall { + c := &ProjectsLocationsCatalogsModelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudretailv2alphamodel = googlecloudretailv2alphamodel + return c +} + +// DryRun sets the optional parameter "dryRun": Whether to run a dry_run +// to validate the request (without actually creating the model). +func (c *ProjectsLocationsCatalogsModelsCreateCall) DryRun(dryRun bool) *ProjectsLocationsCatalogsModelsCreateCall { + c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) + 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 *ProjectsLocationsCatalogsModelsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsModelsCreateCall { + 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 *ProjectsLocationsCatalogsModelsCreateCall) Context(ctx context.Context) *ProjectsLocationsCatalogsModelsCreateCall { + 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 *ProjectsLocationsCatalogsModelsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsModelsCreateCall) 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.googlecloudretailv2alphamodel) + 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/{+parent}/models") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.models.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.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 *ProjectsLocationsCatalogsModelsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 := &GoogleLongrunningOperation{ + 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": "Creates a new model.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models", + // "httpMethod": "POST", + // "id": "retail.projects.locations.catalogs.models.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "dryRun": { + // "description": "Optional. Whether to run a dry_run to validate the request (without actually creating the model).", + // "location": "query", + // "type": "boolean" + // }, + // "parent": { + // "description": "Required. The parent resource under which to create the model. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+parent}/models", + // "request": { + // "$ref": "GoogleCloudRetailV2alphaModel" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "retail.projects.locations.catalogs.models.delete": + +type ProjectsLocationsCatalogsModelsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an existing model. +// +// - name: The resource name of the [Model] to delete. Format: +// projects/{project_number}/locations/{location_id}/catalogs/{catalog_ +// id}/models/{model_id}. +func (r *ProjectsLocationsCatalogsModelsService) Delete(name string) *ProjectsLocationsCatalogsModelsDeleteCall { + c := &ProjectsLocationsCatalogsModelsDeleteCall{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 *ProjectsLocationsCatalogsModelsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsModelsDeleteCall { + 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 *ProjectsLocationsCatalogsModelsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCatalogsModelsDeleteCall { + 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 *ProjectsLocationsCatalogsModelsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsModelsDeleteCall) 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 + 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("DELETE", 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.models.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.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 *ProjectsLocationsCatalogsModelsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ + 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": "Deletes an existing model.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}", + // "httpMethod": "DELETE", + // "id": "retail.projects.locations.catalogs.models.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the [Model] to delete. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "retail.projects.locations.catalogs.models.list": + +type ProjectsLocationsCatalogsModelsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the models linked to this event store. +// +// - parent: The parent for which to list models. Format: +// projects/{project_number}/locations/{location_id}/catalogs/{catalog_ +// id}. +func (r *ProjectsLocationsCatalogsModelsService) List(parent string) *ProjectsLocationsCatalogsModelsListCall { + c := &ProjectsLocationsCatalogsModelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// results to return. If unspecified, defaults to 50. Max allowed value +// is 1000. +func (c *ProjectsLocationsCatalogsModelsListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsModelsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListModels` call. Provide this to retrieve +// the subsequent page. +func (c *ProjectsLocationsCatalogsModelsListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsModelsListCall { + c.urlParams_.Set("pageToken", pageToken) + 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 *ProjectsLocationsCatalogsModelsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsModelsListCall { + 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 *ProjectsLocationsCatalogsModelsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsModelsListCall { + 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 *ProjectsLocationsCatalogsModelsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsModelsListCall { + 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 *ProjectsLocationsCatalogsModelsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsModelsListCall) 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/{+parent}/models") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.models.list" call. +// Exactly one of *GoogleCloudRetailV2alphaListModelsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRetailV2alphaListModelsResponse.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 *ProjectsLocationsCatalogsModelsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2alphaListModelsResponse, 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 := &GoogleCloudRetailV2alphaListModelsResponse{ + 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": "Lists all the models linked to this event store.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models", + // "httpMethod": "GET", + // "id": "retail.projects.locations.catalogs.models.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous `ListModels` call. Provide this to retrieve the subsequent page.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent for which to list models. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+parent}/models", + // "response": { + // "$ref": "GoogleCloudRetailV2alphaListModelsResponse" + // }, + // "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 *ProjectsLocationsCatalogsModelsListCall) Pages(ctx context.Context, f func(*GoogleCloudRetailV2alphaListModelsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("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.PageToken(x.NextPageToken) + } +} + +// method id "retail.projects.locations.catalogs.models.patch": + +type ProjectsLocationsCatalogsModelsPatchCall struct { + s *Service + name string + googlecloudretailv2alphamodel *GoogleCloudRetailV2alphaModel + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update of model metadata. Only fields that currently can be +// updated are: filtering_option, periodic_tuning_state. If other values +// are provided, this API method will ignore them. +// +// - name: The fully qualified resource name of the model. Format: +// projects/{project_number}/locations/{location_id}/catalogs/{catalog_ +// id}/models/{model_id} catalog_id has char limit of 50. +// recommendation_model_id has char limit of 40. +func (r *ProjectsLocationsCatalogsModelsService) Patch(name string, googlecloudretailv2alphamodel *GoogleCloudRetailV2alphaModel) *ProjectsLocationsCatalogsModelsPatchCall { + c := &ProjectsLocationsCatalogsModelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudretailv2alphamodel = googlecloudretailv2alphamodel + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided 'model' to update. If not set, will by default +// update all fields. +func (c *ProjectsLocationsCatalogsModelsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsModelsPatchCall { + 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 *ProjectsLocationsCatalogsModelsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsModelsPatchCall { + 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 *ProjectsLocationsCatalogsModelsPatchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsModelsPatchCall { + 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 *ProjectsLocationsCatalogsModelsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsModelsPatchCall) 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.googlecloudretailv2alphamodel) + 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/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", 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.models.patch" call. +// Exactly one of *GoogleCloudRetailV2alphaModel or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudRetailV2alphaModel.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 *ProjectsLocationsCatalogsModelsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2alphaModel, 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 := &GoogleCloudRetailV2alphaModel{ + 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": "Update of model metadata. Only fields that currently can be updated are: filtering_option, periodic_tuning_state. If other values are provided, this API method will ignore them.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}", + // "httpMethod": "PATCH", + // "id": "retail.projects.locations.catalogs.models.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The fully qualified resource name of the model. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id} catalog_id has char limit of 50. recommendation_model_id has char limit of 40.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Indicates which fields in the provided 'model' to update. If not set, will by default update all fields.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2alpha/{+name}", + // "request": { + // "$ref": "GoogleCloudRetailV2alphaModel" + // }, + // "response": { + // "$ref": "GoogleCloudRetailV2alphaModel" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "retail.projects.locations.catalogs.models.pause": + +type ProjectsLocationsCatalogsModelsPauseCall struct { + s *Service + name string + googlecloudretailv2alphapausemodelrequest *GoogleCloudRetailV2alphaPauseModelRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Pause: Pauses the training of an existing model. +// +// - name: The name of the model to pause. Format: +// projects/{project_number}/locations/{location_id}/catalogs/{catalog_ +// id}/models/{model_id}. +func (r *ProjectsLocationsCatalogsModelsService) Pause(name string, googlecloudretailv2alphapausemodelrequest *GoogleCloudRetailV2alphaPauseModelRequest) *ProjectsLocationsCatalogsModelsPauseCall { + c := &ProjectsLocationsCatalogsModelsPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudretailv2alphapausemodelrequest = googlecloudretailv2alphapausemodelrequest + 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 *ProjectsLocationsCatalogsModelsPauseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsModelsPauseCall { + 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 *ProjectsLocationsCatalogsModelsPauseCall) Context(ctx context.Context) *ProjectsLocationsCatalogsModelsPauseCall { + 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 *ProjectsLocationsCatalogsModelsPauseCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsModelsPauseCall) 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.googlecloudretailv2alphapausemodelrequest) + 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/{+name}:pause") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.models.pause" call. +// Exactly one of *GoogleCloudRetailV2alphaModel or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudRetailV2alphaModel.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 *ProjectsLocationsCatalogsModelsPauseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2alphaModel, 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 := &GoogleCloudRetailV2alphaModel{ + 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": "Pauses the training of an existing model.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}:pause", + // "httpMethod": "POST", + // "id": "retail.projects.locations.catalogs.models.pause", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the model to pause. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+name}:pause", + // "request": { + // "$ref": "GoogleCloudRetailV2alphaPauseModelRequest" + // }, + // "response": { + // "$ref": "GoogleCloudRetailV2alphaModel" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "retail.projects.locations.catalogs.models.resume": + +type ProjectsLocationsCatalogsModelsResumeCall struct { + s *Service + name string + googlecloudretailv2alpharesumemodelrequest *GoogleCloudRetailV2alphaResumeModelRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Resume: Resumes the training of an existing model. +// +// - name: The name of the model to resume. Format: +// projects/{project_number}/locations/{location_id}/catalogs/{catalog_ +// id}/models/{model_id}. +func (r *ProjectsLocationsCatalogsModelsService) Resume(name string, googlecloudretailv2alpharesumemodelrequest *GoogleCloudRetailV2alphaResumeModelRequest) *ProjectsLocationsCatalogsModelsResumeCall { + c := &ProjectsLocationsCatalogsModelsResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudretailv2alpharesumemodelrequest = googlecloudretailv2alpharesumemodelrequest + 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 *ProjectsLocationsCatalogsModelsResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsModelsResumeCall { + 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 *ProjectsLocationsCatalogsModelsResumeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsModelsResumeCall { + 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 *ProjectsLocationsCatalogsModelsResumeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsModelsResumeCall) 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.googlecloudretailv2alpharesumemodelrequest) + 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/{+name}:resume") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.models.resume" call. +// Exactly one of *GoogleCloudRetailV2alphaModel or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudRetailV2alphaModel.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 *ProjectsLocationsCatalogsModelsResumeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2alphaModel, 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 := &GoogleCloudRetailV2alphaModel{ + 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": "Resumes the training of an existing model.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}:resume", + // "httpMethod": "POST", + // "id": "retail.projects.locations.catalogs.models.resume", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the model to resume. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+name}:resume", + // "request": { + // "$ref": "GoogleCloudRetailV2alphaResumeModelRequest" + // }, + // "response": { + // "$ref": "GoogleCloudRetailV2alphaModel" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "retail.projects.locations.catalogs.models.tune": + +type ProjectsLocationsCatalogsModelsTuneCall struct { + s *Service + name string + googlecloudretailv2alphatunemodelrequest *GoogleCloudRetailV2alphaTuneModelRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Tune: Tunes an existing model. +// +// - name: The resource name of the model to tune. Format: +// projects/{project_number}/locations/{location_id}/catalogs/{catalog_ +// id}/models/{model_id}. +func (r *ProjectsLocationsCatalogsModelsService) Tune(name string, googlecloudretailv2alphatunemodelrequest *GoogleCloudRetailV2alphaTuneModelRequest) *ProjectsLocationsCatalogsModelsTuneCall { + c := &ProjectsLocationsCatalogsModelsTuneCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudretailv2alphatunemodelrequest = googlecloudretailv2alphatunemodelrequest + 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 *ProjectsLocationsCatalogsModelsTuneCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsModelsTuneCall { + 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 *ProjectsLocationsCatalogsModelsTuneCall) Context(ctx context.Context) *ProjectsLocationsCatalogsModelsTuneCall { + 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 *ProjectsLocationsCatalogsModelsTuneCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsModelsTuneCall) 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.googlecloudretailv2alphatunemodelrequest) + 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/{+name}:tune") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.models.tune" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.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 *ProjectsLocationsCatalogsModelsTuneCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 := &GoogleLongrunningOperation{ + 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": "Tunes an existing model.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}:tune", + // "httpMethod": "POST", + // "id": "retail.projects.locations.catalogs.models.tune", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the model to tune. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+name}:tune", + // "request": { + // "$ref": "GoogleCloudRetailV2alphaTuneModelRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "retail.projects.locations.catalogs.operations.get": type ProjectsLocationsCatalogsOperationsGetCall struct { @@ -12773,10 +14315,10 @@ type ProjectsLocationsCatalogsPlacementsPredictCall struct { // Predict: Makes a recommendation prediction. // // - placement: Full resource name of the format: -// {placement=projects/*/locations/global/catalogs/default_catalog/serv -// ingConfigs/*} or -// {placement=projects/*/locations/global/catalogs/default_catalog/plac -// ements/*}. We recommend using the `servingConfigs` resource. +// `{placement=projects/*/locations/global/catalogs/default_catalog/ser +// vingConfigs/*}` or +// `{placement=projects/*/locations/global/catalogs/default_catalog/pla +// cements/*}`. We recommend using the `servingConfigs` resource. // `placements` is a legacy resource. The ID of the Recommendations AI // serving config or placement. Before you can request predictions // from your model, you must create at least one serving config or @@ -12893,7 +14435,7 @@ func (c *ProjectsLocationsCatalogsPlacementsPredictCall) Do(opts ...googleapi.Ca // ], // "parameters": { // "placement": { - // "description": "Required. Full resource name of the format: {placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} or {placement=projects/*/locations/global/catalogs/default_catalog/placements/*}. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", + // "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", // "required": true, @@ -14056,10 +15598,10 @@ type ProjectsLocationsCatalogsServingConfigsPredictCall struct { // Predict: Makes a recommendation prediction. // // - placement: Full resource name of the format: -// {placement=projects/*/locations/global/catalogs/default_catalog/serv -// ingConfigs/*} or -// {placement=projects/*/locations/global/catalogs/default_catalog/plac -// ements/*}. We recommend using the `servingConfigs` resource. +// `{placement=projects/*/locations/global/catalogs/default_catalog/ser +// vingConfigs/*}` or +// `{placement=projects/*/locations/global/catalogs/default_catalog/pla +// cements/*}`. We recommend using the `servingConfigs` resource. // `placements` is a legacy resource. The ID of the Recommendations AI // serving config or placement. Before you can request predictions // from your model, you must create at least one serving config or @@ -14176,7 +15718,7 @@ func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) Do(opts ...googleap // ], // "parameters": { // "placement": { - // "description": "Required. Full resource name of the format: {placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} or {placement=projects/*/locations/global/catalogs/default_catalog/placements/*}. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", + // "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", // "required": true, diff --git a/retail/v2beta/retail-api.json b/retail/v2beta/retail-api.json index 9ce63cd6ba3..e3d4581a280 100644 --- a/retail/v2beta/retail-api.json +++ b/retail/v2beta/retail-api.json @@ -1149,7 +1149,7 @@ ], "parameters": { "placement": { - "description": "Required. Full resource name of the format: {placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} or {placement=projects/*/locations/global/catalogs/default_catalog/placements/*}. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", + "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", "required": true, @@ -1390,7 +1390,7 @@ ], "parameters": { "placement": { - "description": "Required. Full resource name of the format: {placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} or {placement=projects/*/locations/global/catalogs/default_catalog/placements/*}. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", + "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -1770,7 +1770,7 @@ } } }, - "revision": "20220707", + "revision": "20220716", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2160,6 +2160,17 @@ "properties": {}, "type": "object" }, + "GoogleCloudRetailV2alphaCreateModelMetadata": { + "description": "Metadata associated with a create operation.", + "id": "GoogleCloudRetailV2alphaCreateModelMetadata", + "properties": { + "model": { + "description": "The resource name of the model that this create applies to. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaExportErrorsConfig": { "description": "Configuration of destination for Export related errors.", "id": "GoogleCloudRetailV2alphaExportErrorsConfig", @@ -2324,6 +2335,201 @@ }, "type": "object" }, + "GoogleCloudRetailV2alphaModel": { + "description": "Metadata that describes the training and serving parameters of a Model. A Model can be associated with a ServingConfig and then queried through the Predict api.", + "id": "GoogleCloudRetailV2alphaModel", + "properties": { + "createTime": { + "description": "Output only. Timestamp the Recommendation Model was created at.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "dataState": { + "description": "Output only. The state of data requirements for this model: DATA_OK and DATA_ERROR. Recommendation model cannot be trained if the data is in DATA_ERROR state. Recommendation model can have DATA_ERROR state even if serving state is ACTIVE: models were trained successfully before, but cannot be refreshed because model no longer has sufficient data for training.", + "enum": [ + "DATA_STATE_UNSPECIFIED", + "DATA_OK", + "DATA_ERROR" + ], + "enumDescriptions": [ + "Unspecified default value - should never be explicitly set.", + "The model has sufficient training data.", + "The model does not have sufficient training data. Error messages can be queried via Stackdriver." + ], + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Required. The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Pantheon Dashboard. UTF-8 encoded string with limit of 1024 characters.", + "type": "string" + }, + "filteringOption": { + "description": "Optional. If RECOMMENDATIONS_FILTERING_ENABLED, recommendation filtering by attributes is enabled for the model.", + "enum": [ + "RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED", + "RECOMMENDATIONS_FILTERING_DISABLED", + "RECOMMENDATIONS_FILTERING_ENABLED" + ], + "enumDescriptions": [ + "Value used when unset. Defaults to RECOMMENDATIONS_FILTERING_DISABLED.", + "Recommendation filtering is disabled.", + "Recommendation filtering is enabled." + ], + "type": "string" + }, + "lastTuneTime": { + "description": "Output only. The timestamp when the latest successful tune finished.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Required. The fully qualified resource name of the model. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id} catalog_id has char limit of 50. recommendation_model_id has char limit of 40.", + "type": "string" + }, + "optimizationObjective": { + "description": "Optional. The optimization objective e.g. `cvr`. Currently supported values: `ctr`, `cvr`, `revenue-per-order`. If not specified, we choose default based on model type. Default depends on type of recommendation: `recommended-for-you` =\u003e `ctr` `others-you-may-like` =\u003e `ctr` `frequently-bought-together` =\u003e `revenue_per_order`", + "type": "string" + }, + "pageOptimizationConfig": { + "$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfig", + "description": "Optional. The page optimization config." + }, + "periodicTuningState": { + "description": "Optional. The state of periodic tuning. The period we use is 3 months - to do a one-off tune earlier use the TuneModel method. Default value is PERIODIC_TUNING_ENABLED.", + "enum": [ + "PERIODIC_TUNING_STATE_UNSPECIFIED", + "PERIODIC_TUNING_DISABLED", + "ALL_TUNING_DISABLED", + "PERIODIC_TUNING_ENABLED" + ], + "enumDescriptions": [ + "Unspecified default value - should never be explicitly set.", + "The model has periodic tuning disabled. Tuning can be reenabled by calling the EnableModelPeriodicTuning method or by calling the TuneModel method.", + "The model cannot be tuned with periodic tuning OR the TuneModel method. Hide the options in customer UI and reject any requests through the backend self serve API.", + "The model has periodic tuning enabled. Tuning can be disabled by calling the DisableModelPeriodicTuning method." + ], + "type": "string" + }, + "servingState": { + "description": "Output only. The serving state of the model: ACTIVE, NOT_ACTIVE.", + "enum": [ + "SERVING_STATE_UNSPECIFIED", + "INACTIVE", + "ACTIVE", + "TUNED" + ], + "enumDescriptions": [ + "Unspecified serving state.", + "The model is not serving.", + "The model is serving and can be queried.", + "The model is trained on tuned hyperparameters, and can be queried." + ], + "readOnly": true, + "type": "string" + }, + "trainingState": { + "description": "Optional. The training state that the model is in (e.g. TRAINING or PAUSED). Since part of the cost of running the service is frequency of training - this can be used to determine when to train model in order to control cost. If not specified: the default value for CreateModel method is TRAINING. the default value for UpdateModel method is to keep the state the same as before.", + "enum": [ + "TRAINING_STATE_UNSPECIFIED", + "PAUSED", + "TRAINING" + ], + "enumDescriptions": [ + "Unspecified training state.", + "The model training is paused.", + "The model is training." + ], + "type": "string" + }, + "tuningOperation": { + "description": "Output only. The tune operation associated with the model. Can be used to determine if there is an ongoing tune for this recommendation. Empty field implies no tune is goig on.", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Required. The type of model e.g. `home-page`. Currently supported values: `recommended-for-you`, `others-you-may-like`, `frequently-bought-together`, `page-optimization`, 'similar-items', 'buy-it-again', `recently-viewed`(readonly value).", + "type": "string" + }, + "updateTime": { + "description": "Output only. Timestamp the Recommendation Model was last updated. E.g. if a Recommendation Model was paused - this would be the time the pause was initiated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaModelPageOptimizationConfig": { + "description": "The PageOptimizationConfig for model training. This determines how many panels to optimize for, and which serving configurations to consider for each panel. The purpose of this model is to optimize which ServingConfig to show on which panels in way that optimizes the visitors shopping journey.", + "id": "GoogleCloudRetailV2alphaModelPageOptimizationConfig", + "properties": { + "pageOptimizationEventType": { + "description": "Required. The type of UserEvent this page optimization is shown for. Each page has an associated event type - this will be the corresponding event type for the page that the page optimization model is used on. Supported types: * `add-to-cart`: Products being added to cart. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed * `category-page-view`: Homepage viewed * `shopping-cart-page-view`: User viewing a shopping cart. `home-page-view` only allows models with type `recommended-for-you`. All other page_optimization_event_type allow all Model.types.", + "type": "string" + }, + "panels": { + "description": "Required. A list of panel configurations. Limit = 5.", + "items": { + "$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel" + }, + "type": "array" + }, + "restriction": { + "description": "Optional. How to restrict results across panels e.g. can the same ServingConfig be shown on multiple panels at once. If unspecified, default to `UNIQUE_MODEL_RESTRICTION`.", + "enum": [ + "RESTRICTION_UNSPECIFIED", + "NO_RESTRICTION", + "UNIQUE_SERVING_CONFIG_RESTRICTION", + "UNIQUE_MODEL_RESTRICTION", + "UNIQUE_MODEL_TYPE_RESTRICTION" + ], + "enumDescriptions": [ + "Unspecified value for restriction.", + "Allow any ServingConfig to be show on any number of panels. Example: `Panel1 candidates`: pdp_ctr, pdp_cvr, home_page_ctr_no_diversity `Panel2 candidates`: home_page_ctr_no_diversity, home_page_ctr_diversity, pdp_cvr_no_diversity `Restriction` = NO_RESTRICTION `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity) * (pdp_cvr, pdp_cvr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_diversity) * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid combinations`: []", + "Do not allow the same ServingConfig.name to be shown on multiple panels. Example: `Panel1 candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * `Panel2 candidates`: * home_page_ctr_no_diversity, home_page_ctr_diversity_low, pdp_cvr_no_diversity * `Restriction` = UNIQUE_SERVING_CONFIG_RESTRICTION `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity_low) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity_low) * (pdp_cvr, pdp_cvr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_diversity_low) * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid combinations`: * * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) *", + "Do not allow multiple ServingConfigs with same Model.name to be show on on different panels. Example: `Panel1 candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * `Panel2 candidates`: * home_page_ctr_no_diversity, home_page_ctr_diversity_low, pdp_cvr_no_diversity * `Restriction` = UNIQUE_MODEL_RESTRICTION `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity_low) * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid combinations`: * * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * (pdp_cvr, pdp_cvr_no_diversity) *", + "Do not allow multiple ServingConfigs with same Model.type to be shown on different panels. Example: `Panel1 candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * `Panel2 candidates`: * home_page_ctr_no_diversity, home_page_ctr_diversity_low, pdp_cvr_no_diversity * `Restriction` = UNIQUE_MODEL_RESTRICTION `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity_low) * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid combinations`: * * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr, pdp_cvr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_diversity) *" + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate": { + "description": "A candidate to consider for a given panel. Currently only ServingConfig are valid candidates.", + "id": "GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate", + "properties": { + "servingConfigId": { + "description": "This has to be a valid ServingConfig identifier. e.g. for a ServingConfig with full name: `projects/*/locations/global/catalogs/default_catalog/servingConfigs/my_candidate_config` this would be 'my_candidate_config'", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel": { + "description": "An individual panel with a list of ServingConfigs to consider for it.", + "id": "GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel", + "properties": { + "candidates": { + "description": "Required. The candidates to consider on the panel. Limit = 10.", + "items": { + "$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate" + }, + "type": "array" + }, + "defaultCandidate": { + "$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate", + "description": "Required. The default candidate (in case the model fails at serving time, we can fall back to the default)." + }, + "displayName": { + "description": "Optional. The name to display for the panel.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaPurgeMetadata": { "description": "Metadata related to the progress of the Purge operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudRetailV2alphaPurgeMetadata", @@ -2442,6 +2648,23 @@ "properties": {}, "type": "object" }, + "GoogleCloudRetailV2alphaTuneModelMetadata": { + "description": "Metadata associated with a tune operation.", + "id": "GoogleCloudRetailV2alphaTuneModelMetadata", + "properties": { + "model": { + "description": "The resource name of the model that this tune applies to. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaTuneModelResponse": { + "description": "Response associated with a tune operation.", + "id": "GoogleCloudRetailV2alphaTuneModelResponse", + "properties": {}, + "type": "object" + }, "GoogleCloudRetailV2alphaUserEventImportSummary": { "description": "A summary of import result. The UserEventImportSummary summarizes the import status for user events.", "id": "GoogleCloudRetailV2alphaUserEventImportSummary", @@ -2809,7 +3032,7 @@ "additionalProperties": { "$ref": "GoogleCloudRetailV2betaCustomAttribute" }, - "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. This is an experimental feature. Contact Retail Search support team if you are interested in enabling it.", + "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. It requires UserEvent.product_details is imported properly.", "type": "object" }, "suggestion": { @@ -3542,7 +3765,7 @@ "id": "GoogleCloudRetailV2betaPredictRequest", "properties": { "filter": { - "description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: \"Recently viewed\" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, the API will return generic (unfiltered) popular products. If you only want results strictly matching the filters, set `strictFiltering` to True in `PredictRequest.params` to receive empty results instead. Note that the API will never return items with storageStatus of \"EXPIRED\" or \"DELETED\" regardless of filter choices. If `filterSyntaxV2` is set to true under the `params` field, then attribute based expressions are expected instead of the above described tag-based syntax. Examples: * (colors: ANY(\"Red\", \"Blue\")) AND NOT (categories: ANY(\"Phones\")) * (availability: ANY(\"IN_STOCK\")) AND (colors: ANY(\"Red\") OR categories: ANY(\"Phones\"))", + "description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: \"Recently viewed\" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, the API will return generic (unfiltered) popular products. If you only want results strictly matching the filters, set `strictFiltering` to True in `PredictRequest.params` to receive empty results instead. Note that the API will never return items with storageStatus of \"EXPIRED\" or \"DELETED\" regardless of filter choices. If `filterSyntaxV2` is set to true under the `params` field, then attribute-based expressions are expected instead of the above described tag-based syntax. Examples: * (colors: ANY(\"Red\", \"Blue\")) AND NOT (categories: ANY(\"Phones\")) * (availability: ANY(\"IN_STOCK\")) AND (colors: ANY(\"Red\") OR categories: ANY(\"Phones\"))", "type": "string" }, "labels": { @@ -3558,14 +3781,14 @@ "type": "integer" }, "pageToken": { - "description": "This field is not used for now, please leave it unset.", + "description": "This field is not used for now, leave it unset.", "type": "string" }, "params": { "additionalProperties": { "type": "any" }, - "description": "Additional domain specific parameters for the predictions. Allowed values: * `returnProduct`: Boolean. If set to true, the associated product object will be returned in the `results.metadata` field in the prediction response. * `returnScore`: Boolean. If set to true, the prediction 'score' corresponding to each returned product will be set in the `results.metadata` field in the prediction response. The given 'score' indicates the probability of an product being clicked/purchased given the user's context and history. * `strictFiltering`: Boolean. True by default. If set to false, the service will return generic (unfiltered) popular products instead of empty if your filter blocks all prediction results. * `priceRerankLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-price-reranking', 'low-price-reranking', 'medium-price-reranking', 'high-price-reranking'}. This gives request-level control and adjusts prediction results based on product price. * `diversityLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-diversity', 'low-diversity', 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives request-level control and adjusts prediction results based on product category. * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` field will be interpreteted according to the new, attribute-based syntax.", + "description": "Additional domain specific parameters for the predictions. Allowed values: * `returnProduct`: Boolean. If set to true, the associated product object will be returned in the `results.metadata` field in the prediction response. * `returnScore`: Boolean. If set to true, the prediction 'score' corresponding to each returned product will be set in the `results.metadata` field in the prediction response. The given 'score' indicates the probability of an product being clicked/purchased given the user's context and history. * `strictFiltering`: Boolean. True by default. If set to false, the service will return generic (unfiltered) popular products instead of empty if your filter blocks all prediction results. * `priceRerankLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-price-reranking', 'low-price-reranking', 'medium-price-reranking', 'high-price-reranking'}. This gives request-level control and adjusts prediction results based on product price. * `diversityLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-diversity', 'low-diversity', 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives request-level control and adjusts prediction results based on product category. * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` field is interpreteted according to the new, attribute-based syntax.", "type": "object" }, "userEvent": { @@ -4295,7 +4518,7 @@ "type": "object" }, "GoogleCloudRetailV2betaRuleFilterAction": { - "description": "* Rule Condition: - No Condition provided is a global match. - 1 or more Condition provided is combined with OR operator. * Action Input: The request query and filter that will be applied to the retrieved products, in addition to any filters already provided with the SearchRequest. The AND operator is used to combine the query's existing filters with the filter rule(s). NOTE: May result in 0 results when filters conflict. * Action Result: Filters the returned objects to be ONLY those that passed the filter.", + "description": "* Rule Condition: - No Condition.query_terms provided is a global match. - 1 or more Condition.query_terms provided is combined with OR operator. * Action Input: The request query and filter that are applied to the retrieved products, in addition to any filters already provided with the SearchRequest. The AND operator is used to combine the query's existing filters with the filter rule(s). NOTE: May result in 0 results when filters conflict. * Action Result: Filters the returned objects to be ONLY those that passed the filter.", "id": "GoogleCloudRetailV2betaRuleFilterAction", "properties": { "filter": { @@ -4348,7 +4571,7 @@ "type": "object" }, "GoogleCloudRetailV2betaRuleRedirectAction": { - "description": "Redirects a shopper to a specific page. * Rule Condition: - Must specify Condition. * Action Input: Request Query * Action Result: Redirects shopper to provided uri.", + "description": "Redirects a shopper to a specific page. * Rule Condition: - Must specify Condition.query_terms. * Action Input: Request Query * Action Result: Redirects shopper to provided uri.", "id": "GoogleCloudRetailV2betaRuleRedirectAction", "properties": { "redirectUri": { @@ -4721,7 +4944,7 @@ "type": "string" }, "correctedQuery": { - "description": "Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on corrected_query. Otherwise the original query will be used for search.", + "description": "Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on corrected_query. Otherwise the original query is used for search.", "type": "string" }, "facets": { diff --git a/retail/v2beta/retail-gen.go b/retail/v2beta/retail-gen.go index d47e6ab5bdb..e11ba13bd07 100644 --- a/retail/v2beta/retail-gen.go +++ b/retail/v2beta/retail-gen.go @@ -1008,6 +1008,38 @@ type GoogleCloudRetailV2alphaAddLocalInventoriesMetadata struct { type GoogleCloudRetailV2alphaAddLocalInventoriesResponse struct { } +// GoogleCloudRetailV2alphaCreateModelMetadata: Metadata associated with +// a create operation. +type GoogleCloudRetailV2alphaCreateModelMetadata struct { + // Model: The resource name of the model that this create applies to. + // Format: + // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id + // }/models/{model_id} + Model string `json:"model,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Model") 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. "Model") 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 *GoogleCloudRetailV2alphaCreateModelMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaCreateModelMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaExportErrorsConfig: Configuration of // destination for Export related errors. type GoogleCloudRetailV2alphaExportErrorsConfig struct { @@ -1339,6 +1371,330 @@ func (s *GoogleCloudRetailV2alphaImportUserEventsResponse) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2alphaModel: Metadata that describes the training +// and serving parameters of a Model. A Model can be associated with a +// ServingConfig and then queried through the Predict api. +type GoogleCloudRetailV2alphaModel struct { + // CreateTime: Output only. Timestamp the Recommendation Model was + // created at. + CreateTime string `json:"createTime,omitempty"` + + // DataState: Output only. The state of data requirements for this + // model: DATA_OK and DATA_ERROR. Recommendation model cannot be trained + // if the data is in DATA_ERROR state. Recommendation model can have + // DATA_ERROR state even if serving state is ACTIVE: models were trained + // successfully before, but cannot be refreshed because model no longer + // has sufficient data for training. + // + // Possible values: + // "DATA_STATE_UNSPECIFIED" - Unspecified default value - should never + // be explicitly set. + // "DATA_OK" - The model has sufficient training data. + // "DATA_ERROR" - The model does not have sufficient training data. + // Error messages can be queried via Stackdriver. + DataState string `json:"dataState,omitempty"` + + // DisplayName: Required. The display name of the model. Should be human + // readable, used to display Recommendation Models in the Retail + // Pantheon Dashboard. UTF-8 encoded string with limit of 1024 + // characters. + DisplayName string `json:"displayName,omitempty"` + + // FilteringOption: Optional. If RECOMMENDATIONS_FILTERING_ENABLED, + // recommendation filtering by attributes is enabled for the model. + // + // Possible values: + // "RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED" - Value used when + // unset. Defaults to RECOMMENDATIONS_FILTERING_DISABLED. + // "RECOMMENDATIONS_FILTERING_DISABLED" - Recommendation filtering is + // disabled. + // "RECOMMENDATIONS_FILTERING_ENABLED" - Recommendation filtering is + // enabled. + FilteringOption string `json:"filteringOption,omitempty"` + + // LastTuneTime: Output only. The timestamp when the latest successful + // tune finished. + LastTuneTime string `json:"lastTuneTime,omitempty"` + + // Name: Required. The fully qualified resource name of the model. + // Format: + // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id + // }/models/{model_id} catalog_id has char limit of 50. + // recommendation_model_id has char limit of 40. + Name string `json:"name,omitempty"` + + // OptimizationObjective: Optional. The optimization objective e.g. + // `cvr`. Currently supported values: `ctr`, `cvr`, `revenue-per-order`. + // If not specified, we choose default based on model type. Default + // depends on type of recommendation: `recommended-for-you` => `ctr` + // `others-you-may-like` => `ctr` `frequently-bought-together` => + // `revenue_per_order` + OptimizationObjective string `json:"optimizationObjective,omitempty"` + + // PageOptimizationConfig: Optional. The page optimization config. + PageOptimizationConfig *GoogleCloudRetailV2alphaModelPageOptimizationConfig `json:"pageOptimizationConfig,omitempty"` + + // PeriodicTuningState: Optional. The state of periodic tuning. The + // period we use is 3 months - to do a one-off tune earlier use the + // TuneModel method. Default value is PERIODIC_TUNING_ENABLED. + // + // Possible values: + // "PERIODIC_TUNING_STATE_UNSPECIFIED" - Unspecified default value - + // should never be explicitly set. + // "PERIODIC_TUNING_DISABLED" - The model has periodic tuning + // disabled. Tuning can be reenabled by calling the + // EnableModelPeriodicTuning method or by calling the TuneModel method. + // "ALL_TUNING_DISABLED" - The model cannot be tuned with periodic + // tuning OR the TuneModel method. Hide the options in customer UI and + // reject any requests through the backend self serve API. + // "PERIODIC_TUNING_ENABLED" - The model has periodic tuning enabled. + // Tuning can be disabled by calling the DisableModelPeriodicTuning + // method. + PeriodicTuningState string `json:"periodicTuningState,omitempty"` + + // ServingState: Output only. The serving state of the model: ACTIVE, + // NOT_ACTIVE. + // + // Possible values: + // "SERVING_STATE_UNSPECIFIED" - Unspecified serving state. + // "INACTIVE" - The model is not serving. + // "ACTIVE" - The model is serving and can be queried. + // "TUNED" - The model is trained on tuned hyperparameters, and can be + // queried. + ServingState string `json:"servingState,omitempty"` + + // TrainingState: Optional. The training state that the model is in + // (e.g. TRAINING or PAUSED). Since part of the cost of running the + // service is frequency of training - this can be used to determine when + // to train model in order to control cost. If not specified: the + // default value for CreateModel method is TRAINING. the default value + // for UpdateModel method is to keep the state the same as before. + // + // Possible values: + // "TRAINING_STATE_UNSPECIFIED" - Unspecified training state. + // "PAUSED" - The model training is paused. + // "TRAINING" - The model is training. + TrainingState string `json:"trainingState,omitempty"` + + // TuningOperation: Output only. The tune operation associated with the + // model. Can be used to determine if there is an ongoing tune for this + // recommendation. Empty field implies no tune is goig on. + TuningOperation string `json:"tuningOperation,omitempty"` + + // Type: Required. The type of model e.g. `home-page`. Currently + // supported values: `recommended-for-you`, `others-you-may-like`, + // `frequently-bought-together`, `page-optimization`, 'similar-items', + // 'buy-it-again', `recently-viewed`(readonly value). + Type string `json:"type,omitempty"` + + // UpdateTime: Output only. Timestamp the Recommendation Model was last + // updated. E.g. if a Recommendation Model was paused - this would be + // the time the pause was initiated. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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 *GoogleCloudRetailV2alphaModel) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaModel + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaModelPageOptimizationConfig: The +// PageOptimizationConfig for model training. This determines how many +// panels to optimize for, and which serving configurations to consider +// for each panel. The purpose of this model is to optimize which +// ServingConfig to show on which panels in way that optimizes the +// visitors shopping journey. +type GoogleCloudRetailV2alphaModelPageOptimizationConfig struct { + // PageOptimizationEventType: Required. The type of UserEvent this page + // optimization is shown for. Each page has an associated event type - + // this will be the corresponding event type for the page that the page + // optimization model is used on. Supported types: * `add-to-cart`: + // Products being added to cart. * `detail-page-view`: Products detail + // page viewed. * `home-page-view`: Homepage viewed * + // `category-page-view`: Homepage viewed * `shopping-cart-page-view`: + // User viewing a shopping cart. `home-page-view` only allows models + // with type `recommended-for-you`. All other + // page_optimization_event_type allow all Model.types. + PageOptimizationEventType string `json:"pageOptimizationEventType,omitempty"` + + // Panels: Required. A list of panel configurations. Limit = 5. + Panels []*GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel `json:"panels,omitempty"` + + // Restriction: Optional. How to restrict results across panels e.g. can + // the same ServingConfig be shown on multiple panels at once. If + // unspecified, default to `UNIQUE_MODEL_RESTRICTION`. + // + // Possible values: + // "RESTRICTION_UNSPECIFIED" - Unspecified value for restriction. + // "NO_RESTRICTION" - Allow any ServingConfig to be show on any number + // of panels. Example: `Panel1 candidates`: pdp_ctr, pdp_cvr, + // home_page_ctr_no_diversity `Panel2 candidates`: + // home_page_ctr_no_diversity, home_page_ctr_diversity, + // pdp_cvr_no_diversity `Restriction` = NO_RESTRICTION `Valid + // combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, + // home_page_ctr_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * + // (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, + // home_page_ctr_diversity) * (pdp_cvr, pdp_cvr_no_diversity) * + // (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * + // (home_page_ctr_no_diversity, home_page_ctr_diversity) * + // (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid + // combinations`: [] + // "UNIQUE_SERVING_CONFIG_RESTRICTION" - Do not allow the same + // ServingConfig.name to be shown on multiple panels. Example: `Panel1 + // candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * `Panel2 + // candidates`: * home_page_ctr_no_diversity, + // home_page_ctr_diversity_low, pdp_cvr_no_diversity * `Restriction` = + // UNIQUE_SERVING_CONFIG_RESTRICTION `Valid combinations`: * * (pdp_ctr, + // home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity_low) + // * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * + // (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, + // home_page_ctr_diversity_low) * (pdp_cvr, pdp_cvr_no_diversity) * + // (home_page_ctr_no_diversity, home_page_ctr_diversity_low) * + // (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid + // combinations`: * * (home_page_ctr_no_diversity, + // home_page_ctr_no_diversity) * + // "UNIQUE_MODEL_RESTRICTION" - Do not allow multiple ServingConfigs + // with same Model.name to be show on on different panels. Example: + // `Panel1 candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * + // `Panel2 candidates`: * home_page_ctr_no_diversity, + // home_page_ctr_diversity_low, pdp_cvr_no_diversity * `Restriction` = + // UNIQUE_MODEL_RESTRICTION `Valid combinations`: * * (pdp_ctr, + // home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity) * + // (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * + // (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, + // home_page_ctr_diversity_low) * (home_page_ctr_no_diversity, + // pdp_cvr_no_diversity) * `Invalid combinations`: * * + // (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * (pdp_cvr, + // pdp_cvr_no_diversity) * + // "UNIQUE_MODEL_TYPE_RESTRICTION" - Do not allow multiple + // ServingConfigs with same Model.type to be shown on different panels. + // Example: `Panel1 candidates`: * pdp_ctr, pdp_cvr, + // home_page_ctr_no_diversity * `Panel2 candidates`: * + // home_page_ctr_no_diversity, home_page_ctr_diversity_low, + // pdp_cvr_no_diversity * `Restriction` = UNIQUE_MODEL_RESTRICTION + // `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * + // (pdp_ctr, home_page_ctr_diversity) * (pdp_cvr, + // home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity_low) + // * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid + // combinations`: * * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, + // pdp_cvr_no_diversity) * (pdp_cvr, pdp_cvr_no_diversity) * + // (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * + // (home_page_ctr_no_diversity, home_page_ctr_diversity) * + Restriction string `json:"restriction,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "PageOptimizationEventType") 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. + // "PageOptimizationEventType") 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 *GoogleCloudRetailV2alphaModelPageOptimizationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaModelPageOptimizationConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate: A +// candidate to consider for a given panel. Currently only ServingConfig +// are valid candidates. +type GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate struct { + // ServingConfigId: This has to be a valid ServingConfig identifier. + // e.g. for a ServingConfig with full name: + // `projects/*/locations/global/catalogs/default_catalog/servingConfigs/m + // y_candidate_config` this would be 'my_candidate_config' + ServingConfigId string `json:"servingConfigId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ServingConfigId") 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. "ServingConfigId") 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 *GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel: An +// individual panel with a list of ServingConfigs to consider for it. +type GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel struct { + // Candidates: Required. The candidates to consider on the panel. Limit + // = 10. + Candidates []*GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate `json:"candidates,omitempty"` + + // DefaultCandidate: Required. The default candidate (in case the model + // fails at serving time, we can fall back to the default). + DefaultCandidate *GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate `json:"defaultCandidate,omitempty"` + + // DisplayName: Optional. The name to display for the panel. + DisplayName string `json:"displayName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Candidates") 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. "Candidates") 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 *GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaPurgeMetadata: Metadata related to the // progress of the Purge operation. This will be returned by the // google.longrunning.Operation.metadata field. @@ -1534,6 +1890,43 @@ type GoogleCloudRetailV2alphaSetInventoryMetadata struct { type GoogleCloudRetailV2alphaSetInventoryResponse struct { } +// GoogleCloudRetailV2alphaTuneModelMetadata: Metadata associated with a +// tune operation. +type GoogleCloudRetailV2alphaTuneModelMetadata struct { + // Model: The resource name of the model that this tune applies to. + // Format: + // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id + // }/models/{model_id} + Model string `json:"model,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Model") 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. "Model") 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 *GoogleCloudRetailV2alphaTuneModelMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaTuneModelMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaTuneModelResponse: Response associated with a +// tune operation. +type GoogleCloudRetailV2alphaTuneModelResponse struct { +} + // GoogleCloudRetailV2alphaUserEventImportSummary: A summary of import // result. The UserEventImportSummary summarizes the import status for // user events. @@ -2221,9 +2614,8 @@ type GoogleCloudRetailV2betaCompleteQueryResponseCompletionResult struct { // 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. This is an experimental - // feature. Contact Retail Search support team if you are interested in - // enabling it. + // attributes generated by Cloud Retail. It requires + // UserEvent.product_details is imported properly. Attributes map[string]GoogleCloudRetailV2betaCustomAttribute `json:"attributes,omitempty"` // Suggestion: The suggestion for the query. @@ -3718,7 +4110,7 @@ type GoogleCloudRetailV2betaPredictRequest struct { // results instead. Note that the API will never return items with // storageStatus of "EXPIRED" or "DELETED" regardless of filter choices. // If `filterSyntaxV2` is set to true under the `params` field, then - // attribute based expressions are expected instead of the above + // attribute-based expressions are expected instead of the above // described tag-based syntax. Examples: * (colors: ANY("Red", "Blue")) // AND NOT (categories: ANY("Phones")) * (availability: ANY("IN_STOCK")) // AND (colors: ANY("Red") OR categories: ANY("Phones")) @@ -3745,7 +4137,7 @@ type GoogleCloudRetailV2betaPredictRequest struct { // is 100. Values above 100 will be coerced to 100. PageSize int64 `json:"pageSize,omitempty"` - // PageToken: This field is not used for now, please leave it unset. + // PageToken: This field is not used for now, leave it unset. PageToken string `json:"pageToken,omitempty"` // Params: Additional domain specific parameters for the predictions. @@ -3769,8 +4161,8 @@ type GoogleCloudRetailV2betaPredictRequest struct { // 'high-diversity', 'auto-diversity'}. This gives request-level control // and adjusts prediction results based on product category. * // `filterSyntaxV2`: Boolean. False by default. If set to true, the - // `filter` field will be interpreteted according to the new, - // attribute-based syntax. + // `filter` field is interpreteted according to the new, attribute-based + // syntax. Params googleapi.RawMessage `json:"params,omitempty"` // UserEvent: Required. Context about the user, what they are looking at @@ -5241,14 +5633,14 @@ func (s *GoogleCloudRetailV2betaRuleDoNotAssociateAction) MarshalJSON() ([]byte, } // GoogleCloudRetailV2betaRuleFilterAction: * Rule Condition: - No -// Condition provided is a global match. - 1 or more Condition provided -// is combined with OR operator. * Action Input: The request query and -// filter that will be applied to the retrieved products, in addition to -// any filters already provided with the SearchRequest. The AND operator -// is used to combine the query's existing filters with the filter -// rule(s). NOTE: May result in 0 results when filters conflict. * -// Action Result: Filters the returned objects to be ONLY those that -// passed the filter. +// Condition.query_terms provided is a global match. - 1 or more +// Condition.query_terms provided is combined with OR operator. * Action +// Input: The request query and filter that are applied to the retrieved +// products, in addition to any filters already provided with the +// SearchRequest. The AND operator is used to combine the query's +// existing filters with the filter rule(s). NOTE: May result in 0 +// results when filters conflict. * Action Result: Filters the returned +// objects to be ONLY those that passed the filter. type GoogleCloudRetailV2betaRuleFilterAction struct { // Filter: A filter to apply on the matching condition results. // Supported features: * filter must be set. * Filter syntax is @@ -5353,9 +5745,9 @@ func (s *GoogleCloudRetailV2betaRuleOnewaySynonymsAction) MarshalJSON() ([]byte, } // GoogleCloudRetailV2betaRuleRedirectAction: Redirects a shopper to a -// specific page. * Rule Condition: - Must specify Condition. * Action -// Input: Request Query * Action Result: Redirects shopper to provided -// uri. +// specific page. * Rule Condition: - Must specify +// Condition.query_terms. * Action Input: Request Query * Action Result: +// Redirects shopper to provided uri. type GoogleCloudRetailV2betaRuleRedirectAction struct { // RedirectUri: URL must have length equal or less than 2000 characters. RedirectUri string `json:"redirectUri,omitempty"` @@ -6115,8 +6507,7 @@ type GoogleCloudRetailV2betaSearchResponse struct { // CorrectedQuery: Contains the spell corrected query, if found. If the // spell correction type is AUTOMATIC, then the search results are based - // on corrected_query. Otherwise the original query will be used for - // search. + // on corrected_query. Otherwise the original query is used for search. CorrectedQuery string `json:"correctedQuery,omitempty"` // Facets: Results of facets requested by user. @@ -12517,10 +12908,10 @@ type ProjectsLocationsCatalogsPlacementsPredictCall struct { // Predict: Makes a recommendation prediction. // // - placement: Full resource name of the format: -// {placement=projects/*/locations/global/catalogs/default_catalog/serv -// ingConfigs/*} or -// {placement=projects/*/locations/global/catalogs/default_catalog/plac -// ements/*}. We recommend using the `servingConfigs` resource. +// `{placement=projects/*/locations/global/catalogs/default_catalog/ser +// vingConfigs/*}` or +// `{placement=projects/*/locations/global/catalogs/default_catalog/pla +// cements/*}`. We recommend using the `servingConfigs` resource. // `placements` is a legacy resource. The ID of the Recommendations AI // serving config or placement. Before you can request predictions // from your model, you must create at least one serving config or @@ -12637,7 +13028,7 @@ func (c *ProjectsLocationsCatalogsPlacementsPredictCall) Do(opts ...googleapi.Ca // ], // "parameters": { // "placement": { - // "description": "Required. Full resource name of the format: {placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} or {placement=projects/*/locations/global/catalogs/default_catalog/placements/*}. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", + // "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", // "required": true, @@ -13800,10 +14191,10 @@ type ProjectsLocationsCatalogsServingConfigsPredictCall struct { // Predict: Makes a recommendation prediction. // // - placement: Full resource name of the format: -// {placement=projects/*/locations/global/catalogs/default_catalog/serv -// ingConfigs/*} or -// {placement=projects/*/locations/global/catalogs/default_catalog/plac -// ements/*}. We recommend using the `servingConfigs` resource. +// `{placement=projects/*/locations/global/catalogs/default_catalog/ser +// vingConfigs/*}` or +// `{placement=projects/*/locations/global/catalogs/default_catalog/pla +// cements/*}`. We recommend using the `servingConfigs` resource. // `placements` is a legacy resource. The ID of the Recommendations AI // serving config or placement. Before you can request predictions // from your model, you must create at least one serving config or @@ -13920,7 +14311,7 @@ func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) Do(opts ...googleap // ], // "parameters": { // "placement": { - // "description": "Required. Full resource name of the format: {placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} or {placement=projects/*/locations/global/catalogs/default_catalog/placements/*}. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", + // "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", // "required": true, diff --git a/spanner/v1/spanner-api.json b/spanner/v1/spanner-api.json index 10cc9594fc6..a16ad77385e 100644 --- a/spanner/v1/spanner-api.json +++ b/spanner/v1/spanner-api.json @@ -1468,6 +1468,35 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/spanner.admin" ] + }, + "testIamPermissions": { + "description": "Returns permissions that the caller has on the specified database or backup resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing instance.", + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/databaseRoles/{databaseRolesId}:testIamPermissions", + "httpMethod": "POST", + "id": "spanner.projects.instances.databases.databaseRoles.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for database resources.", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/databaseRoles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ] } } }, @@ -2233,7 +2262,7 @@ } } }, - "revision": "20220615", + "revision": "20220718", "rootUrl": "https://spanner.googleapis.com/", "schemas": { "Backup": { diff --git a/spanner/v1/spanner-gen.go b/spanner/v1/spanner-gen.go index 070923bc86a..266cf71ae7b 100644 --- a/spanner/v1/spanner-gen.go +++ b/spanner/v1/spanner-gen.go @@ -12482,6 +12482,159 @@ func (c *ProjectsInstancesDatabasesDatabaseRolesListCall) Pages(ctx context.Cont } } +// method id "spanner.projects.instances.databases.databaseRoles.testIamPermissions": + +type ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that the caller has on the +// specified database or backup resource. Attempting this RPC on a +// non-existent Cloud Spanner database will result in a NOT_FOUND error +// if the user has `spanner.databases.list` permission on the containing +// Cloud Spanner instance. Otherwise returns an empty set of +// permissions. Calling this method on a backup that does not exist will +// result in a NOT_FOUND error if the user has `spanner.backups.list` +// permission on the containing instance. +// +// - resource: REQUIRED: The Cloud Spanner resource for which +// permissions are being tested. The format is `projects//instances/` +// for instance resources and `projects//instances//databases/` for +// database resources. +func (r *ProjectsInstancesDatabasesDatabaseRolesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall { + c := &ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + 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 *ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall { + 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 *ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall { + 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 *ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall) 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.testiampermissionsrequest) + 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, "v1/{+resource}:testIamPermissions") + 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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "spanner.projects.instances.databases.databaseRoles.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.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 *ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, 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 := &TestIamPermissionsResponse{ + 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": "Returns permissions that the caller has on the specified database or backup resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing instance.", + // "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/databaseRoles/{databaseRolesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "spanner.projects.instances.databases.databaseRoles.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for database resources.", + // "location": "path", + // "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/databaseRoles/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/spanner.admin" + // ] + // } + +} + // method id "spanner.projects.instances.databases.operations.cancel": type ProjectsInstancesDatabasesOperationsCancelCall struct { diff --git a/streetviewpublish/v1/streetviewpublish-api.json b/streetviewpublish/v1/streetviewpublish-api.json index 0fc84b1aac3..c0490b43eec 100644 --- a/streetviewpublish/v1/streetviewpublish-api.json +++ b/streetviewpublish/v1/streetviewpublish-api.json @@ -533,7 +533,7 @@ } } }, - "revision": "20220718", + "revision": "20220719", "rootUrl": "https://streetviewpublish.googleapis.com/", "schemas": { "BatchDeletePhotosRequest": { @@ -624,7 +624,7 @@ "type": "object" }, "GpsDataGapFailureDetails": { - "description": "Details related to ProcessingFailureReason#GPS_DATA_GAP.", + "description": "Details related to ProcessingFailureReason#GPS_DATA_GAP. If there are multiple GPS data gaps, only the one with the largest duration is reported here.", "id": "GpsDataGapFailureDetails", "properties": { "gapDuration": { @@ -669,7 +669,7 @@ "type": "object" }, "ImuDataGapFailureDetails": { - "description": "Details related to ProcessingFailureReason#IMU_DATA_GAP.", + "description": "Details related to ProcessingFailureReason#IMU_DATA_GAP. If there are multiple IMU data gaps, only the one with the largest duration is reported here.", "id": "ImuDataGapFailureDetails", "properties": { "gapDuration": { @@ -809,7 +809,7 @@ "type": "object" }, "NotOutdoorsFailureDetails": { - "description": "Details related to ProcessingFailureReason#NOT_OUTDOORS.", + "description": "Details related to ProcessingFailureReason#NOT_OUTDOORS. If there are multiple indoor frames found, the first frame is recorded here.", "id": "NotOutdoorsFailureDetails", "properties": { "time": { diff --git a/streetviewpublish/v1/streetviewpublish-gen.go b/streetviewpublish/v1/streetviewpublish-gen.go index 6a6f30f9239..f65007acd7b 100644 --- a/streetviewpublish/v1/streetviewpublish-gen.go +++ b/streetviewpublish/v1/streetviewpublish-gen.go @@ -384,7 +384,8 @@ type Empty struct { } // GpsDataGapFailureDetails: Details related to -// ProcessingFailureReason#GPS_DATA_GAP. +// ProcessingFailureReason#GPS_DATA_GAP. If there are multiple GPS data +// gaps, only the one with the largest duration is reported here. type GpsDataGapFailureDetails struct { // GapDuration: The duration of the gap in GPS data that was found. GapDuration string `json:"gapDuration,omitempty"` @@ -454,7 +455,8 @@ func (s *Imu) MarshalJSON() ([]byte, error) { } // ImuDataGapFailureDetails: Details related to -// ProcessingFailureReason#IMU_DATA_GAP. +// ProcessingFailureReason#IMU_DATA_GAP. If there are multiple IMU data +// gaps, only the one with the largest duration is reported here. type ImuDataGapFailureDetails struct { // GapDuration: The duration of the gap in IMU data that was found. GapDuration string `json:"gapDuration,omitempty"` @@ -790,7 +792,8 @@ func (s *Measurement3d) UnmarshalJSON(data []byte) error { } // NotOutdoorsFailureDetails: Details related to -// ProcessingFailureReason#NOT_OUTDOORS. +// ProcessingFailureReason#NOT_OUTDOORS. If there are multiple indoor +// frames found, the first frame is recorded here. type NotOutdoorsFailureDetails struct { // Time: Relative time (from the start of the video stream) when an // indoor frame was found. diff --git a/youtube/v3/youtube-api.json b/youtube/v3/youtube-api.json index 5200a051713..0919d461a6d 100644 --- a/youtube/v3/youtube-api.json +++ b/youtube/v3/youtube-api.json @@ -3829,7 +3829,7 @@ } } }, - "revision": "20220713", + "revision": "20220719", "rootUrl": "https://youtube.googleapis.com/", "schemas": { "AbuseReport": { @@ -7846,29 +7846,14 @@ "type": "boolean" }, "enableContentEncryption": { - "annotations": { - "required": [ - "youtube.liveBroadcasts.update" - ] - }, "description": "This setting indicates whether YouTube should enable content encryption for the broadcast.", "type": "boolean" }, "enableDvr": { - "annotations": { - "required": [ - "youtube.liveBroadcasts.update" - ] - }, "description": "This setting determines whether viewers can access DVR controls while watching the video. DVR controls enable the viewer to control the video playback experience by pausing, rewinding, or fast forwarding content. The default value for this property is true. *Important:* You must set the value to true and also set the enableArchive property's value to true if you want to make playback available immediately after the broadcast ends.", "type": "boolean" }, "enableEmbed": { - "annotations": { - "required": [ - "youtube.liveBroadcasts.update" - ] - }, "description": "This setting indicates whether the broadcast video can be played in an embedded player. If you choose to archive the video (using the enableArchive property), this setting will also apply to the archived video.", "type": "boolean" }, @@ -7918,20 +7903,10 @@ "type": "string" }, "recordFromStart": { - "annotations": { - "required": [ - "youtube.liveBroadcasts.update" - ] - }, "description": "Automatically start recording after the event goes live. The default value for this property is true. *Important:* You must also set the enableDvr property's value to true if you want the playback to be available immediately after the broadcast ends. If you set this property's value to true but do not also set the enableDvr property to true, there may be a delay of around one day before the archived video will be available for playback.", "type": "boolean" }, "startWithSlate": { - "annotations": { - "required": [ - "youtube.liveBroadcasts.update" - ] - }, "description": "This setting indicates whether the broadcast should automatically begin with an in-stream slate when you update the broadcast's status to live. After updating the status, you then need to send a liveCuepoints.insert request that sets the cuepoint's eventState to end to remove the in-stream slate and make your broadcast stream visible to viewers.", "type": "boolean" },