From d9a7f61a546274c302b520b938903e3c97e42c45 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 3 Aug 2022 07:13:38 +0000 Subject: [PATCH] feat(all): auto-regenerate discovery clients --- .../v1alpha/analyticsadmin-api.json | 6 +- analyticsadmin/v1alpha/analyticsadmin-gen.go | 10 +- .../v1/androidmanagement-api.json | 10 +- androidmanagement/v1/androidmanagement-gen.go | 7 +- api-list.json | 15 + apigee/v1/apigee-api.json | 4 +- apigee/v1/apigee-gen.go | 2 +- cloudasset/v1/cloudasset-api.json | 4 +- cloudasset/v1/cloudasset-gen.go | 2 +- cloudidentity/v1beta1/cloudidentity-api.json | 17 +- cloudidentity/v1beta1/cloudidentity-gen.go | 15 +- cloudtasks/v2/cloudtasks-api.json | 4 +- cloudtasks/v2/cloudtasks-gen.go | 22 +- cloudtasks/v2beta2/cloudtasks-api.json | 4 +- cloudtasks/v2beta2/cloudtasks-gen.go | 22 +- cloudtasks/v2beta3/cloudtasks-api.json | 4 +- cloudtasks/v2beta3/cloudtasks-gen.go | 22 +- composer/v1/composer-api.json | 4 +- composer/v1/composer-gen.go | 6 +- composer/v1beta1/composer-api.json | 4 +- composer/v1beta1/composer-gen.go | 6 +- dataflow/v1b3/dataflow-api.json | 8 +- dataflow/v1b3/dataflow-gen.go | 1 + dataproc/v1/dataproc-api.json | 11 +- dataproc/v1/dataproc-gen.go | 15 + displayvideo/v1/displayvideo-api.json | 16 +- displayvideo/v1/displayvideo-gen.go | 40 +- dlp/v2/dlp-api.json | 268 +- dlp/v2/dlp-gen.go | 732 +- dns/v1/dns-api.json | 107 +- dns/v1/dns-gen.go | 216 +- dns/v1beta2/dns-api.json | 107 +- dns/v1beta2/dns-gen.go | 216 +- drivelabels/v2beta/drivelabels-api.json | 2902 +++++++ drivelabels/v2beta/drivelabels-gen.go | 7680 +++++++++++++++++ iap/v1/iap-api.json | 4 +- iap/v1/iap-gen.go | 6 +- language/v1beta2/language-api.json | 4 +- language/v1beta2/language-gen.go | 2 +- memcache/v1/memcache-api.json | 12 +- memcache/v1/memcache-gen.go | 14 + memcache/v1beta2/memcache-api.json | 12 +- memcache/v1beta2/memcache-gen.go | 14 + notebooks/v1/notebooks-api.json | 4 +- notebooks/v1/notebooks-gen.go | 4 +- ondemandscanning/v1/ondemandscanning-api.json | 6 +- ondemandscanning/v1/ondemandscanning-gen.go | 2 +- .../v1beta1/ondemandscanning-api.json | 6 +- .../v1beta1/ondemandscanning-gen.go | 2 +- realtimebidding/v1/realtimebidding-api.json | 4 +- realtimebidding/v1/realtimebidding-gen.go | 2 +- .../v1/recaptchaenterprise-api.json | 48 +- .../v1/recaptchaenterprise-gen.go | 103 +- retail/v2/retail-api.json | 423 +- retail/v2/retail-gen.go | 1845 +++- retail/v2alpha/retail-api.json | 139 +- retail/v2alpha/retail-gen.go | 353 +- retail/v2beta/retail-api.json | 139 +- retail/v2beta/retail-gen.go | 353 +- securitycenter/v1/securitycenter-api.json | 46 +- securitycenter/v1/securitycenter-gen.go | 76 +- .../v1beta1/securitycenter-api.json | 46 +- securitycenter/v1beta1/securitycenter-gen.go | 76 +- .../v1beta2/securitycenter-api.json | 46 +- securitycenter/v1beta2/securitycenter-gen.go | 76 +- trafficdirector/v2/trafficdirector-api.json | 4 +- trafficdirector/v2/trafficdirector-gen.go | 8 +- 67 files changed, 15414 insertions(+), 974 deletions(-) create mode 100644 drivelabels/v2beta/drivelabels-api.json create mode 100644 drivelabels/v2beta/drivelabels-gen.go diff --git a/analyticsadmin/v1alpha/analyticsadmin-api.json b/analyticsadmin/v1alpha/analyticsadmin-api.json index bc5a09c5196..f1dc3c015be 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-api.json +++ b/analyticsadmin/v1alpha/analyticsadmin-api.json @@ -1052,7 +1052,7 @@ ] }, "get": { - "description": "Lookup for a single Audience.", + "description": "Lookup for a single Audience. Audiences created before 2020 may not be supported.", "flatPath": "v1alpha/properties/{propertiesId}/audiences/{audiencesId}", "httpMethod": "GET", "id": "analyticsadmin.properties.audiences.get", @@ -1078,7 +1078,7 @@ ] }, "list": { - "description": "Lists Audiences on a property.", + "description": "Lists Audiences on a property. Audiences created before 2020 may not be supported.", "flatPath": "v1alpha/properties/{propertiesId}/audiences", "httpMethod": "GET", "id": "analyticsadmin.properties.audiences.list", @@ -2773,7 +2773,7 @@ } } }, - "revision": "20220727", + "revision": "20220802", "rootUrl": "https://analyticsadmin.googleapis.com/", "schemas": { "GoogleAnalyticsAdminV1alphaAccount": { diff --git a/analyticsadmin/v1alpha/analyticsadmin-gen.go b/analyticsadmin/v1alpha/analyticsadmin-gen.go index dd61d5a8101..cf81863d236 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-gen.go +++ b/analyticsadmin/v1alpha/analyticsadmin-gen.go @@ -8931,7 +8931,8 @@ type PropertiesAudiencesGetCall struct { header_ http.Header } -// Get: Lookup for a single Audience. +// Get: Lookup for a single Audience. Audiences created before 2020 may +// not be supported. // // - name: The name of the Audience to get. Example format: // properties/1234/audiences/5678. @@ -9041,7 +9042,7 @@ func (c *PropertiesAudiencesGetCall) Do(opts ...googleapi.CallOption) (*GoogleAn } return ret, nil // { - // "description": "Lookup for a single Audience.", + // "description": "Lookup for a single Audience. Audiences created before 2020 may not be supported.", // "flatPath": "v1alpha/properties/{propertiesId}/audiences/{audiencesId}", // "httpMethod": "GET", // "id": "analyticsadmin.properties.audiences.get", @@ -9080,7 +9081,8 @@ type PropertiesAudiencesListCall struct { header_ http.Header } -// List: Lists Audiences on a property. +// List: Lists Audiences on a property. Audiences created before 2020 +// may not be supported. // // - parent: Example format: properties/1234. func (r *PropertiesAudiencesService) List(parent string) *PropertiesAudiencesListCall { @@ -9209,7 +9211,7 @@ func (c *PropertiesAudiencesListCall) Do(opts ...googleapi.CallOption) (*GoogleA } return ret, nil // { - // "description": "Lists Audiences on a property.", + // "description": "Lists Audiences on a property. Audiences created before 2020 may not be supported.", // "flatPath": "v1alpha/properties/{propertiesId}/audiences", // "httpMethod": "GET", // "id": "analyticsadmin.properties.audiences.list", diff --git a/androidmanagement/v1/androidmanagement-api.json b/androidmanagement/v1/androidmanagement-api.json index e8079647fe7..3d6967d90fc 100644 --- a/androidmanagement/v1/androidmanagement-api.json +++ b/androidmanagement/v1/androidmanagement-api.json @@ -1065,7 +1065,7 @@ } } }, - "revision": "20220704", + "revision": "20220725", "rootUrl": "https://androidmanagement.googleapis.com/", "schemas": { "AdbShellCommandEvent": { @@ -3617,14 +3617,16 @@ "PASSWORD_POLICIES_USER_CREDENTIALS_CONFIRMATION_REQUIRED", "PASSWORD_POLICIES_PASSWORD_EXPIRED", "PASSWORD_POLICIES_PASSWORD_NOT_SUFFICIENT", - "ONC_WIFI_INVALID_VALUE" + "ONC_WIFI_INVALID_VALUE", + "ONC_WIFI_API_LEVEL" ], "enumDescriptions": [ "Specific non-compliance reason is not specified. Fields in specific_non_compliance_context are not set.", "User needs to confirm credentials by entering the screen lock. Fields in specific_non_compliance_context are not set. nonComplianceReason is set to USER_ACTION.", "The device or profile password has expired. passwordPoliciesContext is set. nonComplianceReason is set to USER_ACTION.", "The device password does not satisfy password requirements. passwordPoliciesContext is set. nonComplianceReason is set to USER_ACTION.", - "There is an incorrect value in ONC Wi-Fi configuration. fieldPath specifies which field value is incorrect. oncWifiContext is set. nonComplianceReason is set to INVALID_VALUE." + "There is an incorrect value in ONC Wi-Fi configuration. fieldPath specifies which field value is incorrect. oncWifiContext is set. nonComplianceReason is set to INVALID_VALUE.", + "The ONC Wi-Fi setting is not supported in the API level of the Android version running on the device. fieldPath specifies which field value is not supported. oncWifiContext is set. nonComplianceReason is set to API_LEVEL." ], "type": "string" } @@ -4961,7 +4963,7 @@ "properties": { "oncWifiContext": { "$ref": "OncWifiContext", - "description": "Additional context for non-compliance related to Wi-Fi configuration. See ONC_WIFI_INVALID_VALUE." + "description": "Additional context for non-compliance related to Wi-Fi configuration. See ONC_WIFI_INVALID_VALUE and ONC_WIFI_API_LEVEL" }, "passwordPoliciesContext": { "$ref": "PasswordPoliciesContext", diff --git a/androidmanagement/v1/androidmanagement-gen.go b/androidmanagement/v1/androidmanagement-gen.go index 6c8cb3bdbce..aa37c3c4d60 100644 --- a/androidmanagement/v1/androidmanagement-gen.go +++ b/androidmanagement/v1/androidmanagement-gen.go @@ -3902,6 +3902,10 @@ type NonComplianceDetail struct { // "ONC_WIFI_INVALID_VALUE" - There is an incorrect value in ONC Wi-Fi // configuration. fieldPath specifies which field value is incorrect. // oncWifiContext is set. nonComplianceReason is set to INVALID_VALUE. + // "ONC_WIFI_API_LEVEL" - The ONC Wi-Fi setting is not supported in + // the API level of the Android version running on the device. fieldPath + // specifies which field value is not supported. oncWifiContext is set. + // nonComplianceReason is set to API_LEVEL. SpecificNonComplianceReason string `json:"specificNonComplianceReason,omitempty"` // ForceSendFields is a list of field names (e.g. "CurrentValue") to @@ -5709,7 +5713,8 @@ func (s *SoftwareInfo) MarshalJSON() ([]byte, error) { // SpecificNonComplianceReason. type SpecificNonComplianceContext struct { // OncWifiContext: Additional context for non-compliance related to - // Wi-Fi configuration. See ONC_WIFI_INVALID_VALUE. + // Wi-Fi configuration. See ONC_WIFI_INVALID_VALUE and + // ONC_WIFI_API_LEVEL OncWifiContext *OncWifiContext `json:"oncWifiContext,omitempty"` // PasswordPoliciesContext: Additional context for non-compliance diff --git a/api-list.json b/api-list.json index e03259f63cb..3c8aab49d4f 100644 --- a/api-list.json +++ b/api-list.json @@ -2451,6 +2451,21 @@ "documentationLink": "https://developers.google.com/drive/activity/", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "drivelabels:v2beta", + "name": "drivelabels", + "version": "v2beta", + "title": "Drive Labels API", + "description": "An API for managing Drive Labels", + "discoveryRestUrl": "https://drivelabels.googleapis.com/$discovery/rest?version=v2beta", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://developers.google.com/drive/labels", + "preferred": false + }, { "kind": "discovery#directoryItem", "id": "drivelabels:v2", diff --git a/apigee/v1/apigee-api.json b/apigee/v1/apigee-api.json index 62b577a187d..36665ade7ef 100644 --- a/apigee/v1/apigee-api.json +++ b/apigee/v1/apigee-api.json @@ -8515,7 +8515,7 @@ } } }, - "revision": "20220725", + "revision": "20220728", "rootUrl": "https://apigee.googleapis.com/", "schemas": { "EdgeConfigstoreBundleBadBundle": { @@ -11590,7 +11590,7 @@ "type": "array" }, "name": { - "description": "Required. Resource ID for this keystore. Values must match the regular expression `[\\w[:space:]-.]{1,255}`.", + "description": "Required. Resource ID for this keystore. Values must match the regular expression `[\\w[:space:].-]{1,255}`.", "type": "string" } }, diff --git a/apigee/v1/apigee-gen.go b/apigee/v1/apigee-gen.go index c501ee9ff10..fa283292868 100644 --- a/apigee/v1/apigee-gen.go +++ b/apigee/v1/apigee-gen.go @@ -5653,7 +5653,7 @@ type GoogleCloudApigeeV1Keystore struct { Aliases []string `json:"aliases,omitempty"` // Name: Required. Resource ID for this keystore. Values must match the - // regular expression `[\w[:space:]-.]{1,255}`. + // regular expression `[\w[:space:].-]{1,255}`. Name string `json:"name,omitempty"` // ServerResponse contains the HTTP response code and headers from the diff --git a/cloudasset/v1/cloudasset-api.json b/cloudasset/v1/cloudasset-api.json index 339f6258a20..725e172fb80 100644 --- a/cloudasset/v1/cloudasset-api.json +++ b/cloudasset/v1/cloudasset-api.json @@ -929,7 +929,7 @@ } } }, - "revision": "20220617", + "revision": "20220730", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AccessSelector": { @@ -3220,7 +3220,7 @@ "type": "object" }, "ResourceSearchResult": { - "description": "A result of Resource Search, containing information of a cloud resource. Next ID: 28", + "description": "A result of Resource Search, containing information of a cloud resource. Next ID: 29", "id": "ResourceSearchResult", "properties": { "additionalAttributes": { diff --git a/cloudasset/v1/cloudasset-gen.go b/cloudasset/v1/cloudasset-gen.go index af4c3b94723..1c99e5419fc 100644 --- a/cloudasset/v1/cloudasset-gen.go +++ b/cloudasset/v1/cloudasset-gen.go @@ -4842,7 +4842,7 @@ func (s *Resource) MarshalJSON() ([]byte, error) { } // ResourceSearchResult: A result of Resource Search, containing -// information of a cloud resource. Next ID: 28 +// information of a cloud resource. Next ID: 29 type ResourceSearchResult struct { // AdditionalAttributes: The additional searchable attributes of this // resource. The attributes may vary from one resource type to another. diff --git a/cloudidentity/v1beta1/cloudidentity-api.json b/cloudidentity/v1beta1/cloudidentity-api.json index 12f91652e4e..934feaced8b 100644 --- a/cloudidentity/v1beta1/cloudidentity-api.json +++ b/cloudidentity/v1beta1/cloudidentity-api.json @@ -158,7 +158,6 @@ "$ref": "Operation" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.userinvitations" ] }, @@ -184,7 +183,6 @@ "$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" ] @@ -211,7 +209,6 @@ "$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" ] @@ -259,7 +256,6 @@ "$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" ] @@ -289,7 +285,6 @@ "$ref": "Operation" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.userinvitations" ] } @@ -1570,10 +1565,7 @@ "path": "v1beta1/{+parent}/memberships", "response": { "$ref": "ListOrgMembershipsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-identity" - ] + } }, "move": { "description": "Move an OrgMembership to a new OrgUnit. NOTE: This is an atomic copy-and-delete. The resource will have a new copy under the destination OrgUnit and be deleted from the source OrgUnit. The resource can only be searched under the destination OrgUnit afterwards.", @@ -1598,17 +1590,14 @@ }, "response": { "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-identity" - ] + } } } } } } }, - "revision": "20220620", + "revision": "20220729", "rootUrl": "https://cloudidentity.googleapis.com/", "schemas": { "AndroidAttributes": { diff --git a/cloudidentity/v1beta1/cloudidentity-gen.go b/cloudidentity/v1beta1/cloudidentity-gen.go index 654a316fb77..8f340e09a24 100644 --- a/cloudidentity/v1beta1/cloudidentity-gen.go +++ b/cloudidentity/v1beta1/cloudidentity-gen.go @@ -3798,7 +3798,6 @@ func (c *CustomersUserinvitationsCancelCall) Do(opts ...googleapi.CallOption) (* // "$ref": "Operation" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.userinvitations" // ] // } @@ -3949,7 +3948,6 @@ func (c *CustomersUserinvitationsGetCall) Do(opts ...googleapi.CallOption) (*Use // "$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" // ] @@ -4105,7 +4103,6 @@ func (c *CustomersUserinvitationsIsInvitableUserCall) Do(opts ...googleapi.CallO // "$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" // ] @@ -4317,7 +4314,6 @@ func (c *CustomersUserinvitationsListCall) Do(opts ...googleapi.CallOption) (*Li // "$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" // ] @@ -4489,7 +4485,6 @@ func (c *CustomersUserinvitationsSendCall) Do(opts ...googleapi.CallOption) (*Op // "$ref": "Operation" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.userinvitations" // ] // } @@ -10708,10 +10703,7 @@ func (c *OrgUnitsMembershipsListCall) Do(opts ...googleapi.CallOption) (*ListOrg // "path": "v1beta1/{+parent}/memberships", // "response": { // "$ref": "ListOrgMembershipsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-identity" - // ] + // } // } } @@ -10888,10 +10880,7 @@ func (c *OrgUnitsMembershipsMoveCall) Do(opts ...googleapi.CallOption) (*Operati // }, // "response": { // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-identity" - // ] + // } // } } diff --git a/cloudtasks/v2/cloudtasks-api.json b/cloudtasks/v2/cloudtasks-api.json index c1aa44ce9eb..bde3855323f 100644 --- a/cloudtasks/v2/cloudtasks-api.json +++ b/cloudtasks/v2/cloudtasks-api.json @@ -685,7 +685,7 @@ } } }, - "revision": "20220520", + "revision": "20220803", "rootUrl": "https://cloudtasks.googleapis.com/", "schemas": { "AppEngineHttpRequest": { @@ -797,7 +797,7 @@ "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." }, "members": { - "description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", + "description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", "items": { "type": "string" }, diff --git a/cloudtasks/v2/cloudtasks-gen.go b/cloudtasks/v2/cloudtasks-gen.go index d0b8b731b90..f0fbfd5d82d 100644 --- a/cloudtasks/v2/cloudtasks-gen.go +++ b/cloudtasks/v2/cloudtasks-gen.go @@ -458,16 +458,20 @@ type Binding struct { // who is authenticated with a Google account or a service account. * // `user:{emailid}`: An email address that represents a specific Google // account. For example, `alice@example.com` . * - // `serviceAccount:{emailid}`: An email address that represents a + // `serviceAccount:{emailid}`: An email address that represents a Google // service account. For example, - // `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An - // email address that represents a Google group. For example, - // `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An - // email address (plus unique identifier) representing a user that has - // been recently deleted. For example, - // `alice@example.com?uid=123456789012345678901`. If the user is - // recovered, this value reverts to `user:{emailid}` and the recovered - // user retains the role in the binding. * + // `my-other-app@appspot.gserviceaccount.com`. * + // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: + // An identifier for a Kubernetes service account + // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). + // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. + // * `group:{emailid}`: An email address that represents a Google group. + // For example, `admins@example.com`. * + // `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus + // unique identifier) representing a user that has been recently + // deleted. For example, `alice@example.com?uid=123456789012345678901`. + // If the user is recovered, this value reverts to `user:{emailid}` and + // the recovered user retains the role in the binding. * // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address // (plus unique identifier) representing a service account that has been // recently deleted. For example, diff --git a/cloudtasks/v2beta2/cloudtasks-api.json b/cloudtasks/v2beta2/cloudtasks-api.json index 644d4acbed2..1047f91a468 100644 --- a/cloudtasks/v2beta2/cloudtasks-api.json +++ b/cloudtasks/v2beta2/cloudtasks-api.json @@ -837,7 +837,7 @@ } } }, - "revision": "20220726", + "revision": "20220803", "rootUrl": "https://cloudtasks.googleapis.com/", "schemas": { "AcknowledgeTaskRequest": { @@ -972,7 +972,7 @@ "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." }, "members": { - "description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", + "description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", "items": { "type": "string" }, diff --git a/cloudtasks/v2beta2/cloudtasks-gen.go b/cloudtasks/v2beta2/cloudtasks-gen.go index d66293a697b..f6b497388bd 100644 --- a/cloudtasks/v2beta2/cloudtasks-gen.go +++ b/cloudtasks/v2beta2/cloudtasks-gen.go @@ -545,16 +545,20 @@ type Binding struct { // who is authenticated with a Google account or a service account. * // `user:{emailid}`: An email address that represents a specific Google // account. For example, `alice@example.com` . * - // `serviceAccount:{emailid}`: An email address that represents a + // `serviceAccount:{emailid}`: An email address that represents a Google // service account. For example, - // `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An - // email address that represents a Google group. For example, - // `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An - // email address (plus unique identifier) representing a user that has - // been recently deleted. For example, - // `alice@example.com?uid=123456789012345678901`. If the user is - // recovered, this value reverts to `user:{emailid}` and the recovered - // user retains the role in the binding. * + // `my-other-app@appspot.gserviceaccount.com`. * + // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: + // An identifier for a Kubernetes service account + // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). + // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. + // * `group:{emailid}`: An email address that represents a Google group. + // For example, `admins@example.com`. * + // `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus + // unique identifier) representing a user that has been recently + // deleted. For example, `alice@example.com?uid=123456789012345678901`. + // If the user is recovered, this value reverts to `user:{emailid}` and + // the recovered user retains the role in the binding. * // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address // (plus unique identifier) representing a service account that has been // recently deleted. For example, diff --git a/cloudtasks/v2beta3/cloudtasks-api.json b/cloudtasks/v2beta3/cloudtasks-api.json index ec280828ae7..c26fcf3814e 100644 --- a/cloudtasks/v2beta3/cloudtasks-api.json +++ b/cloudtasks/v2beta3/cloudtasks-api.json @@ -697,7 +697,7 @@ } } }, - "revision": "20220520", + "revision": "20220803", "rootUrl": "https://cloudtasks.googleapis.com/", "schemas": { "AppEngineHttpQueue": { @@ -820,7 +820,7 @@ "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." }, "members": { - "description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", + "description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", "items": { "type": "string" }, diff --git a/cloudtasks/v2beta3/cloudtasks-gen.go b/cloudtasks/v2beta3/cloudtasks-gen.go index dd4b3dabc8d..72ec1810200 100644 --- a/cloudtasks/v2beta3/cloudtasks-gen.go +++ b/cloudtasks/v2beta3/cloudtasks-gen.go @@ -493,16 +493,20 @@ type Binding struct { // who is authenticated with a Google account or a service account. * // `user:{emailid}`: An email address that represents a specific Google // account. For example, `alice@example.com` . * - // `serviceAccount:{emailid}`: An email address that represents a + // `serviceAccount:{emailid}`: An email address that represents a Google // service account. For example, - // `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An - // email address that represents a Google group. For example, - // `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An - // email address (plus unique identifier) representing a user that has - // been recently deleted. For example, - // `alice@example.com?uid=123456789012345678901`. If the user is - // recovered, this value reverts to `user:{emailid}` and the recovered - // user retains the role in the binding. * + // `my-other-app@appspot.gserviceaccount.com`. * + // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: + // An identifier for a Kubernetes service account + // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). + // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. + // * `group:{emailid}`: An email address that represents a Google group. + // For example, `admins@example.com`. * + // `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus + // unique identifier) representing a user that has been recently + // deleted. For example, `alice@example.com?uid=123456789012345678901`. + // If the user is recovered, this value reverts to `user:{emailid}` and + // the recovered user retains the role in the binding. * // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address // (plus unique identifier) representing a service account that has been // recently deleted. For example, diff --git a/composer/v1/composer-api.json b/composer/v1/composer-api.json index e6d87b3fdc5..ad5cb2c1cc6 100644 --- a/composer/v1/composer-api.json +++ b/composer/v1/composer-api.json @@ -242,7 +242,7 @@ "type": "string" }, "updateMask": { - "description": "Required. A comma-separated list of paths, relative to `Environment`, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of numpy, the `updateMask` parameter would include the following two `paths` values: \"config.softwareConfig.pypiPackages.scikit-learn\" and \"config.softwareConfig.pypiPackages.numpy\". The included patch environment would specify the scikit-learn version as follows: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"scikit-learn\":\"==0.19.0\" } } } } Note that in the above example, any existing PyPI packages other than scikit-learn and numpy will be unaffected. Only one update type may be included in a single request's `updateMask`. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels \"label1\" and \"label2\" while clearing \"label3\" (assuming it already exists), one can provide the paths \"labels.label1\", \"labels.label2\", and \"labels.label3\" and populate the patch environment as follows: { \"labels\":{ \"label1\":\"new-label1-value\" \"label2\":\"new-label2-value\" } } Note that in the above example, any existing labels that are not included in the `updateMask` will be unaffected. It is also possible to replace an entire map field by providing the map field's path in the `updateMask`. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would contain the path \"config.softwareConfig.pypiPackages\", and the patch environment would be the following: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"botocore\":\"==1.7.14\" } } } } **Note:** Only the following fields can be updated: * `config.softwareConfig.pypiPackages` * Replace all custom custom PyPI packages. If a replacement package map is not included in `environment`, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package. * `config.softwareConfig.pypiPackages.`packagename * Update the custom PyPI package *packagename*, preserving other packages. To delete the package, include it in `updateMask`, and omit the mapping for it in `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask of this form and the `config.softwareConfig.pypiPackages` mask. * `labels` * Replace all environment labels. If a replacement labels map is not included in `environment`, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels. * `labels.`labelName * Set the label named *labelName*, while preserving other labels. To delete the label, include it in `updateMask` and omit its mapping in `environment.labels`. It is an error to provide both a mask of this form and the `labels` mask. * `config.nodeCount` * Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the `config.nodeCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerNetworkAccessControl` * Replace the environment's current `WebServerNetworkAccessControl`. * `config.softwareConfig.airflowConfigOverrides` * Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in `environment`, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides. * `config.softwareConfig.airflowConfigOverrides.`section-name * Override the Apache Airflow config property *name* in the section named *section*, preserving other properties. To delete the property override, include it in `updateMask` and omit its mapping in `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask of this form and the `config.softwareConfig.airflowConfigOverrides` mask. * `config.softwareConfig.envVariables` * Replace all environment variables. If a replacement environment variable map is not included in `environment`, all custom environment variables are cleared. It is an error to provide both this mask and a mask specifying one or more individual environment variables. * `config.softwareConfig.schedulerCount` * Horizontally scale the number of schedulers in Airflow. A positive integer not greater than the number of nodes must be provided in the `config.softwareConfig.schedulerCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. * `config.databaseConfig.machineType` * Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerConfig.machineType` * Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*.", + "description": "Required. A comma-separated list of paths, relative to `Environment`, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of numpy, the `updateMask` parameter would include the following two `paths` values: \"config.softwareConfig.pypiPackages.scikit-learn\" and \"config.softwareConfig.pypiPackages.numpy\". The included patch environment would specify the scikit-learn version as follows: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"scikit-learn\":\"==0.19.0\" } } } } Note that in the above example, any existing PyPI packages other than scikit-learn and numpy will be unaffected. Only one update type may be included in a single request's `updateMask`. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels \"label1\" and \"label2\" while clearing \"label3\" (assuming it already exists), one can provide the paths \"labels.label1\", \"labels.label2\", and \"labels.label3\" and populate the patch environment as follows: { \"labels\":{ \"label1\":\"new-label1-value\" \"label2\":\"new-label2-value\" } } Note that in the above example, any existing labels that are not included in the `updateMask` will be unaffected. It is also possible to replace an entire map field by providing the map field's path in the `updateMask`. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would contain the path \"config.softwareConfig.pypiPackages\", and the patch environment would be the following: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"botocore\":\"==1.7.14\" } } } } **Note:** Only the following fields can be updated: * `config.softwareConfig.pypiPackages` * Replace all custom custom PyPI packages. If a replacement package map is not included in `environment`, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package. * `config.softwareConfig.pypiPackages.`packagename * Update the custom PyPI package *packagename*, preserving other packages. To delete the package, include it in `updateMask`, and omit the mapping for it in `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask of this form and the `config.softwareConfig.pypiPackages` mask. * `labels` * Replace all environment labels. If a replacement labels map is not included in `environment`, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels. * `labels.`labelName * Set the label named *labelName*, while preserving other labels. To delete the label, include it in `updateMask` and omit its mapping in `environment.labels`. It is an error to provide both a mask of this form and the `labels` mask. * `config.nodeCount` * Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the `config.nodeCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerNetworkAccessControl` * Replace the environment's current `WebServerNetworkAccessControl`. * `config.softwareConfig.airflowConfigOverrides` * Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in `environment`, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides. * `config.softwareConfig.airflowConfigOverrides.`section-name * Override the Apache Airflow config property *name* in the section named *section*, preserving other properties. To delete the property override, include it in `updateMask` and omit its mapping in `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask of this form and the `config.softwareConfig.airflowConfigOverrides` mask. * `config.softwareConfig.envVariables` * Replace all environment variables. If a replacement environment variable map is not included in `environment`, all custom environment variables are cleared. * `config.softwareConfig.schedulerCount` * Horizontally scale the number of schedulers in Airflow. A positive integer not greater than the number of nodes must be provided in the `config.softwareConfig.schedulerCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. * `config.databaseConfig.machineType` * Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerConfig.machineType` * Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -406,7 +406,7 @@ } } }, - "revision": "20220518", + "revision": "20220727", "rootUrl": "https://composer.googleapis.com/", "schemas": { "AllowedIpRange": { diff --git a/composer/v1/composer-gen.go b/composer/v1/composer-gen.go index 48c8d80efea..e35d146ffd2 100644 --- a/composer/v1/composer-gen.go +++ b/composer/v1/composer-gen.go @@ -2443,9 +2443,7 @@ func (r *ProjectsLocationsEnvironmentsService) Patch(name string, environment *E // `config.softwareConfig.airflowConfigOverrides` mask. * // `config.softwareConfig.envVariables` * Replace all environment // variables. If a replacement environment variable map is not included -// in `environment`, all custom environment variables are cleared. It is -// an error to provide both this mask and a mask specifying one or more -// individual environment variables. * +// in `environment`, all custom environment variables are cleared. * // `config.softwareConfig.schedulerCount` * Horizontally scale the // number of schedulers in Airflow. A positive integer not greater than // the number of nodes must be provided in the @@ -2572,7 +2570,7 @@ func (c *ProjectsLocationsEnvironmentsPatchCall) Do(opts ...googleapi.CallOption // "type": "string" // }, // "updateMask": { - // "description": "Required. A comma-separated list of paths, relative to `Environment`, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of numpy, the `updateMask` parameter would include the following two `paths` values: \"config.softwareConfig.pypiPackages.scikit-learn\" and \"config.softwareConfig.pypiPackages.numpy\". The included patch environment would specify the scikit-learn version as follows: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"scikit-learn\":\"==0.19.0\" } } } } Note that in the above example, any existing PyPI packages other than scikit-learn and numpy will be unaffected. Only one update type may be included in a single request's `updateMask`. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels \"label1\" and \"label2\" while clearing \"label3\" (assuming it already exists), one can provide the paths \"labels.label1\", \"labels.label2\", and \"labels.label3\" and populate the patch environment as follows: { \"labels\":{ \"label1\":\"new-label1-value\" \"label2\":\"new-label2-value\" } } Note that in the above example, any existing labels that are not included in the `updateMask` will be unaffected. It is also possible to replace an entire map field by providing the map field's path in the `updateMask`. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would contain the path \"config.softwareConfig.pypiPackages\", and the patch environment would be the following: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"botocore\":\"==1.7.14\" } } } } **Note:** Only the following fields can be updated: * `config.softwareConfig.pypiPackages` * Replace all custom custom PyPI packages. If a replacement package map is not included in `environment`, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package. * `config.softwareConfig.pypiPackages.`packagename * Update the custom PyPI package *packagename*, preserving other packages. To delete the package, include it in `updateMask`, and omit the mapping for it in `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask of this form and the `config.softwareConfig.pypiPackages` mask. * `labels` * Replace all environment labels. If a replacement labels map is not included in `environment`, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels. * `labels.`labelName * Set the label named *labelName*, while preserving other labels. To delete the label, include it in `updateMask` and omit its mapping in `environment.labels`. It is an error to provide both a mask of this form and the `labels` mask. * `config.nodeCount` * Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the `config.nodeCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerNetworkAccessControl` * Replace the environment's current `WebServerNetworkAccessControl`. * `config.softwareConfig.airflowConfigOverrides` * Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in `environment`, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides. * `config.softwareConfig.airflowConfigOverrides.`section-name * Override the Apache Airflow config property *name* in the section named *section*, preserving other properties. To delete the property override, include it in `updateMask` and omit its mapping in `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask of this form and the `config.softwareConfig.airflowConfigOverrides` mask. * `config.softwareConfig.envVariables` * Replace all environment variables. If a replacement environment variable map is not included in `environment`, all custom environment variables are cleared. It is an error to provide both this mask and a mask specifying one or more individual environment variables. * `config.softwareConfig.schedulerCount` * Horizontally scale the number of schedulers in Airflow. A positive integer not greater than the number of nodes must be provided in the `config.softwareConfig.schedulerCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. * `config.databaseConfig.machineType` * Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerConfig.machineType` * Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*.", + // "description": "Required. A comma-separated list of paths, relative to `Environment`, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of numpy, the `updateMask` parameter would include the following two `paths` values: \"config.softwareConfig.pypiPackages.scikit-learn\" and \"config.softwareConfig.pypiPackages.numpy\". The included patch environment would specify the scikit-learn version as follows: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"scikit-learn\":\"==0.19.0\" } } } } Note that in the above example, any existing PyPI packages other than scikit-learn and numpy will be unaffected. Only one update type may be included in a single request's `updateMask`. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels \"label1\" and \"label2\" while clearing \"label3\" (assuming it already exists), one can provide the paths \"labels.label1\", \"labels.label2\", and \"labels.label3\" and populate the patch environment as follows: { \"labels\":{ \"label1\":\"new-label1-value\" \"label2\":\"new-label2-value\" } } Note that in the above example, any existing labels that are not included in the `updateMask` will be unaffected. It is also possible to replace an entire map field by providing the map field's path in the `updateMask`. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would contain the path \"config.softwareConfig.pypiPackages\", and the patch environment would be the following: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"botocore\":\"==1.7.14\" } } } } **Note:** Only the following fields can be updated: * `config.softwareConfig.pypiPackages` * Replace all custom custom PyPI packages. If a replacement package map is not included in `environment`, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package. * `config.softwareConfig.pypiPackages.`packagename * Update the custom PyPI package *packagename*, preserving other packages. To delete the package, include it in `updateMask`, and omit the mapping for it in `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask of this form and the `config.softwareConfig.pypiPackages` mask. * `labels` * Replace all environment labels. If a replacement labels map is not included in `environment`, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels. * `labels.`labelName * Set the label named *labelName*, while preserving other labels. To delete the label, include it in `updateMask` and omit its mapping in `environment.labels`. It is an error to provide both a mask of this form and the `labels` mask. * `config.nodeCount` * Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the `config.nodeCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerNetworkAccessControl` * Replace the environment's current `WebServerNetworkAccessControl`. * `config.softwareConfig.airflowConfigOverrides` * Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in `environment`, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides. * `config.softwareConfig.airflowConfigOverrides.`section-name * Override the Apache Airflow config property *name* in the section named *section*, preserving other properties. To delete the property override, include it in `updateMask` and omit its mapping in `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask of this form and the `config.softwareConfig.airflowConfigOverrides` mask. * `config.softwareConfig.envVariables` * Replace all environment variables. If a replacement environment variable map is not included in `environment`, all custom environment variables are cleared. * `config.softwareConfig.schedulerCount` * Horizontally scale the number of schedulers in Airflow. A positive integer not greater than the number of nodes must be provided in the `config.softwareConfig.schedulerCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. * `config.databaseConfig.machineType` * Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerConfig.machineType` * Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*.", // "format": "google-fieldmask", // "location": "query", // "type": "string" diff --git a/composer/v1beta1/composer-api.json b/composer/v1beta1/composer-api.json index 1b63bc57149..b997e272d53 100644 --- a/composer/v1beta1/composer-api.json +++ b/composer/v1beta1/composer-api.json @@ -298,7 +298,7 @@ "type": "string" }, "updateMask": { - "description": "Required. A comma-separated list of paths, relative to `Environment`, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of argparse, the `updateMask` parameter would include the following two `paths` values: \"config.softwareConfig.pypiPackages.scikit-learn\" and \"config.softwareConfig.pypiPackages.argparse\". The included patch environment would specify the scikit-learn version as follows: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"scikit-learn\":\"==0.19.0\" } } } } Note that in the above example, any existing PyPI packages other than scikit-learn and argparse will be unaffected. Only one update type may be included in a single request's `updateMask`. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels \"label1\" and \"label2\" while clearing \"label3\" (assuming it already exists), one can provide the paths \"labels.label1\", \"labels.label2\", and \"labels.label3\" and populate the patch environment as follows: { \"labels\":{ \"label1\":\"new-label1-value\" \"label2\":\"new-label2-value\" } } Note that in the above example, any existing labels that are not included in the `updateMask` will be unaffected. It is also possible to replace an entire map field by providing the map field's path in the `updateMask`. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would contain the path \"config.softwareConfig.pypiPackages\", and the patch environment would be the following: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"botocore\":\"==1.7.14\" } } } } **Note:** Only the following fields can be updated: * `config.softwareConfig.pypiPackages` * Replace all custom custom PyPI packages. If a replacement package map is not included in `environment`, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package. * `config.softwareConfig.pypiPackages.`packagename * Update the custom PyPI package *packagename*, preserving other packages. To delete the package, include it in `updateMask`, and omit the mapping for it in `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask of this form and the `config.softwareConfig.pypiPackages` mask. * `labels` * Replace all environment labels. If a replacement labels map is not included in `environment`, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels. * `labels.`labelName * Set the label named *labelName*, while preserving other labels. To delete the label, include it in `updateMask` and omit its mapping in `environment.labels`. It is an error to provide both a mask of this form and the `labels` mask. * `config.nodeCount` * Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the `config.nodeCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerNetworkAccessControl` * Replace the environment's current WebServerNetworkAccessControl. * `config.softwareConfig.airflowConfigOverrides` * Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in `environment`, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides. * `config.softwareConfig.airflowConfigOverrides.`section-name * Override the Apache Airflow config property *name* in the section named *section*, preserving other properties. To delete the property override, include it in `updateMask` and omit its mapping in `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask of this form and the `config.softwareConfig.airflowConfigOverrides` mask. * `config.softwareConfig.envVariables` * Replace all environment variables. If a replacement environment variable map is not included in `environment`, all custom environment variables are cleared. It is an error to provide both this mask and a mask specifying one or more individual environment variables. * `config.softwareConfig.imageVersion` * Upgrade the version of the environment in-place. Refer to `SoftwareConfig.image_version` for information on how to format the new image version. Additionally, the new image version cannot effect a version downgrade, and must match the current image version's Composer and Airflow major versions. Consult the [Cloud Composer version list](/composer/docs/concepts/versioning/composer-versions) for valid values. * `config.softwareConfig.schedulerCount` * Horizontally scale the number of schedulers in Airflow. A positive integer not greater than the number of nodes must be provided in the `config.softwareConfig.schedulerCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. * `config.softwareConfig.cloudDataLineageIntegration` * Configuration for Cloud Data Lineage integration. * `config.databaseConfig.machineType` * Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerConfig.machineType` * Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.maintenanceWindow` * Maintenance window during which Cloud Composer components may be under maintenance. * `config.workloadsConfig` * The workloads configuration settings for the GKE cluster associated with the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. * `config.environmentSize` * The size of the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer.", + "description": "Required. A comma-separated list of paths, relative to `Environment`, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of argparse, the `updateMask` parameter would include the following two `paths` values: \"config.softwareConfig.pypiPackages.scikit-learn\" and \"config.softwareConfig.pypiPackages.argparse\". The included patch environment would specify the scikit-learn version as follows: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"scikit-learn\":\"==0.19.0\" } } } } Note that in the above example, any existing PyPI packages other than scikit-learn and argparse will be unaffected. Only one update type may be included in a single request's `updateMask`. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels \"label1\" and \"label2\" while clearing \"label3\" (assuming it already exists), one can provide the paths \"labels.label1\", \"labels.label2\", and \"labels.label3\" and populate the patch environment as follows: { \"labels\":{ \"label1\":\"new-label1-value\" \"label2\":\"new-label2-value\" } } Note that in the above example, any existing labels that are not included in the `updateMask` will be unaffected. It is also possible to replace an entire map field by providing the map field's path in the `updateMask`. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would contain the path \"config.softwareConfig.pypiPackages\", and the patch environment would be the following: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"botocore\":\"==1.7.14\" } } } } **Note:** Only the following fields can be updated: * `config.softwareConfig.pypiPackages` * Replace all custom custom PyPI packages. If a replacement package map is not included in `environment`, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package. * `config.softwareConfig.pypiPackages.`packagename * Update the custom PyPI package *packagename*, preserving other packages. To delete the package, include it in `updateMask`, and omit the mapping for it in `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask of this form and the `config.softwareConfig.pypiPackages` mask. * `labels` * Replace all environment labels. If a replacement labels map is not included in `environment`, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels. * `labels.`labelName * Set the label named *labelName*, while preserving other labels. To delete the label, include it in `updateMask` and omit its mapping in `environment.labels`. It is an error to provide both a mask of this form and the `labels` mask. * `config.nodeCount` * Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the `config.nodeCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerNetworkAccessControl` * Replace the environment's current WebServerNetworkAccessControl. * `config.softwareConfig.airflowConfigOverrides` * Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in `environment`, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides. * `config.softwareConfig.airflowConfigOverrides.`section-name * Override the Apache Airflow config property *name* in the section named *section*, preserving other properties. To delete the property override, include it in `updateMask` and omit its mapping in `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask of this form and the `config.softwareConfig.airflowConfigOverrides` mask. * `config.softwareConfig.envVariables` * Replace all environment variables. If a replacement environment variable map is not included in `environment`, all custom environment variables are cleared. * `config.softwareConfig.imageVersion` * Upgrade the version of the environment in-place. Refer to `SoftwareConfig.image_version` for information on how to format the new image version. Additionally, the new image version cannot effect a version downgrade, and must match the current image version's Composer and Airflow major versions. Consult the [Cloud Composer version list](/composer/docs/concepts/versioning/composer-versions) for valid values. * `config.softwareConfig.schedulerCount` * Horizontally scale the number of schedulers in Airflow. A positive integer not greater than the number of nodes must be provided in the `config.softwareConfig.schedulerCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. * `config.softwareConfig.cloudDataLineageIntegration` * Configuration for Cloud Data Lineage integration. * `config.databaseConfig.machineType` * Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerConfig.machineType` * Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.maintenanceWindow` * Maintenance window during which Cloud Composer components may be under maintenance. * `config.workloadsConfig` * The workloads configuration settings for the GKE cluster associated with the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. * `config.environmentSize` * The size of the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -518,7 +518,7 @@ } } }, - "revision": "20220622", + "revision": "20220727", "rootUrl": "https://composer.googleapis.com/", "schemas": { "AllowedIpRange": { diff --git a/composer/v1beta1/composer-gen.go b/composer/v1beta1/composer-gen.go index 2898d394836..7315e3027cc 100644 --- a/composer/v1beta1/composer-gen.go +++ b/composer/v1beta1/composer-gen.go @@ -2913,9 +2913,7 @@ func (r *ProjectsLocationsEnvironmentsService) Patch(name string, environment *E // `config.softwareConfig.airflowConfigOverrides` mask. * // `config.softwareConfig.envVariables` * Replace all environment // variables. If a replacement environment variable map is not included -// in `environment`, all custom environment variables are cleared. It is -// an error to provide both this mask and a mask specifying one or more -// individual environment variables. * +// in `environment`, all custom environment variables are cleared. * // `config.softwareConfig.imageVersion` * Upgrade the version of the // environment in-place. Refer to `SoftwareConfig.image_version` for // information on how to format the new image version. Additionally, the @@ -3059,7 +3057,7 @@ func (c *ProjectsLocationsEnvironmentsPatchCall) Do(opts ...googleapi.CallOption // "type": "string" // }, // "updateMask": { - // "description": "Required. A comma-separated list of paths, relative to `Environment`, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of argparse, the `updateMask` parameter would include the following two `paths` values: \"config.softwareConfig.pypiPackages.scikit-learn\" and \"config.softwareConfig.pypiPackages.argparse\". The included patch environment would specify the scikit-learn version as follows: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"scikit-learn\":\"==0.19.0\" } } } } Note that in the above example, any existing PyPI packages other than scikit-learn and argparse will be unaffected. Only one update type may be included in a single request's `updateMask`. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels \"label1\" and \"label2\" while clearing \"label3\" (assuming it already exists), one can provide the paths \"labels.label1\", \"labels.label2\", and \"labels.label3\" and populate the patch environment as follows: { \"labels\":{ \"label1\":\"new-label1-value\" \"label2\":\"new-label2-value\" } } Note that in the above example, any existing labels that are not included in the `updateMask` will be unaffected. It is also possible to replace an entire map field by providing the map field's path in the `updateMask`. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would contain the path \"config.softwareConfig.pypiPackages\", and the patch environment would be the following: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"botocore\":\"==1.7.14\" } } } } **Note:** Only the following fields can be updated: * `config.softwareConfig.pypiPackages` * Replace all custom custom PyPI packages. If a replacement package map is not included in `environment`, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package. * `config.softwareConfig.pypiPackages.`packagename * Update the custom PyPI package *packagename*, preserving other packages. To delete the package, include it in `updateMask`, and omit the mapping for it in `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask of this form and the `config.softwareConfig.pypiPackages` mask. * `labels` * Replace all environment labels. If a replacement labels map is not included in `environment`, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels. * `labels.`labelName * Set the label named *labelName*, while preserving other labels. To delete the label, include it in `updateMask` and omit its mapping in `environment.labels`. It is an error to provide both a mask of this form and the `labels` mask. * `config.nodeCount` * Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the `config.nodeCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerNetworkAccessControl` * Replace the environment's current WebServerNetworkAccessControl. * `config.softwareConfig.airflowConfigOverrides` * Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in `environment`, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides. * `config.softwareConfig.airflowConfigOverrides.`section-name * Override the Apache Airflow config property *name* in the section named *section*, preserving other properties. To delete the property override, include it in `updateMask` and omit its mapping in `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask of this form and the `config.softwareConfig.airflowConfigOverrides` mask. * `config.softwareConfig.envVariables` * Replace all environment variables. If a replacement environment variable map is not included in `environment`, all custom environment variables are cleared. It is an error to provide both this mask and a mask specifying one or more individual environment variables. * `config.softwareConfig.imageVersion` * Upgrade the version of the environment in-place. Refer to `SoftwareConfig.image_version` for information on how to format the new image version. Additionally, the new image version cannot effect a version downgrade, and must match the current image version's Composer and Airflow major versions. Consult the [Cloud Composer version list](/composer/docs/concepts/versioning/composer-versions) for valid values. * `config.softwareConfig.schedulerCount` * Horizontally scale the number of schedulers in Airflow. A positive integer not greater than the number of nodes must be provided in the `config.softwareConfig.schedulerCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. * `config.softwareConfig.cloudDataLineageIntegration` * Configuration for Cloud Data Lineage integration. * `config.databaseConfig.machineType` * Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerConfig.machineType` * Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.maintenanceWindow` * Maintenance window during which Cloud Composer components may be under maintenance. * `config.workloadsConfig` * The workloads configuration settings for the GKE cluster associated with the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. * `config.environmentSize` * The size of the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer.", + // "description": "Required. A comma-separated list of paths, relative to `Environment`, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of argparse, the `updateMask` parameter would include the following two `paths` values: \"config.softwareConfig.pypiPackages.scikit-learn\" and \"config.softwareConfig.pypiPackages.argparse\". The included patch environment would specify the scikit-learn version as follows: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"scikit-learn\":\"==0.19.0\" } } } } Note that in the above example, any existing PyPI packages other than scikit-learn and argparse will be unaffected. Only one update type may be included in a single request's `updateMask`. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels \"label1\" and \"label2\" while clearing \"label3\" (assuming it already exists), one can provide the paths \"labels.label1\", \"labels.label2\", and \"labels.label3\" and populate the patch environment as follows: { \"labels\":{ \"label1\":\"new-label1-value\" \"label2\":\"new-label2-value\" } } Note that in the above example, any existing labels that are not included in the `updateMask` will be unaffected. It is also possible to replace an entire map field by providing the map field's path in the `updateMask`. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would contain the path \"config.softwareConfig.pypiPackages\", and the patch environment would be the following: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"botocore\":\"==1.7.14\" } } } } **Note:** Only the following fields can be updated: * `config.softwareConfig.pypiPackages` * Replace all custom custom PyPI packages. If a replacement package map is not included in `environment`, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package. * `config.softwareConfig.pypiPackages.`packagename * Update the custom PyPI package *packagename*, preserving other packages. To delete the package, include it in `updateMask`, and omit the mapping for it in `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask of this form and the `config.softwareConfig.pypiPackages` mask. * `labels` * Replace all environment labels. If a replacement labels map is not included in `environment`, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels. * `labels.`labelName * Set the label named *labelName*, while preserving other labels. To delete the label, include it in `updateMask` and omit its mapping in `environment.labels`. It is an error to provide both a mask of this form and the `labels` mask. * `config.nodeCount` * Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the `config.nodeCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerNetworkAccessControl` * Replace the environment's current WebServerNetworkAccessControl. * `config.softwareConfig.airflowConfigOverrides` * Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in `environment`, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides. * `config.softwareConfig.airflowConfigOverrides.`section-name * Override the Apache Airflow config property *name* in the section named *section*, preserving other properties. To delete the property override, include it in `updateMask` and omit its mapping in `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask of this form and the `config.softwareConfig.airflowConfigOverrides` mask. * `config.softwareConfig.envVariables` * Replace all environment variables. If a replacement environment variable map is not included in `environment`, all custom environment variables are cleared. * `config.softwareConfig.imageVersion` * Upgrade the version of the environment in-place. Refer to `SoftwareConfig.image_version` for information on how to format the new image version. Additionally, the new image version cannot effect a version downgrade, and must match the current image version's Composer and Airflow major versions. Consult the [Cloud Composer version list](/composer/docs/concepts/versioning/composer-versions) for valid values. * `config.softwareConfig.schedulerCount` * Horizontally scale the number of schedulers in Airflow. A positive integer not greater than the number of nodes must be provided in the `config.softwareConfig.schedulerCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. * `config.softwareConfig.cloudDataLineageIntegration` * Configuration for Cloud Data Lineage integration. * `config.databaseConfig.machineType` * Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerConfig.machineType` * Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.maintenanceWindow` * Maintenance window during which Cloud Composer components may be under maintenance. * `config.workloadsConfig` * The workloads configuration settings for the GKE cluster associated with the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. * `config.environmentSize` * The size of the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer.", // "format": "google-fieldmask", // "location": "query", // "type": "string" diff --git a/dataflow/v1b3/dataflow-api.json b/dataflow/v1b3/dataflow-api.json index 20865155f92..dab7f39a173 100644 --- a/dataflow/v1b3/dataflow-api.json +++ b/dataflow/v1b3/dataflow-api.json @@ -2225,7 +2225,7 @@ } } }, - "revision": "20220629", + "revision": "20220726", "rootUrl": "https://dataflow.googleapis.com/", "schemas": { "ApproximateProgress": { @@ -5181,12 +5181,14 @@ "enum": [ "UNKNOWN", "JAVA", - "PYTHON" + "PYTHON", + "GO" ], "enumDescriptions": [ "UNKNOWN Language.", "Java.", - "Python." + "Python.", + "Go." ], "type": "string" }, diff --git a/dataflow/v1b3/dataflow-gen.go b/dataflow/v1b3/dataflow-gen.go index ff824fbb05e..032cddf1df7 100644 --- a/dataflow/v1b3/dataflow-gen.go +++ b/dataflow/v1b3/dataflow-gen.go @@ -5071,6 +5071,7 @@ type SDKInfo struct { // "UNKNOWN" - UNKNOWN Language. // "JAVA" - Java. // "PYTHON" - Python. + // "GO" - Go. Language string `json:"language,omitempty"` // Version: Optional. The SDK version. diff --git a/dataproc/v1/dataproc-api.json b/dataproc/v1/dataproc-api.json index aee3a2e5795..85498afc229 100644 --- a/dataproc/v1/dataproc-api.json +++ b/dataproc/v1/dataproc-api.json @@ -2444,7 +2444,7 @@ } } }, - "revision": "20220628", + "revision": "20220726", "rootUrl": "https://dataproc.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -4889,6 +4889,11 @@ "description": "Optional. Specifying the cluster_uuid means the RPC will fail (with error NOT_FOUND) if a cluster with the specified UUID does not exist.", "type": "string" }, + "gracefulDecommissionTimeout": { + "description": "Optional. Timeout for graceful YARN decomissioning. Graceful decommissioning facilitates the removal of cluster nodes without interrupting jobs in progress. The timeout specifies the amount of time to wait for jobs finish before forcefully removing nodes. The default timeout is 0 for forceful decommissioning, and the maximum timeout period is 1 day. (see JSON Mapping—Duration (https://developers.google.com/protocol-buffers/docs/proto3#json)).graceful_decommission_timeout is supported in Dataproc image versions 1.2+.", + "format": "google-duration", + "type": "string" + }, "nodePools": { "description": "Optional. Node pools and corresponding repair action to be taken. All node pools should be unique in this request. i.e. Multiple entries for the same node pool id are not allowed.", "items": { @@ -4896,6 +4901,10 @@ }, "type": "array" }, + "parentOperationId": { + "description": "Optional. operation id of the parent operation sending the repair request", + "type": "string" + }, "requestId": { "description": "Optional. A unique ID used to identify the request. If the server receives two RepairClusterRequests with the same ID, the second request is ignored, and the first google.longrunning.Operation created and stored in the backend is returned.Recommendation: Set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", "type": "string" diff --git a/dataproc/v1/dataproc-gen.go b/dataproc/v1/dataproc-gen.go index c986c4dc8f8..3718aac67e1 100644 --- a/dataproc/v1/dataproc-gen.go +++ b/dataproc/v1/dataproc-gen.go @@ -4318,11 +4318,26 @@ type RepairClusterRequest struct { // not exist. ClusterUuid string `json:"clusterUuid,omitempty"` + // GracefulDecommissionTimeout: Optional. Timeout for graceful YARN + // decomissioning. Graceful decommissioning facilitates the removal of + // cluster nodes without interrupting jobs in progress. The timeout + // specifies the amount of time to wait for jobs finish before + // forcefully removing nodes. The default timeout is 0 for forceful + // decommissioning, and the maximum timeout period is 1 day. (see JSON + // Mapping—Duration + // (https://developers.google.com/protocol-buffers/docs/proto3#json)).graceful_decommission_timeout + // is supported in Dataproc image versions 1.2+. + GracefulDecommissionTimeout string `json:"gracefulDecommissionTimeout,omitempty"` + // NodePools: Optional. Node pools and corresponding repair action to be // taken. All node pools should be unique in this request. i.e. Multiple // entries for the same node pool id are not allowed. NodePools []*NodePool `json:"nodePools,omitempty"` + // ParentOperationId: Optional. operation id of the parent operation + // sending the repair request + ParentOperationId string `json:"parentOperationId,omitempty"` + // RequestId: Optional. A unique ID used to identify the request. If the // server receives two RepairClusterRequests with the same ID, the // second request is ignored, and the first google.longrunning.Operation diff --git a/displayvideo/v1/displayvideo-api.json b/displayvideo/v1/displayvideo-api.json index deea6155697..6663d03ac61 100644 --- a/displayvideo/v1/displayvideo-api.json +++ b/displayvideo/v1/displayvideo-api.json @@ -4883,7 +4883,7 @@ "type": "string" }, "filter": { - "description": "Allows filtering by custom bidding algorithm fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND`. A sequence of restrictions * implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * The operator must be `CONTAINS (:)` or `EQUALS (=)`. * The operator must be `CONTAINS (:)` for the following field: - `displayName` * The operator must be `EQUALS (=)` for the following field: - `customBiddingAlgorithmType` - `customBiddingAlgorithmState` * For `displayName`, the value is a string. We return all custom bidding algorithms whose display_name contains such string. * For `customBiddingAlgorithmType`, the value is a string. We return all algorithms whose custom_bidding_algorithm_type is equal to the given type. * For `customBiddingAlgorithmState`, the value is a string. We return all algorithms whose custom_bidding_algorithm_state is equal to the given type. Examples: * All custom bidding algorithms for which the display name contains \"politics\": `displayName:politics`. * All custom bidding algorithms for which the type is \"SCRIPT_BASED\": `customBiddingAlgorithmType=SCRIPT_BASED` * All custom bidding algorithms for which the state is \"ENABLED\": `customBiddingAlgorithmState=ENABLED` The length of this field should be no more than 500 characters.", + "description": "Allows filtering by custom bidding algorithm fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND`. A sequence of restrictions * implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * The operator must be `CONTAINS (:)` or `EQUALS (=)`. * The operator must be `CONTAINS (:)` for the following field: - `displayName` * The operator must be `EQUALS (=)` for the following field: - `customBiddingAlgorithmType` * For `displayName`, the value is a string. We return all custom bidding algorithms whose display_name contains such string. * For `customBiddingAlgorithmType`, the value is a string. We return all algorithms whose custom_bidding_algorithm_type is equal to the given type. Examples: * All custom bidding algorithms for which the display name contains \"politics\": `displayName:politics`. * All custom bidding algorithms for which the type is \"SCRIPT_BASED\": `customBiddingAlgorithmType=SCRIPT_BASED` The length of this field should be no more than 500 characters.", "location": "query", "type": "string" }, @@ -8146,7 +8146,7 @@ } } }, - "revision": "20220609", + "revision": "20220802", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActivateManualTriggerRequest": { @@ -13437,13 +13437,13 @@ "LINE_ITEM_TYPE_VIDEO_OVER_THE_TOP" ], "enumDescriptions": [ - "Type value is not specified or is unknown in this version.", + "Type value is not specified or is unknown in this version. Line items of this type and their targeting cannot be created or updated using the API.", "Image, HTML5, native, or rich media ads.", "Display ads that drive installs of an app.", "Video ads sold on a CPM basis for a variety of environments.", "Video ads that drive installs of an app.", - "Display ads served on mobile app inventory.", - "Video ads served on mobile app inventory.", + "Display ads served on mobile app inventory. Line items of this type and their targeting cannot be created or updated using the API.", + "Video ads served on mobile app inventory. Line items of this type and their targeting cannot be created or updated using the API.", "RTB Audio ads sold for a variety of environments.", "Over-the-top ads present in OTT insertion orders. This type is only applicable to line items with an insertion order of insertion_order_type `OVER_THE_TOP`." ], @@ -15281,13 +15281,13 @@ "LINE_ITEM_TYPE_VIDEO_OVER_THE_TOP" ], "enumDescriptions": [ - "Type value is not specified or is unknown in this version.", + "Type value is not specified or is unknown in this version. Line items of this type and their targeting cannot be created or updated using the API.", "Image, HTML5, native, or rich media ads.", "Display ads that drive installs of an app.", "Video ads sold on a CPM basis for a variety of environments.", "Video ads that drive installs of an app.", - "Display ads served on mobile app inventory.", - "Video ads served on mobile app inventory.", + "Display ads served on mobile app inventory. Line items of this type and their targeting cannot be created or updated using the API.", + "Video ads served on mobile app inventory. Line items of this type and their targeting cannot be created or updated using the API.", "RTB Audio ads sold for a variety of environments.", "Over-the-top ads present in OTT insertion orders. This type is only applicable to line items with an insertion order of insertion_order_type `OVER_THE_TOP`." ], diff --git a/displayvideo/v1/displayvideo-gen.go b/displayvideo/v1/displayvideo-gen.go index e61b491764a..79a5faea80a 100644 --- a/displayvideo/v1/displayvideo-gen.go +++ b/displayvideo/v1/displayvideo-gen.go @@ -8429,7 +8429,8 @@ type GenerateDefaultLineItemRequest struct { // // Possible values: // "LINE_ITEM_TYPE_UNSPECIFIED" - Type value is not specified or is - // unknown in this version. + // unknown in this version. Line items of this type and their targeting + // cannot be created or updated using the API. // "LINE_ITEM_TYPE_DISPLAY_DEFAULT" - Image, HTML5, native, or rich // media ads. // "LINE_ITEM_TYPE_DISPLAY_MOBILE_APP_INSTALL" - Display ads that @@ -8439,9 +8440,11 @@ type GenerateDefaultLineItemRequest struct { // "LINE_ITEM_TYPE_VIDEO_MOBILE_APP_INSTALL" - Video ads that drive // installs of an app. // "LINE_ITEM_TYPE_DISPLAY_MOBILE_APP_INVENTORY" - Display ads served - // on mobile app inventory. + // on mobile app inventory. Line items of this type and their targeting + // cannot be created or updated using the API. // "LINE_ITEM_TYPE_VIDEO_MOBILE_APP_INVENTORY" - Video ads served on - // mobile app inventory. + // mobile app inventory. Line items of this type and their targeting + // cannot be created or updated using the API. // "LINE_ITEM_TYPE_AUDIO_DEFAULT" - RTB Audio ads sold for a variety // of environments. // "LINE_ITEM_TYPE_VIDEO_OVER_THE_TOP" - Over-the-top ads present in @@ -10616,7 +10619,8 @@ type LineItem struct { // // Possible values: // "LINE_ITEM_TYPE_UNSPECIFIED" - Type value is not specified or is - // unknown in this version. + // unknown in this version. Line items of this type and their targeting + // cannot be created or updated using the API. // "LINE_ITEM_TYPE_DISPLAY_DEFAULT" - Image, HTML5, native, or rich // media ads. // "LINE_ITEM_TYPE_DISPLAY_MOBILE_APP_INSTALL" - Display ads that @@ -10626,9 +10630,11 @@ type LineItem struct { // "LINE_ITEM_TYPE_VIDEO_MOBILE_APP_INSTALL" - Video ads that drive // installs of an app. // "LINE_ITEM_TYPE_DISPLAY_MOBILE_APP_INVENTORY" - Display ads served - // on mobile app inventory. + // on mobile app inventory. Line items of this type and their targeting + // cannot be created or updated using the API. // "LINE_ITEM_TYPE_VIDEO_MOBILE_APP_INVENTORY" - Video ads served on - // mobile app inventory. + // mobile app inventory. Line items of this type and their targeting + // cannot be created or updated using the API. // "LINE_ITEM_TYPE_AUDIO_DEFAULT" - RTB Audio ads sold for a variety // of environments. // "LINE_ITEM_TYPE_VIDEO_OVER_THE_TOP" - Over-the-top ads present in @@ -33005,20 +33011,16 @@ func (c *CustomBiddingAlgorithmsListCall) AdvertiserId(advertiserId int64) *Cust // {value}`. * The operator must be `CONTAINS (:)` or `EQUALS (=)`. * // The operator must be `CONTAINS (:)` for the following field: - // `displayName` * The operator must be `EQUALS (=)` for the following -// field: - `customBiddingAlgorithmType` - `customBiddingAlgorithmState` -// * For `displayName`, the value is a string. We return all custom -// bidding algorithms whose display_name contains such string. * For +// field: - `customBiddingAlgorithmType` * For `displayName`, the value +// is a string. We return all custom bidding algorithms whose +// display_name contains such string. * For // `customBiddingAlgorithmType`, the value is a string. We return all // algorithms whose custom_bidding_algorithm_type is equal to the given -// type. * For `customBiddingAlgorithmState`, the value is a string. We -// return all algorithms whose custom_bidding_algorithm_state is equal -// to the given type. Examples: * All custom bidding algorithms for -// which the display name contains "politics": `displayName:politics`. * -// All custom bidding algorithms for which the type is "SCRIPT_BASED": -// `customBiddingAlgorithmType=SCRIPT_BASED` * All custom bidding -// algorithms for which the state is "ENABLED": -// `customBiddingAlgorithmState=ENABLED` The length of this field should -// be no more than 500 characters. +// type. Examples: * All custom bidding algorithms for which the display +// name contains "politics": `displayName:politics`. * All custom +// bidding algorithms for which the type is "SCRIPT_BASED": +// `customBiddingAlgorithmType=SCRIPT_BASED` The length of this field +// should be no more than 500 characters. func (c *CustomBiddingAlgorithmsListCall) Filter(filter string) *CustomBiddingAlgorithmsListCall { c.urlParams_.Set("filter", filter) return c @@ -33170,7 +33172,7 @@ func (c *CustomBiddingAlgorithmsListCall) Do(opts ...googleapi.CallOption) (*Lis // "type": "string" // }, // "filter": { - // "description": "Allows filtering by custom bidding algorithm fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND`. A sequence of restrictions * implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * The operator must be `CONTAINS (:)` or `EQUALS (=)`. * The operator must be `CONTAINS (:)` for the following field: - `displayName` * The operator must be `EQUALS (=)` for the following field: - `customBiddingAlgorithmType` - `customBiddingAlgorithmState` * For `displayName`, the value is a string. We return all custom bidding algorithms whose display_name contains such string. * For `customBiddingAlgorithmType`, the value is a string. We return all algorithms whose custom_bidding_algorithm_type is equal to the given type. * For `customBiddingAlgorithmState`, the value is a string. We return all algorithms whose custom_bidding_algorithm_state is equal to the given type. Examples: * All custom bidding algorithms for which the display name contains \"politics\": `displayName:politics`. * All custom bidding algorithms for which the type is \"SCRIPT_BASED\": `customBiddingAlgorithmType=SCRIPT_BASED` * All custom bidding algorithms for which the state is \"ENABLED\": `customBiddingAlgorithmState=ENABLED` The length of this field should be no more than 500 characters.", + // "description": "Allows filtering by custom bidding algorithm fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND`. A sequence of restrictions * implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * The operator must be `CONTAINS (:)` or `EQUALS (=)`. * The operator must be `CONTAINS (:)` for the following field: - `displayName` * The operator must be `EQUALS (=)` for the following field: - `customBiddingAlgorithmType` * For `displayName`, the value is a string. We return all custom bidding algorithms whose display_name contains such string. * For `customBiddingAlgorithmType`, the value is a string. We return all algorithms whose custom_bidding_algorithm_type is equal to the given type. Examples: * All custom bidding algorithms for which the display name contains \"politics\": `displayName:politics`. * All custom bidding algorithms for which the type is \"SCRIPT_BASED\": `customBiddingAlgorithmType=SCRIPT_BASED` The length of this field should be no more than 500 characters.", // "location": "query", // "type": "string" // }, diff --git a/dlp/v2/dlp-api.json b/dlp/v2/dlp-api.json index 561fc4763cf..29a625b033a 100644 --- a/dlp/v2/dlp-api.json +++ b/dlp/v2/dlp-api.json @@ -108,7 +108,7 @@ "infoTypes": { "methods": { "list": { - "description": "Returns a list of the sensitive information types that the DLP API supports. See https://cloud.google.com/dlp/docs/infotypes-reference to learn more.", + "description": "Returns a list of the sensitive information types that DLP API supports. See https://cloud.google.com/dlp/docs/infotypes-reference to learn more.", "flatPath": "v2/infoTypes", "httpMethod": "GET", "id": "dlp.infoTypes.list", @@ -150,7 +150,7 @@ "infoTypes": { "methods": { "list": { - "description": "Returns a list of the sensitive information types that the DLP API supports. See https://cloud.google.com/dlp/docs/infotypes-reference to learn more.", + "description": "Returns a list of the sensitive information types that DLP API supports. See https://cloud.google.com/dlp/docs/infotypes-reference to learn more.", "flatPath": "v2/locations/{locationsId}/infoTypes", "httpMethod": "GET", "id": "dlp.locations.infoTypes.list", @@ -198,7 +198,7 @@ "deidentifyTemplates": { "methods": { "create": { - "description": "Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + "description": "Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates", "httpMethod": "POST", "id": "dlp.organizations.deidentifyTemplates.create", @@ -290,12 +290,12 @@ "type": "string" }, "orderBy": { - "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the template was created. - `update_time`: corresponds to time the template was last updated. - `name`: corresponds to template's name. - `display_name`: corresponds to template's display name.", + "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", "location": "query", "type": "string" }, "pageSize": { - "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", + "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", "format": "int32", "location": "query", "type": "integer" @@ -354,7 +354,7 @@ "inspectTemplates": { "methods": { "create": { - "description": "Creates an InspectTemplate for re-using frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + "description": "Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", "flatPath": "v2/organizations/{organizationsId}/inspectTemplates", "httpMethod": "POST", "id": "dlp.organizations.inspectTemplates.create", @@ -446,12 +446,12 @@ "type": "string" }, "orderBy": { - "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the template was created. - `update_time`: corresponds to time the template was last updated. - `name`: corresponds to template's name. - `display_name`: corresponds to template's display name.", + "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", "location": "query", "type": "string" }, "pageSize": { - "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", + "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", "format": "int32", "location": "query", "type": "integer" @@ -512,7 +512,7 @@ "deidentifyTemplates": { "methods": { "create": { - "description": "Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + "description": "Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates", "httpMethod": "POST", "id": "dlp.organizations.locations.deidentifyTemplates.create", @@ -604,12 +604,12 @@ "type": "string" }, "orderBy": { - "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the template was created. - `update_time`: corresponds to time the template was last updated. - `name`: corresponds to template's name. - `display_name`: corresponds to template's display name.", + "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", "location": "query", "type": "string" }, "pageSize": { - "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", + "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", "format": "int32", "location": "query", "type": "integer" @@ -677,7 +677,7 @@ ], "parameters": { "filter": { - "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect jobs: - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The resource name of the trigger that created job. - 'end_time` - Corresponds to time the job finished. - 'start_time` - Corresponds to time the job finished. * Supported fields for risk analysis jobs: - `state` - RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to time the job finished. - 'start_time` - Corresponds to time the job finished. * The operator must be `=` or `!=`. Examples: * inspected_storage = cloud_storage AND state = done * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = done OR state = canceled) * end_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", + "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect jobs: - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The name of the trigger that created the job. - 'end_time` - Corresponds to the time the job finished. - 'start_time` - Corresponds to the time the job finished. * Supported fields for risk analysis jobs: - `state` - RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to the time the job finished. - 'start_time` - Corresponds to the time the job finished. * The operator must be `=` or `!=`. Examples: * inspected_storage = cloud_storage AND state = done * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = done OR state = canceled) * end_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", "location": "query", "type": "string" }, @@ -687,7 +687,7 @@ "type": "string" }, "orderBy": { - "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, end_time asc, create_time desc` Supported fields are: - `create_time`: corresponds to time the job was created. - `end_time`: corresponds to time the job ended. - `name`: corresponds to job's name. - `state`: corresponds to `state`", + "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, end_time asc, create_time desc` Supported fields are: - `create_time`: corresponds to the time the job was created. - `end_time`: corresponds to the time the job ended. - `name`: corresponds to the job's name. - `state`: corresponds to `state`", "location": "query", "type": "string" }, @@ -738,7 +738,7 @@ "inspectTemplates": { "methods": { "create": { - "description": "Creates an InspectTemplate for re-using frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + "description": "Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates", "httpMethod": "POST", "id": "dlp.organizations.locations.inspectTemplates.create", @@ -830,12 +830,12 @@ "type": "string" }, "orderBy": { - "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the template was created. - `update_time`: corresponds to time the template was last updated. - `name`: corresponds to template's name. - `display_name`: corresponds to template's display name.", + "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", "location": "query", "type": "string" }, "pageSize": { - "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", + "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", "format": "int32", "location": "query", "type": "integer" @@ -991,7 +991,7 @@ "type": "string" }, "orderBy": { - "description": "Comma separated list of triggeredJob fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the JobTrigger was created. - `update_time`: corresponds to time the JobTrigger was last updated. - `last_run_time`: corresponds to the last time the JobTrigger ran. - `name`: corresponds to JobTrigger's name. - `display_name`: corresponds to JobTrigger's display name. - `status`: corresponds to JobTrigger's status.", + "description": "Comma separated list of triggeredJob fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the JobTrigger was created. - `update_time`: corresponds to the time the JobTrigger was last updated. - `last_run_time`: corresponds to the last time the JobTrigger ran. - `name`: corresponds to the JobTrigger's name. - `display_name`: corresponds to the JobTrigger's display name. - `status`: corresponds to JobTrigger's status.", "location": "query", "type": "string" }, @@ -1162,12 +1162,12 @@ "type": "string" }, "orderBy": { - "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, display_name, create_time desc` Supported fields are: - `create_time`: corresponds to time the most recent version of the resource was created. - `state`: corresponds to the state of the resource. - `name`: corresponds to resource name. - `display_name`: corresponds to info type's display name.", + "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, display_name, create_time desc` Supported fields are: - `create_time`: corresponds to the time the most recent version of the resource was created. - `state`: corresponds to the state of the resource. - `name`: corresponds to resource name. - `display_name`: corresponds to info type's display name.", "location": "query", "type": "string" }, "pageSize": { - "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", + "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", "format": "int32", "location": "query", "type": "integer" @@ -1320,12 +1320,12 @@ "type": "string" }, "orderBy": { - "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, display_name, create_time desc` Supported fields are: - `create_time`: corresponds to time the most recent version of the resource was created. - `state`: corresponds to the state of the resource. - `name`: corresponds to resource name. - `display_name`: corresponds to info type's display name.", + "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, display_name, create_time desc` Supported fields are: - `create_time`: corresponds to the time the most recent version of the resource was created. - `state`: corresponds to the state of the resource. - `name`: corresponds to resource name. - `display_name`: corresponds to info type's display name.", "location": "query", "type": "string" }, "pageSize": { - "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", + "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", "format": "int32", "location": "query", "type": "integer" @@ -1476,7 +1476,7 @@ "deidentifyTemplates": { "methods": { "create": { - "description": "Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + "description": "Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", "flatPath": "v2/projects/{projectsId}/deidentifyTemplates", "httpMethod": "POST", "id": "dlp.projects.deidentifyTemplates.create", @@ -1568,12 +1568,12 @@ "type": "string" }, "orderBy": { - "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the template was created. - `update_time`: corresponds to time the template was last updated. - `name`: corresponds to template's name. - `display_name`: corresponds to template's display name.", + "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", "location": "query", "type": "string" }, "pageSize": { - "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", + "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", "format": "int32", "location": "query", "type": "integer" @@ -1688,7 +1688,7 @@ ] }, "delete": { - "description": "Deletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be cancelled if possible. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", + "description": "Deletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be canceled if possible. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}", "httpMethod": "DELETE", "id": "dlp.projects.dlpJobs.delete", @@ -1747,7 +1747,7 @@ ], "parameters": { "filter": { - "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect jobs: - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The resource name of the trigger that created job. - 'end_time` - Corresponds to time the job finished. - 'start_time` - Corresponds to time the job finished. * Supported fields for risk analysis jobs: - `state` - RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to time the job finished. - 'start_time` - Corresponds to time the job finished. * The operator must be `=` or `!=`. Examples: * inspected_storage = cloud_storage AND state = done * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = done OR state = canceled) * end_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", + "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect jobs: - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The name of the trigger that created the job. - 'end_time` - Corresponds to the time the job finished. - 'start_time` - Corresponds to the time the job finished. * Supported fields for risk analysis jobs: - `state` - RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to the time the job finished. - 'start_time` - Corresponds to the time the job finished. * The operator must be `=` or `!=`. Examples: * inspected_storage = cloud_storage AND state = done * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = done OR state = canceled) * end_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", "location": "query", "type": "string" }, @@ -1757,7 +1757,7 @@ "type": "string" }, "orderBy": { - "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, end_time asc, create_time desc` Supported fields are: - `create_time`: corresponds to time the job was created. - `end_time`: corresponds to time the job ended. - `name`: corresponds to job's name. - `state`: corresponds to `state`", + "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, end_time asc, create_time desc` Supported fields are: - `create_time`: corresponds to the time the job was created. - `end_time`: corresponds to the time the job ended. - `name`: corresponds to the job's name. - `state`: corresponds to `state`", "location": "query", "type": "string" }, @@ -1840,7 +1840,7 @@ "inspectTemplates": { "methods": { "create": { - "description": "Creates an InspectTemplate for re-using frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + "description": "Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", "flatPath": "v2/projects/{projectsId}/inspectTemplates", "httpMethod": "POST", "id": "dlp.projects.inspectTemplates.create", @@ -1932,12 +1932,12 @@ "type": "string" }, "orderBy": { - "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the template was created. - `update_time`: corresponds to time the template was last updated. - `name`: corresponds to template's name. - `display_name`: corresponds to template's display name.", + "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", "location": "query", "type": "string" }, "pageSize": { - "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", + "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", "format": "int32", "location": "query", "type": "integer" @@ -2121,7 +2121,7 @@ "type": "string" }, "orderBy": { - "description": "Comma separated list of triggeredJob fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the JobTrigger was created. - `update_time`: corresponds to time the JobTrigger was last updated. - `last_run_time`: corresponds to the last time the JobTrigger ran. - `name`: corresponds to JobTrigger's name. - `display_name`: corresponds to JobTrigger's display name. - `status`: corresponds to JobTrigger's status.", + "description": "Comma separated list of triggeredJob fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the JobTrigger was created. - `update_time`: corresponds to the time the JobTrigger was last updated. - `last_run_time`: corresponds to the last time the JobTrigger ran. - `name`: corresponds to the JobTrigger's name. - `display_name`: corresponds to the JobTrigger's display name. - `status`: corresponds to JobTrigger's status.", "location": "query", "type": "string" }, @@ -2290,7 +2290,7 @@ "deidentifyTemplates": { "methods": { "create": { - "description": "Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + "description": "Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates", "httpMethod": "POST", "id": "dlp.projects.locations.deidentifyTemplates.create", @@ -2382,12 +2382,12 @@ "type": "string" }, "orderBy": { - "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the template was created. - `update_time`: corresponds to time the template was last updated. - `name`: corresponds to template's name. - `display_name`: corresponds to template's display name.", + "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", "location": "query", "type": "string" }, "pageSize": { - "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", + "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", "format": "int32", "location": "query", "type": "integer" @@ -2502,7 +2502,7 @@ ] }, "delete": { - "description": "Deletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be cancelled if possible. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", + "description": "Deletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be canceled if possible. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}", "httpMethod": "DELETE", "id": "dlp.projects.locations.dlpJobs.delete", @@ -2617,7 +2617,7 @@ ], "parameters": { "filter": { - "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect jobs: - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The resource name of the trigger that created job. - 'end_time` - Corresponds to time the job finished. - 'start_time` - Corresponds to time the job finished. * Supported fields for risk analysis jobs: - `state` - RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to time the job finished. - 'start_time` - Corresponds to time the job finished. * The operator must be `=` or `!=`. Examples: * inspected_storage = cloud_storage AND state = done * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = done OR state = canceled) * end_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", + "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect jobs: - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The name of the trigger that created the job. - 'end_time` - Corresponds to the time the job finished. - 'start_time` - Corresponds to the time the job finished. * Supported fields for risk analysis jobs: - `state` - RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to the time the job finished. - 'start_time` - Corresponds to the time the job finished. * The operator must be `=` or `!=`. Examples: * inspected_storage = cloud_storage AND state = done * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = done OR state = canceled) * end_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", "location": "query", "type": "string" }, @@ -2627,7 +2627,7 @@ "type": "string" }, "orderBy": { - "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, end_time asc, create_time desc` Supported fields are: - `create_time`: corresponds to time the job was created. - `end_time`: corresponds to time the job ended. - `name`: corresponds to job's name. - `state`: corresponds to `state`", + "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, end_time asc, create_time desc` Supported fields are: - `create_time`: corresponds to the time the job was created. - `end_time`: corresponds to the time the job ended. - `name`: corresponds to the job's name. - `state`: corresponds to `state`", "location": "query", "type": "string" }, @@ -2710,7 +2710,7 @@ "inspectTemplates": { "methods": { "create": { - "description": "Creates an InspectTemplate for re-using frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + "description": "Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates", "httpMethod": "POST", "id": "dlp.projects.locations.inspectTemplates.create", @@ -2802,12 +2802,12 @@ "type": "string" }, "orderBy": { - "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the template was created. - `update_time`: corresponds to time the template was last updated. - `name`: corresponds to template's name. - `display_name`: corresponds to template's display name.", + "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", "location": "query", "type": "string" }, "pageSize": { - "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", + "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", "format": "int32", "location": "query", "type": "integer" @@ -3019,7 +3019,7 @@ "type": "string" }, "orderBy": { - "description": "Comma separated list of triggeredJob fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the JobTrigger was created. - `update_time`: corresponds to time the JobTrigger was last updated. - `last_run_time`: corresponds to the last time the JobTrigger ran. - `name`: corresponds to JobTrigger's name. - `display_name`: corresponds to JobTrigger's display name. - `status`: corresponds to JobTrigger's status.", + "description": "Comma separated list of triggeredJob fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the JobTrigger was created. - `update_time`: corresponds to the time the JobTrigger was last updated. - `last_run_time`: corresponds to the last time the JobTrigger ran. - `name`: corresponds to the JobTrigger's name. - `display_name`: corresponds to the JobTrigger's display name. - `status`: corresponds to JobTrigger's status.", "location": "query", "type": "string" }, @@ -3190,12 +3190,12 @@ "type": "string" }, "orderBy": { - "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, display_name, create_time desc` Supported fields are: - `create_time`: corresponds to time the most recent version of the resource was created. - `state`: corresponds to the state of the resource. - `name`: corresponds to resource name. - `display_name`: corresponds to info type's display name.", + "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, display_name, create_time desc` Supported fields are: - `create_time`: corresponds to the time the most recent version of the resource was created. - `state`: corresponds to the state of the resource. - `name`: corresponds to resource name. - `display_name`: corresponds to info type's display name.", "location": "query", "type": "string" }, "pageSize": { - "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", + "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", "format": "int32", "location": "query", "type": "integer" @@ -3348,12 +3348,12 @@ "type": "string" }, "orderBy": { - "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, display_name, create_time desc` Supported fields are: - `create_time`: corresponds to time the most recent version of the resource was created. - `state`: corresponds to the state of the resource. - `name`: corresponds to resource name. - `display_name`: corresponds to info type's display name.", + "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, display_name, create_time desc` Supported fields are: - `create_time`: corresponds to the time the most recent version of the resource was created. - `state`: corresponds to the state of the resource. - `name`: corresponds to resource name. - `display_name`: corresponds to info type's display name.", "location": "query", "type": "string" }, "pageSize": { - "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", + "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", "format": "int32", "location": "query", "type": "integer" @@ -3412,13 +3412,17 @@ } } }, - "revision": "20220708", + "revision": "20220730", "rootUrl": "https://dlp.googleapis.com/", "schemas": { "GooglePrivacyDlpV2Action": { "description": "A task to execute on the completion of a job. See https://cloud.google.com/dlp/docs/concepts-actions to learn more.", "id": "GooglePrivacyDlpV2Action", "properties": { + "deidentify": { + "$ref": "GooglePrivacyDlpV2Deidentify", + "description": "Create a de-identified copy of the input data. Applicable for non-image data only. The de-identified copy is in the same location as the original data." + }, "jobNotificationEmails": { "$ref": "GooglePrivacyDlpV2JobNotificationEmails", "description": "Enable email notification for project owners and editors on job's completion/failure." @@ -3865,7 +3869,7 @@ "type": "object" }, "GooglePrivacyDlpV2CloudStorageOptions": { - "description": "Options defining a file or a set of files within a Google Cloud Storage bucket.", + "description": "Options defining a file or a set of files within a Cloud Storage bucket.", "id": "GooglePrivacyDlpV2CloudStorageOptions", "properties": { "bytesLimitPerFile": { @@ -4052,7 +4056,7 @@ "id": "GooglePrivacyDlpV2Container", "properties": { "fullPath": { - "description": "A string representation of the full container name. Examples: - BigQuery: 'Project:DataSetId.TableId' - Google Cloud Storage: 'gs://Bucket/folders/filename.txt'", + "description": "A string representation of the full container name. Examples: - BigQuery: 'Project:DataSetId.TableId' - Cloud Storage: 'gs://Bucket/folders/filename.txt'", "type": "string" }, "projectId": { @@ -4060,24 +4064,24 @@ "type": "string" }, "relativePath": { - "description": "The rest of the path after the root. Examples: - For BigQuery table `project_id:dataset_id.table_id`, the relative path is `table_id` - Google Cloud Storage file `gs://bucket/folder/filename.txt`, the relative path is `folder/filename.txt`", + "description": "The rest of the path after the root. Examples: - For BigQuery table `project_id:dataset_id.table_id`, the relative path is `table_id` - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative path is `folder/filename.txt`", "type": "string" }, "rootPath": { - "description": "The root of the container. Examples: - For BigQuery table `project_id:dataset_id.table_id`, the root is `dataset_id` - For Google Cloud Storage file `gs://bucket/folder/filename.txt`, the root is `gs://bucket`", + "description": "The root of the container. Examples: - For BigQuery table `project_id:dataset_id.table_id`, the root is `dataset_id` - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root is `gs://bucket`", "type": "string" }, "type": { - "description": "Container type, for example BigQuery or Google Cloud Storage.", + "description": "Container type, for example BigQuery or Cloud Storage.", "type": "string" }, "updateTime": { - "description": "Findings container modification timestamp, if applicable. For Google Cloud Storage contains last file modification timestamp. For BigQuery table contains last_modified_time property. For Datastore - not populated.", + "description": "Findings container modification timestamp, if applicable. For Cloud Storage, this field contains the last file modification timestamp. For a BigQuery table, this field contains the last_modified_time property. For Datastore, this field isn't populated.", "format": "google-datetime", "type": "string" }, "version": { - "description": "Findings container version, if available (\"generation\" for Google Cloud Storage).", + "description": "Findings container version, if available (\"generation\" for Cloud Storage).", "type": "string" } }, @@ -4107,16 +4111,16 @@ "id": "GooglePrivacyDlpV2ContentLocation", "properties": { "containerName": { - "description": "Name of the container where the finding is located. The top level name is the source file name or table name. Names of some common storage containers are formatted as follows: * BigQuery tables: `{project_id}:{dataset_id}.{table_id}` * Cloud Storage files: `gs://{bucket}/{path}` * Datastore namespace: {namespace} Nested names could be absent if the embedded object has no string identifier (for an example an image contained within a document).", + "description": "Name of the container where the finding is located. The top level name is the source file name or table name. Names of some common storage containers are formatted as follows: * BigQuery tables: `{project_id}:{dataset_id}.{table_id}` * Cloud Storage files: `gs://{bucket}/{path}` * Datastore namespace: {namespace} Nested names could be absent if the embedded object has no string identifier (for example, an image contained within a document).", "type": "string" }, "containerTimestamp": { - "description": "Findings container modification timestamp, if applicable. For Google Cloud Storage contains last file modification timestamp. For BigQuery table contains last_modified_time property. For Datastore - not populated.", + "description": "Finding container modification timestamp, if applicable. For Cloud Storage, this field contains the last file modification timestamp. For a BigQuery table, this field contains the last_modified_time property. For Datastore, this field isn't populated.", "format": "google-datetime", "type": "string" }, "containerVersion": { - "description": "Findings container version, if available (\"generation\" for Google Cloud Storage).", + "description": "Finding container version, if available (\"generation\" for Cloud Storage).", "type": "string" }, "documentLocation": { @@ -4243,7 +4247,7 @@ "properties": { "context": { "$ref": "GooglePrivacyDlpV2FieldId", - "description": "A context may be used for higher security and maintaining referential integrity such that the same identifier in two different contexts will be given a distinct surrogate. The context is appended to plaintext value being encrypted. On decryption the provided context is validated against the value used during encryption. If a context was provided during encryption, same context must be provided during decryption as well. If the context is not set, plaintext would be used as is for encryption. If the context is set but: 1. there is no record present when transforming a given value or 2. the field is not present when transforming a given value, plaintext would be used as is for encryption. Note that case (1) is expected when an `InfoTypeTransformation` is applied to both structured and non-structured `ContentItem`s." + "description": "A context may be used for higher security and maintaining referential integrity such that the same identifier in two different contexts will be given a distinct surrogate. The context is appended to plaintext value being encrypted. On decryption the provided context is validated against the value used during encryption. If a context was provided during encryption, same context must be provided during decryption as well. If the context is not set, plaintext would be used as is for encryption. If the context is set but: 1. there is no record present when transforming a given value or 2. the field is not present when transforming a given value, plaintext would be used as is for encryption. Note that case (1) is expected when an `InfoTypeTransformation` is applied to both structured and unstructured `ContentItem`s." }, "cryptoKey": { "$ref": "GooglePrivacyDlpV2CryptoKey", @@ -4310,7 +4314,7 @@ }, "context": { "$ref": "GooglePrivacyDlpV2FieldId", - "description": "The 'tweak', a context may be used for higher security since the same identifier in two different contexts won't be given the same surrogate. If the context is not set, a default tweak will be used. If the context is set but: 1. there is no record present when transforming a given value or 1. the field is not present when transforming a given value, a default tweak will be used. Note that case (1) is expected when an `InfoTypeTransformation` is applied to both structured and non-structured `ContentItem`s. Currently, the referenced field may be of value type integer or string. The tweak is constructed as a sequence of bytes in big endian byte order such that: - a 64 bit integer is encoded followed by a single byte of value 1 - a string is encoded in UTF-8 format followed by a single byte of value 2" + "description": "The 'tweak', a context may be used for higher security since the same identifier in two different contexts won't be given the same surrogate. If the context is not set, a default tweak will be used. If the context is set but: 1. there is no record present when transforming a given value or 1. the field is not present when transforming a given value, a default tweak will be used. Note that case (1) is expected when an `InfoTypeTransformation` is applied to both structured and unstructured `ContentItem`s. Currently, the referenced field may be of value type integer or string. The tweak is constructed as a sequence of bytes in big endian byte order such that: - a 64 bit integer is encoded followed by a single byte of value 1 - a string is encoded in UTF-8 format followed by a single byte of value 2" }, "cryptoKey": { "$ref": "GooglePrivacyDlpV2CryptoKey", @@ -4486,7 +4490,7 @@ "type": "object" }, "GooglePrivacyDlpV2DataProfilePubSubMessage": { - "description": "The message that will be published to a Pub/Sub topic. To receive a message of protocol buffer schema type, convert the message data to an object of this proto class. https://cloud.google.com/pubsub/docs/samples/pubsub-subscribe-proto-messages", + "description": "Pub/Sub topic message for a DataProfileAction.PubSubNotification event. To receive a message of protocol buffer schema type, convert the message data to an object of this proto class. https://cloud.google.com/pubsub/docs/samples/pubsub-subscribe-proto-messages", "id": "GooglePrivacyDlpV2DataProfilePubSubMessage", "properties": { "event": { @@ -4515,7 +4519,7 @@ "type": "object" }, "GooglePrivacyDlpV2DataRiskLevel": { - "description": "Score is a summary of all elements in the data profile. A higher number means more risky.", + "description": "Score is a summary of all elements in the data profile. A higher number means more risk.", "id": "GooglePrivacyDlpV2DataRiskLevel", "properties": { "score": { @@ -4529,7 +4533,7 @@ "enumDescriptions": [ "Unused.", "Low risk - Lower indication of sensitive data that appears to have additional access restrictions in place or no indication of sensitive data found.", - "Medium risk - Sensitive data may be present but additional access or fine grain access restrictions appears to be present. Consider limiting access even further or transforming data to mask.", + "Medium risk - Sensitive data may be present but additional access or fine grain access restrictions appear to be present. Consider limiting access even further or transform data to mask.", "High risk – SPII may be present. Access controls may include public ACLs. Exfiltration of data may lead to user data loss. Re-identification of users may be possible. Consider limiting usage and or removing SPII." ], "type": "string" @@ -4631,6 +4635,58 @@ }, "type": "object" }, + "GooglePrivacyDlpV2Deidentify": { + "description": "Create a de-identified copy of the requested table or files. . A TransformationDetail will be created for each transformation. If any rows in BigQuery are skipped during de-identification (transformation errors or row size exceeds BigQuery insert API limits) they are placed in the failure output table. If the original row exceeds the BigQuery insert API limit it will be truncated when written to the failure output table. The failure output table can be set in the action.deidentify.output.big_query_output.deidentified_failure_output_table field, if no table is set, a table will be automatically created in the same project and dataset as the original table. Compatible with: Inspect", + "id": "GooglePrivacyDlpV2Deidentify", + "properties": { + "cloudStorageOutput": { + "description": "Required. User settable GCS bucket and folders to store de-identified files. This field must be set for cloud storage deidentification. The output GCS bucket must be different from the input bucket. De-identified files will overwrite files in the output path. Form of: gs://bucket/folder/ or gs://bucket", + "type": "string" + }, + "fileTypesToTransform": { + "description": "List of user-specified file type groups to transform. If specified, only the files with these filetypes will be transformed. If empty, all supported files will be transformed. Supported types may be automatically added over time. If a file type is set in this field that isn't supported by the Deidentify action then the job will fail and will not be successfully created/started. Currently the only filetypes supported are: IMAGES, TEXT_FILES, CSV, TSV.", + "items": { + "enum": [ + "FILE_TYPE_UNSPECIFIED", + "BINARY_FILE", + "TEXT_FILE", + "IMAGE", + "WORD", + "PDF", + "AVRO", + "CSV", + "TSV", + "POWERPOINT", + "EXCEL" + ], + "enumDescriptions": [ + "Includes all files.", + "Includes all file extensions not covered by another entry. Binary scanning attempts to convert the content of the file to utf_8 to scan the file. If you wish to avoid this fall back, specify one or more of the other FileType's in your storage scan.", + "Included file extensions: asc,asp, aspx, brf, c, cc,cfm, cgi, cpp, csv, cxx, c++, cs, css, dart, dat, dot, eml,, epbub, ged, go, h, hh, hpp, hxx, h++, hs, html, htm, mkd, markdown, m, ml, mli, perl, pl, plist, pm, php, phtml, pht, properties, py, pyw, rb, rbw, rs, rss, rc, scala, sh, sql, swift, tex, shtml, shtm, xhtml, lhs, ics, ini, java, js, json, kix, kml, ocaml, md, txt, text, tsv, vb, vcard, vcs, wml, xcodeproj, xml, xsl, xsd, yml, yaml.", + "Included file extensions: bmp, gif, jpg, jpeg, jpe, png. bytes_limit_per_file has no effect on image files. Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.", + "Word files \u003e30 MB will be scanned as binary files. Included file extensions: docx, dotx, docm, dotm", + "PDF files \u003e30 MB will be scanned as binary files. Included file extensions: pdf", + "Included file extensions: avro", + "Included file extensions: csv", + "Included file extensions: tsv", + "Powerpoint files \u003e30 MB will be scanned as binary files. Included file extensions: pptx, pptm, potx, potm, pot", + "Excel files \u003e30 MB will be scanned as binary files. Included file extensions: xlsx, xlsm, xltx, xltm" + ], + "type": "string" + }, + "type": "array" + }, + "transformationConfig": { + "$ref": "GooglePrivacyDlpV2TransformationConfig", + "description": "User specified deidentify templates and configs for structured, unstructured, and image files." + }, + "transformationDetailsStorageConfig": { + "$ref": "GooglePrivacyDlpV2TransformationDetailsStorageConfig", + "description": "Config for storing transformation details. This is separate from the de-identified content, and contains metadata about the successful transformations and/or failures that occurred while de-identifying. This needs to be set in order for users to access information about the status of each transformation (see TransformationDetails message for more information about what is noted)." + } + }, + "type": "object" + }, "GooglePrivacyDlpV2DeidentifyConfig": { "description": "The configuration that controls how the data will change.", "id": "GooglePrivacyDlpV2DeidentifyConfig", @@ -4651,7 +4707,7 @@ "type": "object" }, "GooglePrivacyDlpV2DeidentifyContentRequest": { - "description": "Request to de-identify a list of items.", + "description": "Request to de-identify a ContentItem.", "id": "GooglePrivacyDlpV2DeidentifyContentRequest", "properties": { "deidentifyConfig": { @@ -4908,9 +4964,9 @@ "The job has not yet started.", "The job is currently running. Once a job has finished it will transition to FAILED or DONE.", "The job is no longer running.", - "The job was canceled before it could complete.", + "The job was canceled before it could be completed.", "The job had an error and did not complete.", - "The job is currently accepting findings via hybridInspect. A hybrid job in ACTIVE state may continue to have findings added to it through calling of hybridInspect. After the job has finished no more calls to hybridInspect may be made. ACTIVE jobs can transition to DONE." + "The job is currently accepting findings via hybridInspect. A hybrid job in ACTIVE state may continue to have findings added to it through the calling of hybridInspect. After the job has finished no more calls to hybridInspect may be made. ACTIVE jobs can transition to DONE." ], "type": "string" }, @@ -4974,7 +5030,7 @@ "type": "object" }, "GooglePrivacyDlpV2ExcludeInfoTypes": { - "description": "List of exclude infoTypes.", + "description": "List of excluded infoTypes.", "id": "GooglePrivacyDlpV2ExcludeInfoTypes", "properties": { "infoTypes": { @@ -5034,7 +5090,7 @@ "type": "object" }, "GooglePrivacyDlpV2Expressions": { - "description": "An expression, consisting or an operator and conditions.", + "description": "An expression, consisting of an operator and conditions.", "id": "GooglePrivacyDlpV2Expressions", "properties": { "conditions": { @@ -5189,7 +5245,7 @@ "type": "object" }, "GooglePrivacyDlpV2FindingLimits": { - "description": "Configuration to control the number of findings returned for inspection. This is not used for de-identification or data profiling.", + "description": "Configuration to control the number of findings returned for inspection. This is not used for de-identification or data profiling. When redacting sensitive data from images, finding limits don't apply. They can cause unexpected or inconsistent results, where only some data is redacted. Don't include finding limits in RedactImage requests. Otherwise, Cloud DLP returns an error.", "id": "GooglePrivacyDlpV2FindingLimits", "properties": { "maxFindingsPerInfoType": { @@ -5607,6 +5663,13 @@ "type": "string" }, "type": "array" + }, + "versions": { + "description": "A list of available versions for the infotype.", + "items": { + "$ref": "GooglePrivacyDlpV2VersionDescription" + }, + "type": "array" } }, "type": "object" @@ -5736,7 +5799,7 @@ }, "limits": { "$ref": "GooglePrivacyDlpV2FindingLimits", - "description": "Configuration to control the number of findings returned. This is not used for data profiling." + "description": "Configuration to control the number of findings returned. This is not used for data profiling. When redacting sensitive data from images, finding limits don't apply. They can cause unexpected or inconsistent results, where only some data is redacted. Don't include finding limits in RedactImage requests. Otherwise, Cloud DLP returns an error." }, "minLikelihood": { "description": "Only returns findings equal or above this threshold. The default is POSSIBLE. See https://cloud.google.com/dlp/docs/likelihood to learn more.", @@ -6331,7 +6394,7 @@ "type": "object" }, "GooglePrivacyDlpV2LargeCustomDictionaryConfig": { - "description": "Configuration for a custom dictionary created from a data source of any size up to the maximum size defined in the [limits](https://cloud.google.com/dlp/limits) page. The artifacts of dictionary creation are stored in the specified Google Cloud Storage location. Consider using `CustomInfoType.Dictionary` for smaller dictionaries that satisfy the size requirements.", + "description": "Configuration for a custom dictionary created from a data source of any size up to the maximum size defined in the [limits](https://cloud.google.com/dlp/limits) page. The artifacts of dictionary creation are stored in the specified Cloud Storage location. Consider using `CustomInfoType.Dictionary` for smaller dictionaries that satisfy the size requirements.", "id": "GooglePrivacyDlpV2LargeCustomDictionaryConfig", "properties": { "bigQueryField": { @@ -6344,7 +6407,7 @@ }, "outputPath": { "$ref": "GooglePrivacyDlpV2CloudStoragePath", - "description": "Location to store dictionary artifacts in Google Cloud Storage. These files will only be accessible by project owners and the DLP API. If any of these artifacts are modified, the dictionary is considered invalid and can no longer be used." + "description": "Location to store dictionary artifacts in Cloud Storage. These files will only be accessible by project owners and the DLP API. If any of these artifacts are modified, the dictionary is considered invalid and can no longer be used." } }, "type": "object" @@ -6624,7 +6687,7 @@ "enumDescriptions": [ "Unused.", "Basic schema including only `info_type`, `quote`, `certainty`, and `timestamp`.", - "Schema tailored to findings from scanning Google Cloud Storage.", + "Schema tailored to findings from scanning Cloud Storage.", "Schema tailored to findings from scanning Google Datastore.", "Schema tailored to findings from scanning Google BigQuery.", "Schema containing all columns." @@ -6633,7 +6696,7 @@ }, "table": { "$ref": "GooglePrivacyDlpV2BigQueryTable", - "description": "Store findings in an existing table or a new table in an existing dataset. If table_id is not set a new one will be generated for you with the following format: dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for generating the date details. For Inspect, each column in an existing output table must have the same name, type, and mode of a field in the `Finding` object. For Risk, an existing output table should be the output of a previous Risk analysis job run on the same source table, with the same privacy metric and quasi-identifiers. Risk jobs that analyze the same table but compute a different privacy metric, or use different sets of quasi-identifiers, cannot store their results in the same table." + "description": "Store findings in an existing table or a new table in an existing dataset. If table_id is not set a new one will be generated for you with the following format: dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used for generating the date details. For Inspect, each column in an existing output table must have the same name, type, and mode of a field in the `Finding` object. For Risk, an existing output table should be the output of a previous Risk analysis job run on the same source table, with the same privacy metric and quasi-identifiers. Risk jobs that analyze the same table but compute a different privacy metric, or use different sets of quasi-identifiers, cannot store their results in the same table." } }, "type": "object" @@ -6908,13 +6971,13 @@ "type": "object" }, "GooglePrivacyDlpV2PublishSummaryToCscc": { - "description": "Publish the result summary of a DlpJob to the Cloud Security Command Center (CSCC Alpha). This action is only available for projects which are parts of an organization and whitelisted for the alpha Cloud Security Command Center. The action will publish count of finding instances and their info types. The summary of findings will be persisted in CSCC and are governed by CSCC service-specific policy, see https://cloud.google.com/terms/service-terms Only a single instance of this action can be specified. Compatible with: Inspect", + "description": "Publish the result summary of a DlpJob to the Cloud Security Command Center (CSCC Alpha). This action is only available for projects which are parts of an organization and whitelisted for the alpha Cloud Security Command Center. The action will publish the count of finding instances and their info types. The summary of findings will be persisted in CSCC and are governed by CSCC service-specific policy, see https://cloud.google.com/terms/service-terms Only a single instance of this action can be specified. Compatible with: Inspect", "id": "GooglePrivacyDlpV2PublishSummaryToCscc", "properties": {}, "type": "object" }, "GooglePrivacyDlpV2PublishToPubSub": { - "description": "Publish a message into given Pub/Sub topic when DlpJob has completed. The message contains a single field, `DlpJobName`, which is equal to the finished job's [`DlpJob.name`](https://cloud.google.com/dlp/docs/reference/rest/v2/projects.dlpJobs#DlpJob). Compatible with: Inspect, Risk", + "description": "Publish a message into a given Pub/Sub topic when DlpJob has completed. The message contains a single field, `DlpJobName`, which is equal to the finished job's [`DlpJob.name`](https://cloud.google.com/dlp/docs/reference/rest/v2/projects.dlpJobs#DlpJob). Compatible with: Inspect, Risk", "id": "GooglePrivacyDlpV2PublishToPubSub", "properties": { "topic": { @@ -7200,7 +7263,7 @@ "type": "object" }, "GooglePrivacyDlpV2ReidentifyContentResponse": { - "description": "Results of re-identifying a item.", + "description": "Results of re-identifying an item.", "id": "GooglePrivacyDlpV2ReidentifyContentResponse", "properties": { "item": { @@ -7348,7 +7411,7 @@ "id": "GooglePrivacyDlpV2Schedule", "properties": { "recurrencePeriodDuration": { - "description": "With this option a job is started a regular periodic basis. For example: every day (86400 seconds). A scheduled start time will be skipped if the previous execution has not ended when its scheduled time occurs. This value must be set to a time duration greater than or equal to 1 day and can be no longer than 60 days.", + "description": "With this option a job is started on a regular periodic basis. For example: every day (86400 seconds). A scheduled start time will be skipped if the previous execution has not ended when its scheduled time occurs. This value must be set to a time duration greater than or equal to 1 day and can be no longer than 60 days.", "format": "google-duration", "type": "string" } @@ -7410,7 +7473,7 @@ }, "cloudStorageOptions": { "$ref": "GooglePrivacyDlpV2CloudStorageOptions", - "description": "Google Cloud Storage options." + "description": "Cloud Storage options." }, "datastoreOptions": { "$ref": "GooglePrivacyDlpV2DatastoreOptions", @@ -7510,7 +7573,7 @@ "type": "string" }, "errors": { - "description": "Errors that occurred when creating this storedInfoType version, or anomalies detected in the storedInfoType data that render it unusable. Only the five most recent errors will be displayed, with the most recent error appearing first. For example, some of the data for stored custom dictionaries is put in the user's Google Cloud Storage bucket, and if this data is modified or deleted by the user or another system, the dictionary becomes invalid. If any errors occur, fix the problem indicated by the error message and use the UpdateStoredInfoType API method to create another version of the storedInfoType to continue using it, reusing the same `config` if it was not the source of the error.", + "description": "Errors that occurred when creating this storedInfoType version, or anomalies detected in the storedInfoType data that render it unusable. Only the five most recent errors will be displayed, with the most recent error appearing first. For example, some of the data for stored custom dictionaries is put in the user's Cloud Storage bucket, and if this data is modified or deleted by the user or another system, the dictionary becomes invalid. If any errors occur, fix the problem indicated by the error message and use the UpdateStoredInfoType API method to create another version of the storedInfoType to continue using it, reusing the same `config` if it was not the source of the error.", "items": { "$ref": "GooglePrivacyDlpV2Error" }, @@ -7865,7 +7928,7 @@ "type": "object" }, "GooglePrivacyDlpV2TimespanConfig": { - "description": "Configuration of the timespan of the items to include in scanning. Currently only supported when inspecting Google Cloud Storage and BigQuery.", + "description": "Configuration of the timespan of the items to include in scanning. Currently only supported when inspecting Cloud Storage and BigQuery.", "id": "GooglePrivacyDlpV2TimespanConfig", "properties": { "enableAutoPopulationOfTimespanConfig": { @@ -7884,7 +7947,37 @@ }, "timestampField": { "$ref": "GooglePrivacyDlpV2FieldId", - "description": "Specification of the field containing the timestamp of scanned items. Used for data sources like Datastore and BigQuery. For BigQuery: If this value is not specified and the table was modified between the given start and end times, the entire table will be scanned. If this value is specified, then rows are filtered based on the given start and end times. Rows with a `NULL` value in the provided BigQuery column are skipped. Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`, `TIMESTAMP`, and `DATETIME`. For Datastore: If this value is specified, then entities are filtered based on the given start and end times. If an entity does not contain the provided timestamp property or contains empty or invalid values, then it is included. Valid data types of the provided timestamp property are: `TIMESTAMP`." + "description": "Specification of the field containing the timestamp of scanned items. Used for data sources like Datastore and BigQuery. *For BigQuery* If this value is not specified and the table was modified between the given start and end times, the entire table will be scanned. If this value is specified, then rows are filtered based on the given start and end times. Rows with a `NULL` value in the provided BigQuery column are skipped. Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`, `TIMESTAMP`, and `DATETIME`. If your BigQuery table is [partitioned at ingestion time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time), you can use any of the following pseudo-columns as your timestamp field. When used with Cloud DLP, these pseudo-column names are case sensitive. - _PARTITIONTIME - _PARTITIONDATE - _PARTITION_LOAD_TIME *For Datastore* If this value is specified, then entities are filtered based on the given start and end times. If an entity does not contain the provided timestamp property or contains empty or invalid values, then it is included. Valid data types of the provided timestamp property are: `TIMESTAMP`. See the [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan) related to this operation." + } + }, + "type": "object" + }, + "GooglePrivacyDlpV2TransformationConfig": { + "description": "User specified templates and configs for how to deidentify structured, unstructures, and image files. User must provide either a unstructured deidentify template or at least one redact image config.", + "id": "GooglePrivacyDlpV2TransformationConfig", + "properties": { + "deidentifyTemplate": { + "description": "De-identify template. If this template is specified, it will serve as the default de-identify template. This template cannot contain `record_transformations` since it can be used for unstructured content such as free-form text files. If this template is not set, a default `ReplaceWithInfoTypeConfig` will be used to de-identify unstructured content.", + "type": "string" + }, + "imageRedactTemplate": { + "description": "Image redact template. If this template is specified, it will serve as the de-identify template for images. If this template is not set, all findings in the image will be redacted with a black box.", + "type": "string" + }, + "structuredDeidentifyTemplate": { + "description": "Structured de-identify template. If this template is specified, it will serve as the de-identify template for structured content such as delimited files and tables. If this template is not set but the `deidentify_template` is set, then `deidentify_template` will also apply to the structured content. If neither template is set, a default `ReplaceWithInfoTypeConfig` will be used to de-identify structured content.", + "type": "string" + } + }, + "type": "object" + }, + "GooglePrivacyDlpV2TransformationDetailsStorageConfig": { + "description": "Config for storing transformation details.", + "id": "GooglePrivacyDlpV2TransformationDetailsStorageConfig", + "properties": { + "table": { + "$ref": "GooglePrivacyDlpV2BigQueryTable", + "description": "The BigQuery table in which to store the output. This may be an existing table or in a new table in an existing dataset. If table_id is not set a new one will be generated for you with the following format: dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used for generating the date details." } }, "type": "object" @@ -8145,6 +8238,21 @@ }, "type": "object" }, + "GooglePrivacyDlpV2VersionDescription": { + "description": "Details about each available version for an infotype.", + "id": "GooglePrivacyDlpV2VersionDescription", + "properties": { + "description": { + "description": "Description of the version.", + "type": "string" + }, + "version": { + "description": "Name of the version", + "type": "string" + } + }, + "type": "object" + }, "GooglePrivacyDlpV2WordList": { "description": "Message defining a list of words or phrases to search for in the data.", "id": "GooglePrivacyDlpV2WordList", diff --git a/dlp/v2/dlp-gen.go b/dlp/v2/dlp-gen.go index 8ed816b5810..a91bb540543 100644 --- a/dlp/v2/dlp-gen.go +++ b/dlp/v2/dlp-gen.go @@ -488,6 +488,11 @@ type ProjectsStoredInfoTypesService struct { // job. See https://cloud.google.com/dlp/docs/concepts-actions to learn // more. type GooglePrivacyDlpV2Action struct { + // Deidentify: Create a de-identified copy of the input data. Applicable + // for non-image data only. The de-identified copy is in the same + // location as the original data. + Deidentify *GooglePrivacyDlpV2Deidentify `json:"deidentify,omitempty"` + // JobNotificationEmails: Enable email notification for project owners // and editors on job's completion/failure. JobNotificationEmails *GooglePrivacyDlpV2JobNotificationEmails `json:"jobNotificationEmails,omitempty"` @@ -509,22 +514,20 @@ type GooglePrivacyDlpV2Action struct { // SaveFindings: Save resulting findings in a provided location. SaveFindings *GooglePrivacyDlpV2SaveFindings `json:"saveFindings,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "JobNotificationEmails") 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 is a list of field names (e.g. "Deidentify") 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. "JobNotificationEmails") 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 is a list of field names (e.g. "Deidentify") 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:"-"` } @@ -1225,7 +1228,7 @@ func (s *GooglePrivacyDlpV2CloudStorageFileSet) MarshalJSON() ([]byte, error) { } // GooglePrivacyDlpV2CloudStorageOptions: Options defining a file or a -// set of files within a Google Cloud Storage bucket. +// set of files within a Cloud Storage bucket. type GooglePrivacyDlpV2CloudStorageOptions struct { // BytesLimitPerFile: Max number of bytes to scan from a file. If a // scanned file's size is bigger than this value then the rest of the @@ -1568,8 +1571,8 @@ func (s *GooglePrivacyDlpV2Conditions) MarshalJSON() ([]byte, error) { // database record. type GooglePrivacyDlpV2Container struct { // FullPath: A string representation of the full container name. - // Examples: - BigQuery: 'Project:DataSetId.TableId' - Google Cloud - // Storage: 'gs://Bucket/folders/filename.txt' + // Examples: - BigQuery: 'Project:DataSetId.TableId' - Cloud Storage: + // 'gs://Bucket/folders/filename.txt' FullPath string `json:"fullPath,omitempty"` // ProjectId: Project where the finding was found. Can be different from @@ -1578,28 +1581,29 @@ type GooglePrivacyDlpV2Container struct { // RelativePath: The rest of the path after the root. Examples: - For // BigQuery table `project_id:dataset_id.table_id`, the relative path is - // `table_id` - Google Cloud Storage file + // `table_id` - For Cloud Storage file // `gs://bucket/folder/filename.txt`, the relative path is // `folder/filename.txt` RelativePath string `json:"relativePath,omitempty"` // RootPath: The root of the container. Examples: - For BigQuery table // `project_id:dataset_id.table_id`, the root is `dataset_id` - For - // Google Cloud Storage file `gs://bucket/folder/filename.txt`, the root - // is `gs://bucket` + // Cloud Storage file `gs://bucket/folder/filename.txt`, the root is + // `gs://bucket` RootPath string `json:"rootPath,omitempty"` - // Type: Container type, for example BigQuery or Google Cloud Storage. + // Type: Container type, for example BigQuery or Cloud Storage. Type string `json:"type,omitempty"` // UpdateTime: Findings container modification timestamp, if applicable. - // For Google Cloud Storage contains last file modification timestamp. - // For BigQuery table contains last_modified_time property. For - // Datastore - not populated. + // For Cloud Storage, this field contains the last file modification + // timestamp. For a BigQuery table, this field contains the + // last_modified_time property. For Datastore, this field isn't + // populated. UpdateTime string `json:"updateTime,omitempty"` // Version: Findings container version, if available ("generation" for - // Google Cloud Storage). + // Cloud Storage). Version string `json:"version,omitempty"` // ForceSendFields is a list of field names (e.g. "FullPath") to @@ -1672,17 +1676,18 @@ type GooglePrivacyDlpV2ContentLocation struct { // tables: `{project_id}:{dataset_id}.{table_id}` * Cloud Storage files: // `gs://{bucket}/{path}` * Datastore namespace: {namespace} Nested // names could be absent if the embedded object has no string identifier - // (for an example an image contained within a document). + // (for example, an image contained within a document). ContainerName string `json:"containerName,omitempty"` - // ContainerTimestamp: Findings container modification timestamp, if - // applicable. For Google Cloud Storage contains last file modification - // timestamp. For BigQuery table contains last_modified_time property. - // For Datastore - not populated. + // ContainerTimestamp: Finding container modification timestamp, if + // applicable. For Cloud Storage, this field contains the last file + // modification timestamp. For a BigQuery table, this field contains the + // last_modified_time property. For Datastore, this field isn't + // populated. ContainerTimestamp string `json:"containerTimestamp,omitempty"` - // ContainerVersion: Findings container version, if available - // ("generation" for Google Cloud Storage). + // ContainerVersion: Finding container version, if available + // ("generation" for Cloud Storage). ContainerVersion string `json:"containerVersion,omitempty"` // DocumentLocation: Location data for document files. @@ -1935,7 +1940,7 @@ type GooglePrivacyDlpV2CryptoDeterministicConfig struct { // not present when transforming a given value, plaintext would be used // as is for encryption. Note that case (1) is expected when an // `InfoTypeTransformation` is applied to both structured and - // non-structured `ContentItem`s. + // unstructured `ContentItem`s. Context *GooglePrivacyDlpV2FieldId `json:"context,omitempty"` // CryptoKey: The key used by the encryption function. For deterministic @@ -2096,7 +2101,7 @@ type GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig struct { // transforming a given value or 1. the field is not present when // transforming a given value, a default tweak will be used. Note that // case (1) is expected when an `InfoTypeTransformation` is applied to - // both structured and non-structured `ContentItem`s. Currently, the + // both structured and unstructured `ContentItem`s. Currently, the // referenced field may be of value type integer or string. The tweak is // constructed as a sequence of bytes in big endian byte order such // that: - a 64 bit integer is encoded followed by a single byte of @@ -2432,10 +2437,10 @@ func (s *GooglePrivacyDlpV2DataProfilePubSubCondition) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2DataProfilePubSubMessage: The message that will be -// published to a Pub/Sub topic. To receive a message of protocol buffer -// schema type, convert the message data to an object of this proto -// class. +// GooglePrivacyDlpV2DataProfilePubSubMessage: Pub/Sub topic message for +// a DataProfileAction.PubSubNotification event. To receive a message of +// protocol buffer schema type, convert the message data to an object of +// this proto class. // https://cloud.google.com/pubsub/docs/samples/pubsub-subscribe-proto-messages type GooglePrivacyDlpV2DataProfilePubSubMessage struct { // Event: The event that caused the Pub/Sub message to be sent. @@ -2481,7 +2486,7 @@ func (s *GooglePrivacyDlpV2DataProfilePubSubMessage) MarshalJSON() ([]byte, erro } // GooglePrivacyDlpV2DataRiskLevel: Score is a summary of all elements -// in the data profile. A higher number means more risky. +// in the data profile. A higher number means more risk. type GooglePrivacyDlpV2DataRiskLevel struct { // Score: The score applied to the resource. // @@ -2491,9 +2496,9 @@ type GooglePrivacyDlpV2DataRiskLevel struct { // appears to have additional access restrictions in place or no // indication of sensitive data found. // "RISK_MODERATE" - Medium risk - Sensitive data may be present but - // additional access or fine grain access restrictions appears to be - // present. Consider limiting access even further or transforming data - // to mask. + // additional access or fine grain access restrictions appear to be + // present. Consider limiting access even further or transform data to + // mask. // "RISK_HIGH" - High risk – SPII may be present. Access controls // may include public ACLs. Exfiltration of data may lead to user data // loss. Re-identification of users may be possible. Consider limiting @@ -2685,6 +2690,101 @@ func (s *GooglePrivacyDlpV2DateTime) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GooglePrivacyDlpV2Deidentify: Create a de-identified copy of the +// requested table or files. . A TransformationDetail will be created +// for each transformation. If any rows in BigQuery are skipped during +// de-identification (transformation errors or row size exceeds BigQuery +// insert API limits) they are placed in the failure output table. If +// the original row exceeds the BigQuery insert API limit it will be +// truncated when written to the failure output table. The failure +// output table can be set in the +// action.deidentify.output.big_query_output.deidentified_failure_output_ +// table field, if no table is set, a table will be automatically +// created in the same project and dataset as the original table. +// Compatible with: Inspect +type GooglePrivacyDlpV2Deidentify struct { + // CloudStorageOutput: Required. User settable GCS bucket and folders to + // store de-identified files. This field must be set for cloud storage + // deidentification. The output GCS bucket must be different from the + // input bucket. De-identified files will overwrite files in the output + // path. Form of: gs://bucket/folder/ or gs://bucket + CloudStorageOutput string `json:"cloudStorageOutput,omitempty"` + + // FileTypesToTransform: List of user-specified file type groups to + // transform. If specified, only the files with these filetypes will be + // transformed. If empty, all supported files will be transformed. + // Supported types may be automatically added over time. If a file type + // is set in this field that isn't supported by the Deidentify action + // then the job will fail and will not be successfully created/started. + // Currently the only filetypes supported are: IMAGES, TEXT_FILES, CSV, + // TSV. + // + // Possible values: + // "FILE_TYPE_UNSPECIFIED" - Includes all files. + // "BINARY_FILE" - Includes all file extensions not covered by another + // entry. Binary scanning attempts to convert the content of the file to + // utf_8 to scan the file. If you wish to avoid this fall back, specify + // one or more of the other FileType's in your storage scan. + // "TEXT_FILE" - Included file extensions: asc,asp, aspx, brf, c, + // cc,cfm, cgi, cpp, csv, cxx, c++, cs, css, dart, dat, dot, eml,, + // epbub, ged, go, h, hh, hpp, hxx, h++, hs, html, htm, mkd, markdown, + // m, ml, mli, perl, pl, plist, pm, php, phtml, pht, properties, py, + // pyw, rb, rbw, rs, rss, rc, scala, sh, sql, swift, tex, shtml, shtm, + // xhtml, lhs, ics, ini, java, js, json, kix, kml, ocaml, md, txt, text, + // tsv, vb, vcard, vcs, wml, xcodeproj, xml, xsl, xsd, yml, yaml. + // "IMAGE" - Included file extensions: bmp, gif, jpg, jpeg, jpe, png. + // bytes_limit_per_file has no effect on image files. Image inspection + // is restricted to 'global', 'us', 'asia', and 'europe'. + // "WORD" - Word files >30 MB will be scanned as binary files. + // Included file extensions: docx, dotx, docm, dotm + // "PDF" - PDF files >30 MB will be scanned as binary files. Included + // file extensions: pdf + // "AVRO" - Included file extensions: avro + // "CSV" - Included file extensions: csv + // "TSV" - Included file extensions: tsv + // "POWERPOINT" - Powerpoint files >30 MB will be scanned as binary + // files. Included file extensions: pptx, pptm, potx, potm, pot + // "EXCEL" - Excel files >30 MB will be scanned as binary files. + // Included file extensions: xlsx, xlsm, xltx, xltm + FileTypesToTransform []string `json:"fileTypesToTransform,omitempty"` + + // TransformationConfig: User specified deidentify templates and configs + // for structured, unstructured, and image files. + TransformationConfig *GooglePrivacyDlpV2TransformationConfig `json:"transformationConfig,omitempty"` + + // TransformationDetailsStorageConfig: Config for storing transformation + // details. This is separate from the de-identified content, and + // contains metadata about the successful transformations and/or + // failures that occurred while de-identifying. This needs to be set in + // order for users to access information about the status of each + // transformation (see TransformationDetails message for more + // information about what is noted). + TransformationDetailsStorageConfig *GooglePrivacyDlpV2TransformationDetailsStorageConfig `json:"transformationDetailsStorageConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CloudStorageOutput") + // 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. "CloudStorageOutput") 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 *GooglePrivacyDlpV2Deidentify) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2Deidentify + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GooglePrivacyDlpV2DeidentifyConfig: The configuration that controls // how the data will change. type GooglePrivacyDlpV2DeidentifyConfig struct { @@ -2728,7 +2828,7 @@ func (s *GooglePrivacyDlpV2DeidentifyConfig) MarshalJSON() ([]byte, error) { } // GooglePrivacyDlpV2DeidentifyContentRequest: Request to de-identify a -// list of items. +// ContentItem. type GooglePrivacyDlpV2DeidentifyContentRequest struct { // DeidentifyConfig: Configuration for the de-identification of the // content item. Items specified here will override the template @@ -3197,13 +3297,13 @@ type GooglePrivacyDlpV2DlpJob struct { // "RUNNING" - The job is currently running. Once a job has finished // it will transition to FAILED or DONE. // "DONE" - The job is no longer running. - // "CANCELED" - The job was canceled before it could complete. + // "CANCELED" - The job was canceled before it could be completed. // "FAILED" - The job had an error and did not complete. // "ACTIVE" - The job is currently accepting findings via // hybridInspect. A hybrid job in ACTIVE state may continue to have - // findings added to it through calling of hybridInspect. After the job - // has finished no more calls to hybridInspect may be made. ACTIVE jobs - // can transition to DONE. + // findings added to it through the calling of hybridInspect. After the + // job has finished no more calls to hybridInspect may be made. ACTIVE + // jobs can transition to DONE. State string `json:"state,omitempty"` // Type: The type of job. @@ -3338,7 +3438,7 @@ func (s *GooglePrivacyDlpV2Error) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2ExcludeInfoTypes: List of exclude infoTypes. +// GooglePrivacyDlpV2ExcludeInfoTypes: List of excluded infoTypes. type GooglePrivacyDlpV2ExcludeInfoTypes struct { // InfoTypes: InfoType list in ExclusionRule rule drops a finding when // it overlaps or contained within with a finding of an infoType from @@ -3460,7 +3560,7 @@ func (s *GooglePrivacyDlpV2Export) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2Expressions: An expression, consisting or an +// GooglePrivacyDlpV2Expressions: An expression, consisting of an // operator and conditions. type GooglePrivacyDlpV2Expressions struct { // Conditions: Conditions to apply to the expression. @@ -3706,7 +3806,11 @@ func (s *GooglePrivacyDlpV2Finding) MarshalJSON() ([]byte, error) { // GooglePrivacyDlpV2FindingLimits: Configuration to control the number // of findings returned for inspection. This is not used for -// de-identification or data profiling. +// de-identification or data profiling. When redacting sensitive data +// from images, finding limits don't apply. They can cause unexpected or +// inconsistent results, where only some data is redacted. Don't include +// finding limits in RedactImage requests. Otherwise, Cloud DLP returns +// an error. type GooglePrivacyDlpV2FindingLimits struct { // MaxFindingsPerInfoType: Configuration of findings limit given for // specified infoTypes. @@ -4365,6 +4469,9 @@ type GooglePrivacyDlpV2InfoTypeDescription struct { // "RISK_ANALYSIS" - Supported by the risk analysis operations. SupportedBy []string `json:"supportedBy,omitempty"` + // Versions: A list of available versions for the infotype. + Versions []*GooglePrivacyDlpV2VersionDescription `json:"versions,omitempty"` + // ForceSendFields is a list of field names (e.g. "Categories") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -4598,7 +4705,11 @@ type GooglePrivacyDlpV2InspectConfig struct { InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` // Limits: Configuration to control the number of findings returned. - // This is not used for data profiling. + // This is not used for data profiling. When redacting sensitive data + // from images, finding limits don't apply. They can cause unexpected or + // inconsistent results, where only some data is redacted. Don't include + // finding limits in RedactImage requests. Otherwise, Cloud DLP returns + // an error. Limits *GooglePrivacyDlpV2FindingLimits `json:"limits,omitempty"` // MinLikelihood: Only returns findings equal or above this threshold. @@ -5630,7 +5741,7 @@ func (s *GooglePrivacyDlpV2LDiversityResult) MarshalJSON() ([]byte, error) { // custom dictionary created from a data source of any size up to the // maximum size defined in the limits // (https://cloud.google.com/dlp/limits) page. The artifacts of -// dictionary creation are stored in the specified Google Cloud Storage +// dictionary creation are stored in the specified Cloud Storage // location. Consider using `CustomInfoType.Dictionary` for smaller // dictionaries that satisfy the size requirements. type GooglePrivacyDlpV2LargeCustomDictionaryConfig struct { @@ -5642,10 +5753,10 @@ type GooglePrivacyDlpV2LargeCustomDictionaryConfig struct { // of dictionary phrases. CloudStorageFileSet *GooglePrivacyDlpV2CloudStorageFileSet `json:"cloudStorageFileSet,omitempty"` - // OutputPath: Location to store dictionary artifacts in Google Cloud - // Storage. These files will only be accessible by project owners and - // the DLP API. If any of these artifacts are modified, the dictionary - // is considered invalid and can no longer be used. + // OutputPath: Location to store dictionary artifacts in Cloud Storage. + // These files will only be accessible by project owners and the DLP + // API. If any of these artifacts are modified, the dictionary is + // considered invalid and can no longer be used. OutputPath *GooglePrivacyDlpV2CloudStoragePath `json:"outputPath,omitempty"` // ForceSendFields is a list of field names (e.g. "BigQueryField") to @@ -6185,8 +6296,8 @@ type GooglePrivacyDlpV2OutputStorageConfig struct { // "OUTPUT_SCHEMA_UNSPECIFIED" - Unused. // "BASIC_COLUMNS" - Basic schema including only `info_type`, `quote`, // `certainty`, and `timestamp`. - // "GCS_COLUMNS" - Schema tailored to findings from scanning Google - // Cloud Storage. + // "GCS_COLUMNS" - Schema tailored to findings from scanning Cloud + // Storage. // "DATASTORE_COLUMNS" - Schema tailored to findings from scanning // Google Datastore. // "BIG_QUERY_COLUMNS" - Schema tailored to findings from scanning @@ -6197,8 +6308,8 @@ type GooglePrivacyDlpV2OutputStorageConfig struct { // Table: Store findings in an existing table or a new table in an // existing dataset. If table_id is not set a new one will be generated // for you with the following format: - // dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used - // for generating the date details. For Inspect, each column in an + // dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be + // used for generating the date details. For Inspect, each column in an // existing output table must have the same name, type, and mode of a // field in the `Finding` object. For Risk, an existing output table // should be the output of a previous Risk analysis job run on the same @@ -6647,15 +6758,15 @@ type GooglePrivacyDlpV2PublishFindingsToCloudDataCatalog struct { // a DlpJob to the Cloud Security Command Center (CSCC Alpha). This // action is only available for projects which are parts of an // organization and whitelisted for the alpha Cloud Security Command -// Center. The action will publish count of finding instances and their -// info types. The summary of findings will be persisted in CSCC and are -// governed by CSCC service-specific policy, see +// Center. The action will publish the count of finding instances and +// their info types. The summary of findings will be persisted in CSCC +// and are governed by CSCC service-specific policy, see // https://cloud.google.com/terms/service-terms Only a single instance // of this action can be specified. Compatible with: Inspect type GooglePrivacyDlpV2PublishSummaryToCscc struct { } -// GooglePrivacyDlpV2PublishToPubSub: Publish a message into given +// GooglePrivacyDlpV2PublishToPubSub: Publish a message into a given // Pub/Sub topic when DlpJob has completed. The message contains a // single field, `DlpJobName`, which is equal to the finished job's // `DlpJob.name` @@ -7230,7 +7341,7 @@ func (s *GooglePrivacyDlpV2ReidentifyContentRequest) MarshalJSON() ([]byte, erro } // GooglePrivacyDlpV2ReidentifyContentResponse: Results of -// re-identifying a item. +// re-identifying an item. type GooglePrivacyDlpV2ReidentifyContentResponse struct { // Item: The re-identified item. Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` @@ -7530,12 +7641,12 @@ func (s *GooglePrivacyDlpV2SaveFindings) MarshalJSON() ([]byte, error) { // GooglePrivacyDlpV2Schedule: Schedule for inspect job triggers. type GooglePrivacyDlpV2Schedule struct { - // RecurrencePeriodDuration: With this option a job is started a regular - // periodic basis. For example: every day (86400 seconds). A scheduled - // start time will be skipped if the previous execution has not ended - // when its scheduled time occurs. This value must be set to a time - // duration greater than or equal to 1 day and can be no longer than 60 - // days. + // RecurrencePeriodDuration: With this option a job is started on a + // regular periodic basis. For example: every day (86400 seconds). A + // scheduled start time will be skipped if the previous execution has + // not ended when its scheduled time occurs. This value must be set to a + // time duration greater than or equal to 1 day and can be no longer + // than 60 days. RecurrencePeriodDuration string `json:"recurrencePeriodDuration,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -7651,7 +7762,7 @@ type GooglePrivacyDlpV2StorageConfig struct { // BigQueryOptions: BigQuery options. BigQueryOptions *GooglePrivacyDlpV2BigQueryOptions `json:"bigQueryOptions,omitempty"` - // CloudStorageOptions: Google Cloud Storage options. + // CloudStorageOptions: Cloud Storage options. CloudStorageOptions *GooglePrivacyDlpV2CloudStorageOptions `json:"cloudStorageOptions,omitempty"` // DatastoreOptions: Google Cloud Datastore options. @@ -7847,10 +7958,10 @@ type GooglePrivacyDlpV2StoredInfoTypeVersion struct { // version, or anomalies detected in the storedInfoType data that render // it unusable. Only the five most recent errors will be displayed, with // the most recent error appearing first. For example, some of the data - // for stored custom dictionaries is put in the user's Google Cloud - // Storage bucket, and if this data is modified or deleted by the user - // or another system, the dictionary becomes invalid. If any errors - // occur, fix the problem indicated by the error message and use the + // for stored custom dictionaries is put in the user's Cloud Storage + // bucket, and if this data is modified or deleted by the user or + // another system, the dictionary becomes invalid. If any errors occur, + // fix the problem indicated by the error message and use the // UpdateStoredInfoType API method to create another version of the // storedInfoType to continue using it, reusing the same `config` if it // was not the source of the error. @@ -8335,7 +8446,7 @@ func (s *GooglePrivacyDlpV2TimeZone) MarshalJSON() ([]byte, error) { // GooglePrivacyDlpV2TimespanConfig: Configuration of the timespan of // the items to include in scanning. Currently only supported when -// inspecting Google Cloud Storage and BigQuery. +// inspecting Cloud Storage and BigQuery. type GooglePrivacyDlpV2TimespanConfig struct { // EnableAutoPopulationOfTimespanConfig: When the job is started by a // JobTrigger we will automatically figure out a valid start_time to @@ -8354,17 +8465,24 @@ type GooglePrivacyDlpV2TimespanConfig struct { // TimestampField: Specification of the field containing the timestamp // of scanned items. Used for data sources like Datastore and BigQuery. - // For BigQuery: If this value is not specified and the table was + // *For BigQuery* If this value is not specified and the table was // modified between the given start and end times, the entire table will // be scanned. If this value is specified, then rows are filtered based // on the given start and end times. Rows with a `NULL` value in the // provided BigQuery column are skipped. Valid data types of the // provided BigQuery column are: `INTEGER`, `DATE`, `TIMESTAMP`, and - // `DATETIME`. For Datastore: If this value is specified, then entities - // are filtered based on the given start and end times. If an entity - // does not contain the provided timestamp property or contains empty or + // `DATETIME`. If your BigQuery table is partitioned at ingestion time + // (https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time), + // you can use any of the following pseudo-columns as your timestamp + // field. When used with Cloud DLP, these pseudo-column names are case + // sensitive. - _PARTITIONTIME - _PARTITIONDATE - _PARTITION_LOAD_TIME + // *For Datastore* If this value is specified, then entities are + // filtered based on the given start and end times. If an entity does + // not contain the provided timestamp property or contains empty or // invalid values, then it is included. Valid data types of the provided - // timestamp property are: `TIMESTAMP`. + // timestamp property are: `TIMESTAMP`. See the known issue + // (https://cloud.google.com/dlp/docs/known-issues#bq-timespan) related + // to this operation. TimestampField *GooglePrivacyDlpV2FieldId `json:"timestampField,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -8392,6 +8510,92 @@ func (s *GooglePrivacyDlpV2TimespanConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GooglePrivacyDlpV2TransformationConfig: User specified templates and +// configs for how to deidentify structured, unstructures, and image +// files. User must provide either a unstructured deidentify template or +// at least one redact image config. +type GooglePrivacyDlpV2TransformationConfig struct { + // DeidentifyTemplate: De-identify template. If this template is + // specified, it will serve as the default de-identify template. This + // template cannot contain `record_transformations` since it can be used + // for unstructured content such as free-form text files. If this + // template is not set, a default `ReplaceWithInfoTypeConfig` will be + // used to de-identify unstructured content. + DeidentifyTemplate string `json:"deidentifyTemplate,omitempty"` + + // ImageRedactTemplate: Image redact template. If this template is + // specified, it will serve as the de-identify template for images. If + // this template is not set, all findings in the image will be redacted + // with a black box. + ImageRedactTemplate string `json:"imageRedactTemplate,omitempty"` + + // StructuredDeidentifyTemplate: Structured de-identify template. If + // this template is specified, it will serve as the de-identify template + // for structured content such as delimited files and tables. If this + // template is not set but the `deidentify_template` is set, then + // `deidentify_template` will also apply to the structured content. If + // neither template is set, a default `ReplaceWithInfoTypeConfig` will + // be used to de-identify structured content. + StructuredDeidentifyTemplate string `json:"structuredDeidentifyTemplate,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeidentifyTemplate") + // 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. "DeidentifyTemplate") 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 *GooglePrivacyDlpV2TransformationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2TransformationConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2TransformationDetailsStorageConfig: Config for +// storing transformation details. +type GooglePrivacyDlpV2TransformationDetailsStorageConfig struct { + // Table: The BigQuery table in which to store the output. This may be + // an existing table or in a new table in an existing dataset. If + // table_id is not set a new one will be generated for you with the + // following format: + // dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. + // Pacific time zone will be used for generating the date details. + Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Table") 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. "Table") 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 *GooglePrivacyDlpV2TransformationDetailsStorageConfig) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2TransformationDetailsStorageConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GooglePrivacyDlpV2TransformationErrorHandling: How to handle // transformation errors during de-identification. A transformation // error occurs when the requested transformation is incompatible with @@ -8860,6 +9064,38 @@ func (s *GooglePrivacyDlpV2ValueFrequency) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GooglePrivacyDlpV2VersionDescription: Details about each available +// version for an infotype. +type GooglePrivacyDlpV2VersionDescription struct { + // Description: Description of the version. + Description string `json:"description,omitempty"` + + // Version: Name of the version + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") 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. "Description") 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 *GooglePrivacyDlpV2VersionDescription) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2VersionDescription + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GooglePrivacyDlpV2WordList: Message defining a list of words or // phrases to search for in the data. type GooglePrivacyDlpV2WordList struct { @@ -9047,9 +9283,9 @@ type InfoTypesListCall struct { header_ http.Header } -// List: Returns a list of the sensitive information types that the DLP -// API supports. See -// https://cloud.google.com/dlp/docs/infotypes-reference to learn more. +// List: Returns a list of the sensitive information types that DLP API +// supports. See https://cloud.google.com/dlp/docs/infotypes-reference +// to learn more. func (r *InfoTypesService) List() *InfoTypesListCall { c := &InfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -9183,7 +9419,7 @@ func (c *InfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV } return ret, nil // { - // "description": "Returns a list of the sensitive information types that the DLP API supports. See https://cloud.google.com/dlp/docs/infotypes-reference to learn more.", + // "description": "Returns a list of the sensitive information types that DLP API supports. See https://cloud.google.com/dlp/docs/infotypes-reference to learn more.", // "flatPath": "v2/infoTypes", // "httpMethod": "GET", // "id": "dlp.infoTypes.list", @@ -9232,9 +9468,9 @@ type LocationsInfoTypesListCall struct { header_ http.Header } -// List: Returns a list of the sensitive information types that the DLP -// API supports. See -// https://cloud.google.com/dlp/docs/infotypes-reference to learn more. +// List: Returns a list of the sensitive information types that DLP API +// supports. See https://cloud.google.com/dlp/docs/infotypes-reference +// to learn more. // // - parent: The parent resource name. The format of this value is as // follows: locations/ LOCATION_ID. @@ -9368,7 +9604,7 @@ func (c *LocationsInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePr } return ret, nil // { - // "description": "Returns a list of the sensitive information types that the DLP API supports. See https://cloud.google.com/dlp/docs/infotypes-reference to learn more.", + // "description": "Returns a list of the sensitive information types that DLP API supports. See https://cloud.google.com/dlp/docs/infotypes-reference to learn more.", // "flatPath": "v2/locations/{locationsId}/infoTypes", // "httpMethod": "GET", // "id": "dlp.locations.infoTypes.list", @@ -9421,7 +9657,7 @@ type OrganizationsDeidentifyTemplatesCreateCall struct { header_ http.Header } -// Create: Creates a DeidentifyTemplate for re-using frequently used +// Create: Creates a DeidentifyTemplate for reusing frequently used // configuration for de-identifying content, images, and storage. See // https://cloud.google.com/dlp/docs/creating-templates-deid to learn // more. @@ -9539,7 +9775,7 @@ func (c *OrganizationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + // "description": "Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates", // "httpMethod": "POST", // "id": "dlp.organizations.deidentifyTemplates.create", @@ -9905,18 +10141,18 @@ func (c *OrganizationsDeidentifyTemplatesListCall) LocationId(locationId string) // is case-insensitive, default sorting order is ascending, redundant // space characters are insignificant. Example: `name asc,update_time, // create_time desc` Supported fields are: - `create_time`: corresponds -// to time the template was created. - `update_time`: corresponds to -// time the template was last updated. - `name`: corresponds to -// template's name. - `display_name`: corresponds to template's display -// name. +// to the time the template was created. - `update_time`: corresponds to +// the time the template was last updated. - `name`: corresponds to the +// template's name. - `display_name`: corresponds to the template's +// display name. func (c *OrganizationsDeidentifyTemplatesListCall) OrderBy(orderBy string) *OrganizationsDeidentifyTemplatesListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Size of the page, -// can be limited by server. If zero server returns a page of max size -// 100. +// can be limited by the server. If zero server returns a page of max +// size 100. func (c *OrganizationsDeidentifyTemplatesListCall) PageSize(pageSize int64) *OrganizationsDeidentifyTemplatesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -10045,12 +10281,12 @@ func (c *OrganizationsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOpti // "type": "string" // }, // "orderBy": { - // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the template was created. - `update_time`: corresponds to time the template was last updated. - `name`: corresponds to template's name. - `display_name`: corresponds to template's display name.", + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", + // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", // "format": "int32", // "location": "query", // "type": "integer" @@ -10259,7 +10495,7 @@ type OrganizationsInspectTemplatesCreateCall struct { header_ http.Header } -// Create: Creates an InspectTemplate for re-using frequently used +// Create: Creates an InspectTemplate for reusing frequently used // configuration for inspecting content, images, and storage. See // https://cloud.google.com/dlp/docs/creating-templates to learn more. // @@ -10376,7 +10612,7 @@ func (c *OrganizationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Creates an InspectTemplate for re-using frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + // "description": "Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates", // "httpMethod": "POST", // "id": "dlp.organizations.inspectTemplates.create", @@ -10739,18 +10975,18 @@ func (c *OrganizationsInspectTemplatesListCall) LocationId(locationId string) *O // is case-insensitive, default sorting order is ascending, redundant // space characters are insignificant. Example: `name asc,update_time, // create_time desc` Supported fields are: - `create_time`: corresponds -// to time the template was created. - `update_time`: corresponds to -// time the template was last updated. - `name`: corresponds to -// template's name. - `display_name`: corresponds to template's display -// name. +// to the time the template was created. - `update_time`: corresponds to +// the time the template was last updated. - `name`: corresponds to the +// template's name. - `display_name`: corresponds to the template's +// display name. func (c *OrganizationsInspectTemplatesListCall) OrderBy(orderBy string) *OrganizationsInspectTemplatesListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Size of the page, -// can be limited by server. If zero server returns a page of max size -// 100. +// can be limited by the server. If zero server returns a page of max +// size 100. func (c *OrganizationsInspectTemplatesListCall) PageSize(pageSize int64) *OrganizationsInspectTemplatesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -10879,12 +11115,12 @@ func (c *OrganizationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) // "type": "string" // }, // "orderBy": { - // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the template was created. - `update_time`: corresponds to time the template was last updated. - `name`: corresponds to template's name. - `display_name`: corresponds to template's display name.", + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", + // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", // "format": "int32", // "location": "query", // "type": "integer" @@ -11092,7 +11328,7 @@ type OrganizationsLocationsDeidentifyTemplatesCreateCall struct { header_ http.Header } -// Create: Creates a DeidentifyTemplate for re-using frequently used +// Create: Creates a DeidentifyTemplate for reusing frequently used // configuration for de-identifying content, images, and storage. See // https://cloud.google.com/dlp/docs/creating-templates-deid to learn // more. @@ -11210,7 +11446,7 @@ func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Do(opts ...googlea } return ret, nil // { - // "description": "Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + // "description": "Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates", // "httpMethod": "POST", // "id": "dlp.organizations.locations.deidentifyTemplates.create", @@ -11576,18 +11812,18 @@ func (c *OrganizationsLocationsDeidentifyTemplatesListCall) LocationId(locationI // is case-insensitive, default sorting order is ascending, redundant // space characters are insignificant. Example: `name asc,update_time, // create_time desc` Supported fields are: - `create_time`: corresponds -// to time the template was created. - `update_time`: corresponds to -// time the template was last updated. - `name`: corresponds to -// template's name. - `display_name`: corresponds to template's display -// name. +// to the time the template was created. - `update_time`: corresponds to +// the time the template was last updated. - `name`: corresponds to the +// template's name. - `display_name`: corresponds to the template's +// display name. func (c *OrganizationsLocationsDeidentifyTemplatesListCall) OrderBy(orderBy string) *OrganizationsLocationsDeidentifyTemplatesListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Size of the page, -// can be limited by server. If zero server returns a page of max size -// 100. +// can be limited by the server. If zero server returns a page of max +// size 100. func (c *OrganizationsLocationsDeidentifyTemplatesListCall) PageSize(pageSize int64) *OrganizationsLocationsDeidentifyTemplatesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -11716,12 +11952,12 @@ func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Do(opts ...googleapi // "type": "string" // }, // "orderBy": { - // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the template was created. - `update_time`: corresponds to time the template was last updated. - `name`: corresponds to template's name. - `display_name`: corresponds to template's display name.", + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", + // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", // "format": "int32", // "location": "query", // "type": "integer" @@ -11958,13 +12194,13 @@ func (r *OrganizationsLocationsDlpJobsService) List(parentid string) *Organizati // restriction has the form of `{field} {operator} {value}`. * Supported // fields/values for inspect jobs: - `state` - // PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - -// DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The resource name -// of the trigger that created job. - 'end_time` - Corresponds to time -// the job finished. - 'start_time` - Corresponds to time the job +// DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The name of the +// trigger that created the job. - 'end_time` - Corresponds to the time +// the job finished. - 'start_time` - Corresponds to the time the job // finished. * Supported fields for risk analysis jobs: - `state` - -// RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to time -// the job finished. - 'start_time` - Corresponds to time the job -// finished. * The operator must be `=` or `!=`. Examples: * +// RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to the +// time the job finished. - 'start_time` - Corresponds to the time the +// job finished. * The operator must be `=` or `!=`. Examples: * // inspected_storage = cloud_storage AND state = done * // inspected_storage = cloud_storage OR inspected_storage = bigquery * // inspected_storage = cloud_storage AND (state = done OR state = @@ -11987,9 +12223,9 @@ func (c *OrganizationsLocationsDlpJobsListCall) LocationId(locationId string) *O // is case-insensitive, default sorting order is ascending, redundant // space characters are insignificant. Example: `name asc, end_time asc, // create_time desc` Supported fields are: - `create_time`: corresponds -// to time the job was created. - `end_time`: corresponds to time the -// job ended. - `name`: corresponds to job's name. - `state`: -// corresponds to `state` +// to the time the job was created. - `end_time`: corresponds to the +// time the job ended. - `name`: corresponds to the job's name. - +// `state`: corresponds to `state` func (c *OrganizationsLocationsDlpJobsListCall) OrderBy(orderBy string) *OrganizationsLocationsDlpJobsListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -12130,7 +12366,7 @@ func (c *OrganizationsLocationsDlpJobsListCall) Do(opts ...googleapi.CallOption) // ], // "parameters": { // "filter": { - // "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect jobs: - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The resource name of the trigger that created job. - 'end_time` - Corresponds to time the job finished. - 'start_time` - Corresponds to time the job finished. * Supported fields for risk analysis jobs: - `state` - RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to time the job finished. - 'start_time` - Corresponds to time the job finished. * The operator must be `=` or `!=`. Examples: * inspected_storage = cloud_storage AND state = done * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = done OR state = canceled) * end_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", + // "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect jobs: - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The name of the trigger that created the job. - 'end_time` - Corresponds to the time the job finished. - 'start_time` - Corresponds to the time the job finished. * Supported fields for risk analysis jobs: - `state` - RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to the time the job finished. - 'start_time` - Corresponds to the time the job finished. * The operator must be `=` or `!=`. Examples: * inspected_storage = cloud_storage AND state = done * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = done OR state = canceled) * end_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", // "location": "query", // "type": "string" // }, @@ -12140,7 +12376,7 @@ func (c *OrganizationsLocationsDlpJobsListCall) Do(opts ...googleapi.CallOption) // "type": "string" // }, // "orderBy": { - // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, end_time asc, create_time desc` Supported fields are: - `create_time`: corresponds to time the job was created. - `end_time`: corresponds to time the job ended. - `name`: corresponds to job's name. - `state`: corresponds to `state`", + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, end_time asc, create_time desc` Supported fields are: - `create_time`: corresponds to the time the job was created. - `end_time`: corresponds to the time the job ended. - `name`: corresponds to the job's name. - `state`: corresponds to `state`", // "location": "query", // "type": "string" // }, @@ -12221,7 +12457,7 @@ type OrganizationsLocationsInspectTemplatesCreateCall struct { header_ http.Header } -// Create: Creates an InspectTemplate for re-using frequently used +// Create: Creates an InspectTemplate for reusing frequently used // configuration for inspecting content, images, and storage. See // https://cloud.google.com/dlp/docs/creating-templates to learn more. // @@ -12338,7 +12574,7 @@ func (c *OrganizationsLocationsInspectTemplatesCreateCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Creates an InspectTemplate for re-using frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + // "description": "Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates", // "httpMethod": "POST", // "id": "dlp.organizations.locations.inspectTemplates.create", @@ -12701,18 +12937,18 @@ func (c *OrganizationsLocationsInspectTemplatesListCall) LocationId(locationId s // is case-insensitive, default sorting order is ascending, redundant // space characters are insignificant. Example: `name asc,update_time, // create_time desc` Supported fields are: - `create_time`: corresponds -// to time the template was created. - `update_time`: corresponds to -// time the template was last updated. - `name`: corresponds to -// template's name. - `display_name`: corresponds to template's display -// name. +// to the time the template was created. - `update_time`: corresponds to +// the time the template was last updated. - `name`: corresponds to the +// template's name. - `display_name`: corresponds to the template's +// display name. func (c *OrganizationsLocationsInspectTemplatesListCall) OrderBy(orderBy string) *OrganizationsLocationsInspectTemplatesListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Size of the page, -// can be limited by server. If zero server returns a page of max size -// 100. +// can be limited by the server. If zero server returns a page of max +// size 100. func (c *OrganizationsLocationsInspectTemplatesListCall) PageSize(pageSize int64) *OrganizationsLocationsInspectTemplatesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -12841,12 +13077,12 @@ func (c *OrganizationsLocationsInspectTemplatesListCall) Do(opts ...googleapi.Ca // "type": "string" // }, // "orderBy": { - // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the template was created. - `update_time`: corresponds to time the template was last updated. - `name`: corresponds to template's name. - `display_name`: corresponds to template's display name.", + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", + // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", // "format": "int32", // "location": "query", // "type": "integer" @@ -13546,12 +13782,12 @@ func (c *OrganizationsLocationsJobTriggersListCall) LocationId(locationId string // postfix. This list is case-insensitive, default sorting order is // ascending, redundant space characters are insignificant. Example: // `name asc,update_time, create_time desc` Supported fields are: - -// `create_time`: corresponds to time the JobTrigger was created. - -// `update_time`: corresponds to time the JobTrigger was last updated. - -// `last_run_time`: corresponds to the last time the JobTrigger ran. - -// `name`: corresponds to JobTrigger's name. - `display_name`: -// corresponds to JobTrigger's display name. - `status`: corresponds to -// JobTrigger's status. +// `create_time`: corresponds to the time the JobTrigger was created. - +// `update_time`: corresponds to the time the JobTrigger was last +// updated. - `last_run_time`: corresponds to the last time the +// JobTrigger ran. - `name`: corresponds to the JobTrigger's name. - +// `display_name`: corresponds to the JobTrigger's display name. - +// `status`: corresponds to JobTrigger's status. func (c *OrganizationsLocationsJobTriggersListCall) OrderBy(orderBy string) *OrganizationsLocationsJobTriggersListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -13704,7 +13940,7 @@ func (c *OrganizationsLocationsJobTriggersListCall) Do(opts ...googleapi.CallOpt // "type": "string" // }, // "orderBy": { - // "description": "Comma separated list of triggeredJob fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the JobTrigger was created. - `update_time`: corresponds to time the JobTrigger was last updated. - `last_run_time`: corresponds to the last time the JobTrigger ran. - `name`: corresponds to JobTrigger's name. - `display_name`: corresponds to JobTrigger's display name. - `status`: corresponds to JobTrigger's status.", + // "description": "Comma separated list of triggeredJob fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the JobTrigger was created. - `update_time`: corresponds to the time the JobTrigger was last updated. - `last_run_time`: corresponds to the last time the JobTrigger ran. - `name`: corresponds to the JobTrigger's name. - `display_name`: corresponds to the JobTrigger's display name. - `status`: corresponds to JobTrigger's status.", // "location": "query", // "type": "string" // }, @@ -14412,7 +14648,7 @@ func (c *OrganizationsLocationsStoredInfoTypesListCall) LocationId(locationId st // is case-insensitive, default sorting order is ascending, redundant // space characters are insignificant. Example: `name asc, display_name, // create_time desc` Supported fields are: - `create_time`: corresponds -// to time the most recent version of the resource was created. - +// to the time the most recent version of the resource was created. - // `state`: corresponds to the state of the resource. - `name`: // corresponds to resource name. - `display_name`: corresponds to info // type's display name. @@ -14422,8 +14658,8 @@ func (c *OrganizationsLocationsStoredInfoTypesListCall) OrderBy(orderBy string) } // PageSize sets the optional parameter "pageSize": Size of the page, -// can be limited by server. If zero server returns a page of max size -// 100. +// can be limited by the server. If zero server returns a page of max +// size 100. func (c *OrganizationsLocationsStoredInfoTypesListCall) PageSize(pageSize int64) *OrganizationsLocationsStoredInfoTypesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -14552,12 +14788,12 @@ func (c *OrganizationsLocationsStoredInfoTypesListCall) Do(opts ...googleapi.Cal // "type": "string" // }, // "orderBy": { - // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, display_name, create_time desc` Supported fields are: - `create_time`: corresponds to time the most recent version of the resource was created. - `state`: corresponds to the state of the resource. - `name`: corresponds to resource name. - `display_name`: corresponds to info type's display name.", + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, display_name, create_time desc` Supported fields are: - `create_time`: corresponds to the time the most recent version of the resource was created. - `state`: corresponds to the state of the resource. - `name`: corresponds to resource name. - `display_name`: corresponds to info type's display name.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", + // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", // "format": "int32", // "location": "query", // "type": "integer" @@ -15249,7 +15485,7 @@ func (c *OrganizationsStoredInfoTypesListCall) LocationId(locationId string) *Or // is case-insensitive, default sorting order is ascending, redundant // space characters are insignificant. Example: `name asc, display_name, // create_time desc` Supported fields are: - `create_time`: corresponds -// to time the most recent version of the resource was created. - +// to the time the most recent version of the resource was created. - // `state`: corresponds to the state of the resource. - `name`: // corresponds to resource name. - `display_name`: corresponds to info // type's display name. @@ -15259,8 +15495,8 @@ func (c *OrganizationsStoredInfoTypesListCall) OrderBy(orderBy string) *Organiza } // PageSize sets the optional parameter "pageSize": Size of the page, -// can be limited by server. If zero server returns a page of max size -// 100. +// can be limited by the server. If zero server returns a page of max +// size 100. func (c *OrganizationsStoredInfoTypesListCall) PageSize(pageSize int64) *OrganizationsStoredInfoTypesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -15389,12 +15625,12 @@ func (c *OrganizationsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) // "type": "string" // }, // "orderBy": { - // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, display_name, create_time desc` Supported fields are: - `create_time`: corresponds to time the most recent version of the resource was created. - `state`: corresponds to the state of the resource. - `name`: corresponds to resource name. - `display_name`: corresponds to info type's display name.", + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, display_name, create_time desc` Supported fields are: - `create_time`: corresponds to the time the most recent version of the resource was created. - `state`: corresponds to the state of the resource. - `name`: corresponds to resource name. - `display_name`: corresponds to info type's display name.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", + // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", // "format": "int32", // "location": "query", // "type": "integer" @@ -16078,7 +16314,7 @@ type ProjectsDeidentifyTemplatesCreateCall struct { header_ http.Header } -// Create: Creates a DeidentifyTemplate for re-using frequently used +// Create: Creates a DeidentifyTemplate for reusing frequently used // configuration for de-identifying content, images, and storage. See // https://cloud.google.com/dlp/docs/creating-templates-deid to learn // more. @@ -16196,7 +16432,7 @@ func (c *ProjectsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + // "description": "Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates", // "httpMethod": "POST", // "id": "dlp.projects.deidentifyTemplates.create", @@ -16562,18 +16798,18 @@ func (c *ProjectsDeidentifyTemplatesListCall) LocationId(locationId string) *Pro // is case-insensitive, default sorting order is ascending, redundant // space characters are insignificant. Example: `name asc,update_time, // create_time desc` Supported fields are: - `create_time`: corresponds -// to time the template was created. - `update_time`: corresponds to -// time the template was last updated. - `name`: corresponds to -// template's name. - `display_name`: corresponds to template's display -// name. +// to the time the template was created. - `update_time`: corresponds to +// the time the template was last updated. - `name`: corresponds to the +// template's name. - `display_name`: corresponds to the template's +// display name. func (c *ProjectsDeidentifyTemplatesListCall) OrderBy(orderBy string) *ProjectsDeidentifyTemplatesListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Size of the page, -// can be limited by server. If zero server returns a page of max size -// 100. +// can be limited by the server. If zero server returns a page of max +// size 100. func (c *ProjectsDeidentifyTemplatesListCall) PageSize(pageSize int64) *ProjectsDeidentifyTemplatesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -16702,12 +16938,12 @@ func (c *ProjectsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) ( // "type": "string" // }, // "orderBy": { - // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the template was created. - `update_time`: corresponds to time the template was last updated. - `name`: corresponds to template's name. - `display_name`: corresponds to template's display name.", + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", + // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", // "format": "int32", // "location": "query", // "type": "integer" @@ -17221,7 +17457,7 @@ type ProjectsDlpJobsDeleteCall struct { // Delete: Deletes a long-running DlpJob. This method indicates that the // client is no longer interested in the DlpJob result. The job will be -// cancelled if possible. See +// canceled if possible. See // https://cloud.google.com/dlp/docs/inspecting-storage and // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn // more. @@ -17319,7 +17555,7 @@ func (c *ProjectsDlpJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GooglePro } return ret, nil // { - // "description": "Deletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be cancelled if possible. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", + // "description": "Deletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be canceled if possible. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", // "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}", // "httpMethod": "DELETE", // "id": "dlp.projects.dlpJobs.delete", @@ -17534,13 +17770,13 @@ func (r *ProjectsDlpJobsService) List(parentid string) *ProjectsDlpJobsListCall // restriction has the form of `{field} {operator} {value}`. * Supported // fields/values for inspect jobs: - `state` - // PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - -// DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The resource name -// of the trigger that created job. - 'end_time` - Corresponds to time -// the job finished. - 'start_time` - Corresponds to time the job +// DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The name of the +// trigger that created the job. - 'end_time` - Corresponds to the time +// the job finished. - 'start_time` - Corresponds to the time the job // finished. * Supported fields for risk analysis jobs: - `state` - -// RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to time -// the job finished. - 'start_time` - Corresponds to time the job -// finished. * The operator must be `=` or `!=`. Examples: * +// RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to the +// time the job finished. - 'start_time` - Corresponds to the time the +// job finished. * The operator must be `=` or `!=`. Examples: * // inspected_storage = cloud_storage AND state = done * // inspected_storage = cloud_storage OR inspected_storage = bigquery * // inspected_storage = cloud_storage AND (state = done OR state = @@ -17563,9 +17799,9 @@ func (c *ProjectsDlpJobsListCall) LocationId(locationId string) *ProjectsDlpJobs // is case-insensitive, default sorting order is ascending, redundant // space characters are insignificant. Example: `name asc, end_time asc, // create_time desc` Supported fields are: - `create_time`: corresponds -// to time the job was created. - `end_time`: corresponds to time the -// job ended. - `name`: corresponds to job's name. - `state`: -// corresponds to `state` +// to the time the job was created. - `end_time`: corresponds to the +// time the job ended. - `name`: corresponds to the job's name. - +// `state`: corresponds to `state` func (c *ProjectsDlpJobsListCall) OrderBy(orderBy string) *ProjectsDlpJobsListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -17706,7 +17942,7 @@ func (c *ProjectsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*GooglePriva // ], // "parameters": { // "filter": { - // "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect jobs: - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The resource name of the trigger that created job. - 'end_time` - Corresponds to time the job finished. - 'start_time` - Corresponds to time the job finished. * Supported fields for risk analysis jobs: - `state` - RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to time the job finished. - 'start_time` - Corresponds to time the job finished. * The operator must be `=` or `!=`. Examples: * inspected_storage = cloud_storage AND state = done * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = done OR state = canceled) * end_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", + // "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect jobs: - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The name of the trigger that created the job. - 'end_time` - Corresponds to the time the job finished. - 'start_time` - Corresponds to the time the job finished. * Supported fields for risk analysis jobs: - `state` - RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to the time the job finished. - 'start_time` - Corresponds to the time the job finished. * The operator must be `=` or `!=`. Examples: * inspected_storage = cloud_storage AND state = done * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = done OR state = canceled) * end_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", // "location": "query", // "type": "string" // }, @@ -17716,7 +17952,7 @@ func (c *ProjectsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*GooglePriva // "type": "string" // }, // "orderBy": { - // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, end_time asc, create_time desc` Supported fields are: - `create_time`: corresponds to time the job was created. - `end_time`: corresponds to time the job ended. - `name`: corresponds to job's name. - `state`: corresponds to `state`", + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, end_time asc, create_time desc` Supported fields are: - `create_time`: corresponds to the time the job was created. - `end_time`: corresponds to the time the job ended. - `name`: corresponds to the job's name. - `state`: corresponds to `state`", // "location": "query", // "type": "string" // }, @@ -17955,7 +18191,7 @@ type ProjectsInspectTemplatesCreateCall struct { header_ http.Header } -// Create: Creates an InspectTemplate for re-using frequently used +// Create: Creates an InspectTemplate for reusing frequently used // configuration for inspecting content, images, and storage. See // https://cloud.google.com/dlp/docs/creating-templates to learn more. // @@ -18072,7 +18308,7 @@ func (c *ProjectsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Creates an InspectTemplate for re-using frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + // "description": "Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", // "flatPath": "v2/projects/{projectsId}/inspectTemplates", // "httpMethod": "POST", // "id": "dlp.projects.inspectTemplates.create", @@ -18435,18 +18671,18 @@ func (c *ProjectsInspectTemplatesListCall) LocationId(locationId string) *Projec // is case-insensitive, default sorting order is ascending, redundant // space characters are insignificant. Example: `name asc,update_time, // create_time desc` Supported fields are: - `create_time`: corresponds -// to time the template was created. - `update_time`: corresponds to -// time the template was last updated. - `name`: corresponds to -// template's name. - `display_name`: corresponds to template's display -// name. +// to the time the template was created. - `update_time`: corresponds to +// the time the template was last updated. - `name`: corresponds to the +// template's name. - `display_name`: corresponds to the template's +// display name. func (c *ProjectsInspectTemplatesListCall) OrderBy(orderBy string) *ProjectsInspectTemplatesListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Size of the page, -// can be limited by server. If zero server returns a page of max size -// 100. +// can be limited by the server. If zero server returns a page of max +// size 100. func (c *ProjectsInspectTemplatesListCall) PageSize(pageSize int64) *ProjectsInspectTemplatesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -18575,12 +18811,12 @@ func (c *ProjectsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*Go // "type": "string" // }, // "orderBy": { - // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the template was created. - `update_time`: corresponds to time the template was last updated. - `name`: corresponds to template's name. - `display_name`: corresponds to template's display name.", + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", + // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", // "format": "int32", // "location": "query", // "type": "integer" @@ -19424,12 +19660,12 @@ func (c *ProjectsJobTriggersListCall) LocationId(locationId string) *ProjectsJob // postfix. This list is case-insensitive, default sorting order is // ascending, redundant space characters are insignificant. Example: // `name asc,update_time, create_time desc` Supported fields are: - -// `create_time`: corresponds to time the JobTrigger was created. - -// `update_time`: corresponds to time the JobTrigger was last updated. - -// `last_run_time`: corresponds to the last time the JobTrigger ran. - -// `name`: corresponds to JobTrigger's name. - `display_name`: -// corresponds to JobTrigger's display name. - `status`: corresponds to -// JobTrigger's status. +// `create_time`: corresponds to the time the JobTrigger was created. - +// `update_time`: corresponds to the time the JobTrigger was last +// updated. - `last_run_time`: corresponds to the last time the +// JobTrigger ran. - `name`: corresponds to the JobTrigger's name. - +// `display_name`: corresponds to the JobTrigger's display name. - +// `status`: corresponds to JobTrigger's status. func (c *ProjectsJobTriggersListCall) OrderBy(orderBy string) *ProjectsJobTriggersListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -19582,7 +19818,7 @@ func (c *ProjectsJobTriggersListCall) Do(opts ...googleapi.CallOption) (*GoogleP // "type": "string" // }, // "orderBy": { - // "description": "Comma separated list of triggeredJob fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the JobTrigger was created. - `update_time`: corresponds to time the JobTrigger was last updated. - `last_run_time`: corresponds to the last time the JobTrigger ran. - `name`: corresponds to JobTrigger's name. - `display_name`: corresponds to JobTrigger's display name. - `status`: corresponds to JobTrigger's status.", + // "description": "Comma separated list of triggeredJob fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the JobTrigger was created. - `update_time`: corresponds to the time the JobTrigger was last updated. - `last_run_time`: corresponds to the last time the JobTrigger ran. - `name`: corresponds to the JobTrigger's name. - `display_name`: corresponds to the JobTrigger's display name. - `status`: corresponds to JobTrigger's status.", // "location": "query", // "type": "string" // }, @@ -20282,7 +20518,7 @@ type ProjectsLocationsDeidentifyTemplatesCreateCall struct { header_ http.Header } -// Create: Creates a DeidentifyTemplate for re-using frequently used +// Create: Creates a DeidentifyTemplate for reusing frequently used // configuration for de-identifying content, images, and storage. See // https://cloud.google.com/dlp/docs/creating-templates-deid to learn // more. @@ -20400,7 +20636,7 @@ func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + // "description": "Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates", // "httpMethod": "POST", // "id": "dlp.projects.locations.deidentifyTemplates.create", @@ -20766,18 +21002,18 @@ func (c *ProjectsLocationsDeidentifyTemplatesListCall) LocationId(locationId str // is case-insensitive, default sorting order is ascending, redundant // space characters are insignificant. Example: `name asc,update_time, // create_time desc` Supported fields are: - `create_time`: corresponds -// to time the template was created. - `update_time`: corresponds to -// time the template was last updated. - `name`: corresponds to -// template's name. - `display_name`: corresponds to template's display -// name. +// to the time the template was created. - `update_time`: corresponds to +// the time the template was last updated. - `name`: corresponds to the +// template's name. - `display_name`: corresponds to the template's +// display name. func (c *ProjectsLocationsDeidentifyTemplatesListCall) OrderBy(orderBy string) *ProjectsLocationsDeidentifyTemplatesListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Size of the page, -// can be limited by server. If zero server returns a page of max size -// 100. +// can be limited by the server. If zero server returns a page of max +// size 100. func (c *ProjectsLocationsDeidentifyTemplatesListCall) PageSize(pageSize int64) *ProjectsLocationsDeidentifyTemplatesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -20906,12 +21142,12 @@ func (c *ProjectsLocationsDeidentifyTemplatesListCall) Do(opts ...googleapi.Call // "type": "string" // }, // "orderBy": { - // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the template was created. - `update_time`: corresponds to time the template was last updated. - `name`: corresponds to template's name. - `display_name`: corresponds to template's display name.", + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", + // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", // "format": "int32", // "location": "query", // "type": "integer" @@ -21425,7 +21661,7 @@ type ProjectsLocationsDlpJobsDeleteCall struct { // Delete: Deletes a long-running DlpJob. This method indicates that the // client is no longer interested in the DlpJob result. The job will be -// cancelled if possible. See +// canceled if possible. See // https://cloud.google.com/dlp/docs/inspecting-storage and // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn // more. @@ -21523,7 +21759,7 @@ func (c *ProjectsLocationsDlpJobsDeleteCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Deletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be cancelled if possible. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", + // "description": "Deletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be canceled if possible. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}", // "httpMethod": "DELETE", // "id": "dlp.projects.locations.dlpJobs.delete", @@ -22027,13 +22263,13 @@ func (r *ProjectsLocationsDlpJobsService) List(parentid string) *ProjectsLocatio // restriction has the form of `{field} {operator} {value}`. * Supported // fields/values for inspect jobs: - `state` - // PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - -// DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The resource name -// of the trigger that created job. - 'end_time` - Corresponds to time -// the job finished. - 'start_time` - Corresponds to time the job +// DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The name of the +// trigger that created the job. - 'end_time` - Corresponds to the time +// the job finished. - 'start_time` - Corresponds to the time the job // finished. * Supported fields for risk analysis jobs: - `state` - -// RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to time -// the job finished. - 'start_time` - Corresponds to time the job -// finished. * The operator must be `=` or `!=`. Examples: * +// RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to the +// time the job finished. - 'start_time` - Corresponds to the time the +// job finished. * The operator must be `=` or `!=`. Examples: * // inspected_storage = cloud_storage AND state = done * // inspected_storage = cloud_storage OR inspected_storage = bigquery * // inspected_storage = cloud_storage AND (state = done OR state = @@ -22056,9 +22292,9 @@ func (c *ProjectsLocationsDlpJobsListCall) LocationId(locationId string) *Projec // is case-insensitive, default sorting order is ascending, redundant // space characters are insignificant. Example: `name asc, end_time asc, // create_time desc` Supported fields are: - `create_time`: corresponds -// to time the job was created. - `end_time`: corresponds to time the -// job ended. - `name`: corresponds to job's name. - `state`: -// corresponds to `state` +// to the time the job was created. - `end_time`: corresponds to the +// time the job ended. - `name`: corresponds to the job's name. - +// `state`: corresponds to `state` func (c *ProjectsLocationsDlpJobsListCall) OrderBy(orderBy string) *ProjectsLocationsDlpJobsListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -22199,7 +22435,7 @@ func (c *ProjectsLocationsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*Go // ], // "parameters": { // "filter": { - // "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect jobs: - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The resource name of the trigger that created job. - 'end_time` - Corresponds to time the job finished. - 'start_time` - Corresponds to time the job finished. * Supported fields for risk analysis jobs: - `state` - RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to time the job finished. - 'start_time` - Corresponds to time the job finished. * The operator must be `=` or `!=`. Examples: * inspected_storage = cloud_storage AND state = done * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = done OR state = canceled) * end_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", + // "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect jobs: - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The name of the trigger that created the job. - 'end_time` - Corresponds to the time the job finished. - 'start_time` - Corresponds to the time the job finished. * Supported fields for risk analysis jobs: - `state` - RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to the time the job finished. - 'start_time` - Corresponds to the time the job finished. * The operator must be `=` or `!=`. Examples: * inspected_storage = cloud_storage AND state = done * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = done OR state = canceled) * end_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", // "location": "query", // "type": "string" // }, @@ -22209,7 +22445,7 @@ func (c *ProjectsLocationsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*Go // "type": "string" // }, // "orderBy": { - // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, end_time asc, create_time desc` Supported fields are: - `create_time`: corresponds to time the job was created. - `end_time`: corresponds to time the job ended. - `name`: corresponds to job's name. - `state`: corresponds to `state`", + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, end_time asc, create_time desc` Supported fields are: - `create_time`: corresponds to the time the job was created. - `end_time`: corresponds to the time the job ended. - `name`: corresponds to the job's name. - `state`: corresponds to `state`", // "location": "query", // "type": "string" // }, @@ -22448,7 +22684,7 @@ type ProjectsLocationsInspectTemplatesCreateCall struct { header_ http.Header } -// Create: Creates an InspectTemplate for re-using frequently used +// Create: Creates an InspectTemplate for reusing frequently used // configuration for inspecting content, images, and storage. See // https://cloud.google.com/dlp/docs/creating-templates to learn more. // @@ -22565,7 +22801,7 @@ func (c *ProjectsLocationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Creates an InspectTemplate for re-using frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + // "description": "Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates", // "httpMethod": "POST", // "id": "dlp.projects.locations.inspectTemplates.create", @@ -22928,18 +23164,18 @@ func (c *ProjectsLocationsInspectTemplatesListCall) LocationId(locationId string // is case-insensitive, default sorting order is ascending, redundant // space characters are insignificant. Example: `name asc,update_time, // create_time desc` Supported fields are: - `create_time`: corresponds -// to time the template was created. - `update_time`: corresponds to -// time the template was last updated. - `name`: corresponds to -// template's name. - `display_name`: corresponds to template's display -// name. +// to the time the template was created. - `update_time`: corresponds to +// the time the template was last updated. - `name`: corresponds to the +// template's name. - `display_name`: corresponds to the template's +// display name. func (c *ProjectsLocationsInspectTemplatesListCall) OrderBy(orderBy string) *ProjectsLocationsInspectTemplatesListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Size of the page, -// can be limited by server. If zero server returns a page of max size -// 100. +// can be limited by the server. If zero server returns a page of max +// size 100. func (c *ProjectsLocationsInspectTemplatesListCall) PageSize(pageSize int64) *ProjectsLocationsInspectTemplatesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -23068,12 +23304,12 @@ func (c *ProjectsLocationsInspectTemplatesListCall) Do(opts ...googleapi.CallOpt // "type": "string" // }, // "orderBy": { - // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the template was created. - `update_time`: corresponds to time the template was last updated. - `name`: corresponds to template's name. - `display_name`: corresponds to template's display name.", + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", + // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", // "format": "int32", // "location": "query", // "type": "integer" @@ -24063,12 +24299,12 @@ func (c *ProjectsLocationsJobTriggersListCall) LocationId(locationId string) *Pr // postfix. This list is case-insensitive, default sorting order is // ascending, redundant space characters are insignificant. Example: // `name asc,update_time, create_time desc` Supported fields are: - -// `create_time`: corresponds to time the JobTrigger was created. - -// `update_time`: corresponds to time the JobTrigger was last updated. - -// `last_run_time`: corresponds to the last time the JobTrigger ran. - -// `name`: corresponds to JobTrigger's name. - `display_name`: -// corresponds to JobTrigger's display name. - `status`: corresponds to -// JobTrigger's status. +// `create_time`: corresponds to the time the JobTrigger was created. - +// `update_time`: corresponds to the time the JobTrigger was last +// updated. - `last_run_time`: corresponds to the last time the +// JobTrigger ran. - `name`: corresponds to the JobTrigger's name. - +// `display_name`: corresponds to the JobTrigger's display name. - +// `status`: corresponds to JobTrigger's status. func (c *ProjectsLocationsJobTriggersListCall) OrderBy(orderBy string) *ProjectsLocationsJobTriggersListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -24221,7 +24457,7 @@ func (c *ProjectsLocationsJobTriggersListCall) Do(opts ...googleapi.CallOption) // "type": "string" // }, // "orderBy": { - // "description": "Comma separated list of triggeredJob fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the JobTrigger was created. - `update_time`: corresponds to time the JobTrigger was last updated. - `last_run_time`: corresponds to the last time the JobTrigger ran. - `name`: corresponds to JobTrigger's name. - `display_name`: corresponds to JobTrigger's display name. - `status`: corresponds to JobTrigger's status.", + // "description": "Comma separated list of triggeredJob fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the JobTrigger was created. - `update_time`: corresponds to the time the JobTrigger was last updated. - `last_run_time`: corresponds to the last time the JobTrigger ran. - `name`: corresponds to the JobTrigger's name. - `display_name`: corresponds to the JobTrigger's display name. - `status`: corresponds to JobTrigger's status.", // "location": "query", // "type": "string" // }, @@ -24929,7 +25165,7 @@ func (c *ProjectsLocationsStoredInfoTypesListCall) LocationId(locationId string) // is case-insensitive, default sorting order is ascending, redundant // space characters are insignificant. Example: `name asc, display_name, // create_time desc` Supported fields are: - `create_time`: corresponds -// to time the most recent version of the resource was created. - +// to the time the most recent version of the resource was created. - // `state`: corresponds to the state of the resource. - `name`: // corresponds to resource name. - `display_name`: corresponds to info // type's display name. @@ -24939,8 +25175,8 @@ func (c *ProjectsLocationsStoredInfoTypesListCall) OrderBy(orderBy string) *Proj } // PageSize sets the optional parameter "pageSize": Size of the page, -// can be limited by server. If zero server returns a page of max size -// 100. +// can be limited by the server. If zero server returns a page of max +// size 100. func (c *ProjectsLocationsStoredInfoTypesListCall) PageSize(pageSize int64) *ProjectsLocationsStoredInfoTypesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -25069,12 +25305,12 @@ func (c *ProjectsLocationsStoredInfoTypesListCall) Do(opts ...googleapi.CallOpti // "type": "string" // }, // "orderBy": { - // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, display_name, create_time desc` Supported fields are: - `create_time`: corresponds to time the most recent version of the resource was created. - `state`: corresponds to the state of the resource. - `name`: corresponds to resource name. - `display_name`: corresponds to info type's display name.", + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, display_name, create_time desc` Supported fields are: - `create_time`: corresponds to the time the most recent version of the resource was created. - `state`: corresponds to the state of the resource. - `name`: corresponds to resource name. - `display_name`: corresponds to info type's display name.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", + // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", // "format": "int32", // "location": "query", // "type": "integer" @@ -25766,7 +26002,7 @@ func (c *ProjectsStoredInfoTypesListCall) LocationId(locationId string) *Project // is case-insensitive, default sorting order is ascending, redundant // space characters are insignificant. Example: `name asc, display_name, // create_time desc` Supported fields are: - `create_time`: corresponds -// to time the most recent version of the resource was created. - +// to the time the most recent version of the resource was created. - // `state`: corresponds to the state of the resource. - `name`: // corresponds to resource name. - `display_name`: corresponds to info // type's display name. @@ -25776,8 +26012,8 @@ func (c *ProjectsStoredInfoTypesListCall) OrderBy(orderBy string) *ProjectsStore } // PageSize sets the optional parameter "pageSize": Size of the page, -// can be limited by server. If zero server returns a page of max size -// 100. +// can be limited by the server. If zero server returns a page of max +// size 100. func (c *ProjectsStoredInfoTypesListCall) PageSize(pageSize int64) *ProjectsStoredInfoTypesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -25906,12 +26142,12 @@ func (c *ProjectsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) (*Goo // "type": "string" // }, // "orderBy": { - // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, display_name, create_time desc` Supported fields are: - `create_time`: corresponds to time the most recent version of the resource was created. - `state`: corresponds to the state of the resource. - `name`: corresponds to resource name. - `display_name`: corresponds to info type's display name.", + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, display_name, create_time desc` Supported fields are: - `create_time`: corresponds to the time the most recent version of the resource was created. - `state`: corresponds to the state of the resource. - `name`: corresponds to resource name. - `display_name`: corresponds to info type's display name.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", + // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", // "format": "int32", // "location": "query", // "type": "integer" diff --git a/dns/v1/dns-api.json b/dns/v1/dns-api.json index f0e24c15c65..873612bc60c 100644 --- a/dns/v1/dns-api.json +++ b/dns/v1/dns-api.json @@ -1824,7 +1824,7 @@ } } }, - "revision": "20220630", + "revision": "20220728", "rootUrl": "https://dns.googleapis.com/", "schemas": { "Change": { @@ -3000,6 +3000,9 @@ "default": "dns#rRSetRoutingPolicy", "type": "string" }, + "primaryBackup": { + "$ref": "RRSetRoutingPolicyPrimaryBackupPolicy" + }, "wrr": { "$ref": "RRSetRoutingPolicyWrrPolicy" } @@ -3010,6 +3013,10 @@ "description": "Configures a RRSetRoutingPolicy that routes based on the geo location of the querying user.", "id": "RRSetRoutingPolicyGeoPolicy", "properties": { + "enableFencing": { + "description": "Without fencing, if health check fails for all configured items in the current geo bucket, we'll failover to the next nearest geo bucket. With fencing, if health check is enabled, as long as some targets in the current geo bucket are healthy, we'll return only the healthy targets. However, if they're all unhealthy, we won't failover to the next nearest bucket, we'll simply return all the items in the current bucket even though they're unhealthy.", + "type": "boolean" + }, "items": { "description": "The primary geo routing configuration. If there are multiple items with the same location, an error is returned instead.", "items": { @@ -3028,6 +3035,10 @@ "description": "ResourceRecordSet data for one geo location.", "id": "RRSetRoutingPolicyGeoPolicyGeoPolicyItem", "properties": { + "healthCheckedTargets": { + "$ref": "RRSetRoutingPolicyHealthCheckTargets", + "description": "For A and AAAA types only. Endpoints to return in the query result only if they are healthy. These can be specified along with rrdata within this item." + }, "kind": { "default": "dns#rRSetRoutingPolicyGeoPolicyGeoPolicyItem", "type": "string" @@ -3052,6 +3063,96 @@ }, "type": "object" }, + "RRSetRoutingPolicyHealthCheckTargets": { + "description": "HealthCheckTargets describes endpoints to health-check when responding to Routing Policy queries. Only the healthy endpoints will be included in the response.", + "id": "RRSetRoutingPolicyHealthCheckTargets", + "properties": { + "internalLoadBalancers": { + "items": { + "$ref": "RRSetRoutingPolicyLoadBalancerTarget" + }, + "type": "array" + } + }, + "type": "object" + }, + "RRSetRoutingPolicyLoadBalancerTarget": { + "id": "RRSetRoutingPolicyLoadBalancerTarget", + "properties": { + "ipAddress": { + "description": "The frontend IP address of the", + "type": "string" + }, + "ipProtocol": { + "enum": [ + "undefined", + "tcp", + "udp" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, + "kind": { + "default": "dns#rRSetRoutingPolicyLoadBalancerTarget", + "type": "string" + }, + "loadBalancerType": { + "enum": [ + "none", + "regionalL4ilb" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "networkUrl": { + "description": "The fully qualified url of the network on which the ILB is", + "type": "string" + }, + "port": { + "description": "Load Balancer to health check. The configured port of the Load Balancer.", + "type": "string" + }, + "project": { + "description": "present. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} The project ID in which the ILB exists.", + "type": "string" + }, + "region": { + "description": "The region for regional ILBs.", + "type": "string" + } + }, + "type": "object" + }, + "RRSetRoutingPolicyPrimaryBackupPolicy": { + "description": "Configures a RRSetRoutingPolicy such that all queries are responded with the primary_targets if they are healthy. And if all of them are unhealthy, then we fallback to a geo localized policy.", + "id": "RRSetRoutingPolicyPrimaryBackupPolicy", + "properties": { + "backupGeoTargets": { + "$ref": "RRSetRoutingPolicyGeoPolicy", + "description": "Backup targets provide a regional failover policy for the otherwise global primary targets. If serving state is set to BACKUP, this policy essentially becomes a geo routing policy." + }, + "kind": { + "default": "dns#rRSetRoutingPolicyPrimaryBackupPolicy", + "type": "string" + }, + "primaryTargets": { + "$ref": "RRSetRoutingPolicyHealthCheckTargets" + }, + "trickleTraffic": { + "description": "When serving state is PRIMARY, this field provides the option of sending a small percentage of the traffic to the backup targets.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, "RRSetRoutingPolicyWrrPolicy": { "description": "Configures a RRSetRoutingPolicy that routes in a weighted round robin fashion.", "id": "RRSetRoutingPolicyWrrPolicy", @@ -3073,6 +3174,10 @@ "description": "A routing block which contains the routing information for one WRR item.", "id": "RRSetRoutingPolicyWrrPolicyWrrPolicyItem", "properties": { + "healthCheckedTargets": { + "$ref": "RRSetRoutingPolicyHealthCheckTargets", + "description": "endpoints that need to be health checked before making the routing decision. The unhealthy endpoints will be omitted from the result. If all endpoints within a buckete are unhealthy, we'll choose a different bucket (sampled w.r.t. its weight) for responding. Note that if DNSSEC is enabled for this zone, only one of rrdata or health_checked_targets can be set." + }, "kind": { "default": "dns#rRSetRoutingPolicyWrrPolicyWrrPolicyItem", "type": "string" diff --git a/dns/v1/dns-gen.go b/dns/v1/dns-gen.go index 600b4f8ef54..d5c7993d29a 100644 --- a/dns/v1/dns-gen.go +++ b/dns/v1/dns-gen.go @@ -2292,6 +2292,8 @@ type RRSetRoutingPolicy struct { Kind string `json:"kind,omitempty"` + PrimaryBackup *RRSetRoutingPolicyPrimaryBackupPolicy `json:"primaryBackup,omitempty"` + Wrr *RRSetRoutingPolicyWrrPolicy `json:"wrr,omitempty"` // ForceSendFields is a list of field names (e.g. "Geo") to @@ -2320,13 +2322,22 @@ func (s *RRSetRoutingPolicy) MarshalJSON() ([]byte, error) { // RRSetRoutingPolicyGeoPolicy: Configures a RRSetRoutingPolicy that // routes based on the geo location of the querying user. type RRSetRoutingPolicyGeoPolicy struct { + // EnableFencing: Without fencing, if health check fails for all + // configured items in the current geo bucket, we'll failover to the + // next nearest geo bucket. With fencing, if health check is enabled, as + // long as some targets in the current geo bucket are healthy, we'll + // return only the healthy targets. However, if they're all unhealthy, + // we won't failover to the next nearest bucket, we'll simply return all + // the items in the current bucket even though they're unhealthy. + EnableFencing bool `json:"enableFencing,omitempty"` + // Items: The primary geo routing configuration. If there are multiple // items with the same location, an error is returned instead. Items []*RRSetRoutingPolicyGeoPolicyGeoPolicyItem `json:"items,omitempty"` Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "Items") to + // ForceSendFields is a list of field names (e.g. "EnableFencing") 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 @@ -2334,10 +2345,10 @@ type RRSetRoutingPolicyGeoPolicy struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") 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. "EnableFencing") 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:"-"` @@ -2352,6 +2363,11 @@ func (s *RRSetRoutingPolicyGeoPolicy) MarshalJSON() ([]byte, error) { // RRSetRoutingPolicyGeoPolicyGeoPolicyItem: ResourceRecordSet data for // one geo location. type RRSetRoutingPolicyGeoPolicyGeoPolicyItem struct { + // HealthCheckedTargets: For A and AAAA types only. Endpoints to return + // in the query result only if they are healthy. These can be specified + // along with rrdata within this item. + HealthCheckedTargets *RRSetRoutingPolicyHealthCheckTargets `json:"healthCheckedTargets,omitempty"` + Kind string `json:"kind,omitempty"` // Location: The geo-location granularity is a GCP region. This location @@ -2366,7 +2382,96 @@ type RRSetRoutingPolicyGeoPolicyGeoPolicyItem struct { // for DNSSEC enabled zones, there's a restriction of 1 ip per item. . SignatureRrdatas []string `json:"signatureRrdatas,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to + // ForceSendFields is a list of field names (e.g. + // "HealthCheckedTargets") 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. "HealthCheckedTargets") 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 *RRSetRoutingPolicyGeoPolicyGeoPolicyItem) MarshalJSON() ([]byte, error) { + type NoMethod RRSetRoutingPolicyGeoPolicyGeoPolicyItem + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RRSetRoutingPolicyHealthCheckTargets: HealthCheckTargets describes +// endpoints to health-check when responding to Routing Policy queries. +// Only the healthy endpoints will be included in the response. +type RRSetRoutingPolicyHealthCheckTargets struct { + InternalLoadBalancers []*RRSetRoutingPolicyLoadBalancerTarget `json:"internalLoadBalancers,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "InternalLoadBalancers") 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. "InternalLoadBalancers") 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 *RRSetRoutingPolicyHealthCheckTargets) MarshalJSON() ([]byte, error) { + type NoMethod RRSetRoutingPolicyHealthCheckTargets + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type RRSetRoutingPolicyLoadBalancerTarget struct { + // IpAddress: The frontend IP address of the + IpAddress string `json:"ipAddress,omitempty"` + + // Possible values: + // "undefined" + // "tcp" + // "udp" + IpProtocol string `json:"ipProtocol,omitempty"` + + Kind string `json:"kind,omitempty"` + + // Possible values: + // "none" + // "regionalL4ilb" + LoadBalancerType string `json:"loadBalancerType,omitempty"` + + // NetworkUrl: The fully qualified url of the network on which the ILB + // is + NetworkUrl string `json:"networkUrl,omitempty"` + + // Port: Load Balancer to health check. The configured port of the Load + // Balancer. + Port string `json:"port,omitempty"` + + // Project: present. This should be formatted like + // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + // The project ID in which the ILB exists. + Project string `json:"project,omitempty"` + + // Region: The region for regional ILBs. + Region string `json:"region,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IpAddress") 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 @@ -2374,8 +2479,8 @@ type RRSetRoutingPolicyGeoPolicyGeoPolicyItem struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "IpAddress") 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. @@ -2383,12 +2488,69 @@ type RRSetRoutingPolicyGeoPolicyGeoPolicyItem struct { NullFields []string `json:"-"` } -func (s *RRSetRoutingPolicyGeoPolicyGeoPolicyItem) MarshalJSON() ([]byte, error) { - type NoMethod RRSetRoutingPolicyGeoPolicyGeoPolicyItem +func (s *RRSetRoutingPolicyLoadBalancerTarget) MarshalJSON() ([]byte, error) { + type NoMethod RRSetRoutingPolicyLoadBalancerTarget + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RRSetRoutingPolicyPrimaryBackupPolicy: Configures a +// RRSetRoutingPolicy such that all queries are responded with the +// primary_targets if they are healthy. And if all of them are +// unhealthy, then we fallback to a geo localized policy. +type RRSetRoutingPolicyPrimaryBackupPolicy struct { + // BackupGeoTargets: Backup targets provide a regional failover policy + // for the otherwise global primary targets. If serving state is set to + // BACKUP, this policy essentially becomes a geo routing policy. + BackupGeoTargets *RRSetRoutingPolicyGeoPolicy `json:"backupGeoTargets,omitempty"` + + Kind string `json:"kind,omitempty"` + + PrimaryTargets *RRSetRoutingPolicyHealthCheckTargets `json:"primaryTargets,omitempty"` + + // TrickleTraffic: When serving state is PRIMARY, this field provides + // the option of sending a small percentage of the traffic to the backup + // targets. + TrickleTraffic float64 `json:"trickleTraffic,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackupGeoTargets") 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. "BackupGeoTargets") 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 *RRSetRoutingPolicyPrimaryBackupPolicy) MarshalJSON() ([]byte, error) { + type NoMethod RRSetRoutingPolicyPrimaryBackupPolicy raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +func (s *RRSetRoutingPolicyPrimaryBackupPolicy) UnmarshalJSON(data []byte) error { + type NoMethod RRSetRoutingPolicyPrimaryBackupPolicy + var s1 struct { + TrickleTraffic gensupport.JSONFloat64 `json:"trickleTraffic"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.TrickleTraffic = float64(s1.TrickleTraffic) + return nil +} + // RRSetRoutingPolicyWrrPolicy: Configures a RRSetRoutingPolicy that // routes in a weighted round robin fashion. type RRSetRoutingPolicyWrrPolicy struct { @@ -2422,6 +2584,14 @@ func (s *RRSetRoutingPolicyWrrPolicy) MarshalJSON() ([]byte, error) { // RRSetRoutingPolicyWrrPolicyWrrPolicyItem: A routing block which // contains the routing information for one WRR item. type RRSetRoutingPolicyWrrPolicyWrrPolicyItem struct { + // HealthCheckedTargets: endpoints that need to be health checked before + // making the routing decision. The unhealthy endpoints will be omitted + // from the result. If all endpoints within a buckete are unhealthy, + // we'll choose a different bucket (sampled w.r.t. its weight) for + // responding. Note that if DNSSEC is enabled for this zone, only one of + // rrdata or health_checked_targets can be set. + HealthCheckedTargets *RRSetRoutingPolicyHealthCheckTargets `json:"healthCheckedTargets,omitempty"` + Kind string `json:"kind,omitempty"` Rrdatas []string `json:"rrdatas,omitempty"` @@ -2438,20 +2608,22 @@ type RRSetRoutingPolicyWrrPolicyWrrPolicyItem struct { // should be non-negative. Weight float64 `json:"weight,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") 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 is a list of field names (e.g. + // "HealthCheckedTargets") 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. "Kind") 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 is a list of field names (e.g. "HealthCheckedTargets") 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:"-"` } diff --git a/dns/v1beta2/dns-api.json b/dns/v1beta2/dns-api.json index 76212ca8d4f..cd43ee524ab 100644 --- a/dns/v1beta2/dns-api.json +++ b/dns/v1beta2/dns-api.json @@ -1821,7 +1821,7 @@ } } }, - "revision": "20220630", + "revision": "20220728", "rootUrl": "https://dns.googleapis.com/", "schemas": { "Change": { @@ -3029,6 +3029,9 @@ "default": "dns#rRSetRoutingPolicy", "type": "string" }, + "primaryBackup": { + "$ref": "RRSetRoutingPolicyPrimaryBackupPolicy" + }, "wrr": { "$ref": "RRSetRoutingPolicyWrrPolicy" }, @@ -3042,6 +3045,10 @@ "description": "Configures a RRSetRoutingPolicy that routes based on the geo location of the querying user.", "id": "RRSetRoutingPolicyGeoPolicy", "properties": { + "enableFencing": { + "description": "Without fencing, if health check fails for all configured items in the current geo bucket, we'll failover to the next nearest geo bucket. With fencing, if health check is enabled, as long as some targets in the current geo bucket are healthy, we'll return only the healthy targets. However, if they're all unhealthy, we won't failover to the next nearest bucket, we'll simply return all the items in the current bucket even though they're unhealthy.", + "type": "boolean" + }, "items": { "description": "The primary geo routing configuration. If there are multiple items with the same location, an error is returned instead.", "items": { @@ -3060,6 +3067,10 @@ "description": "ResourceRecordSet data for one geo location.", "id": "RRSetRoutingPolicyGeoPolicyGeoPolicyItem", "properties": { + "healthCheckedTargets": { + "$ref": "RRSetRoutingPolicyHealthCheckTargets", + "description": "For A and AAAA types only. Endpoints to return in the query result only if they are healthy. These can be specified along with rrdata within this item." + }, "kind": { "default": "dns#rRSetRoutingPolicyGeoPolicyGeoPolicyItem", "type": "string" @@ -3084,6 +3095,96 @@ }, "type": "object" }, + "RRSetRoutingPolicyHealthCheckTargets": { + "description": "HealthCheckTargets describes endpoints to health-check when responding to Routing Policy queries. Only the healthy endpoints will be included in the response.", + "id": "RRSetRoutingPolicyHealthCheckTargets", + "properties": { + "internalLoadBalancers": { + "items": { + "$ref": "RRSetRoutingPolicyLoadBalancerTarget" + }, + "type": "array" + } + }, + "type": "object" + }, + "RRSetRoutingPolicyLoadBalancerTarget": { + "id": "RRSetRoutingPolicyLoadBalancerTarget", + "properties": { + "ipAddress": { + "description": "The frontend IP address of the", + "type": "string" + }, + "ipProtocol": { + "enum": [ + "undefined", + "tcp", + "udp" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, + "kind": { + "default": "dns#rRSetRoutingPolicyLoadBalancerTarget", + "type": "string" + }, + "loadBalancerType": { + "enum": [ + "none", + "regionalL4ilb" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "networkUrl": { + "description": "The fully qualified url of the network on which the ILB is", + "type": "string" + }, + "port": { + "description": "Load Balancer to health check. The configured port of the Load Balancer.", + "type": "string" + }, + "project": { + "description": "present. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} The project ID in which the ILB exists.", + "type": "string" + }, + "region": { + "description": "The region for regional ILBs.", + "type": "string" + } + }, + "type": "object" + }, + "RRSetRoutingPolicyPrimaryBackupPolicy": { + "description": "Configures a RRSetRoutingPolicy such that all queries are responded with the primary_targets if they are healthy. And if all of them are unhealthy, then we fallback to a geo localized policy.", + "id": "RRSetRoutingPolicyPrimaryBackupPolicy", + "properties": { + "backupGeoTargets": { + "$ref": "RRSetRoutingPolicyGeoPolicy", + "description": "Backup targets provide a regional failover policy for the otherwise global primary targets. If serving state is set to BACKUP, this policy essentially becomes a geo routing policy." + }, + "kind": { + "default": "dns#rRSetRoutingPolicyPrimaryBackupPolicy", + "type": "string" + }, + "primaryTargets": { + "$ref": "RRSetRoutingPolicyHealthCheckTargets" + }, + "trickleTraffic": { + "description": "When serving state is PRIMARY, this field provides the option of sending a small percentage of the traffic to the backup targets.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, "RRSetRoutingPolicyWrrPolicy": { "description": "Configures a RRSetRoutingPolicy that routes in a weighted round robin fashion.", "id": "RRSetRoutingPolicyWrrPolicy", @@ -3105,6 +3206,10 @@ "description": "A routing block which contains the routing information for one WRR item.", "id": "RRSetRoutingPolicyWrrPolicyWrrPolicyItem", "properties": { + "healthCheckedTargets": { + "$ref": "RRSetRoutingPolicyHealthCheckTargets", + "description": "endpoints that need to be health checked before making the routing decision. The unhealthy endpoints will be omitted from the result. If all endpoints within a buckete are unhealthy, we'll choose a different bucket (sampled w.r.t. its weight) for responding. Note that if DNSSEC is enabled for this zone, only one of rrdata or health_checked_targets can be set." + }, "kind": { "default": "dns#rRSetRoutingPolicyWrrPolicyWrrPolicyItem", "type": "string" diff --git a/dns/v1beta2/dns-gen.go b/dns/v1beta2/dns-gen.go index 99e317c2967..2649c1c69c9 100644 --- a/dns/v1beta2/dns-gen.go +++ b/dns/v1beta2/dns-gen.go @@ -2340,6 +2340,8 @@ type RRSetRoutingPolicy struct { Kind string `json:"kind,omitempty"` + PrimaryBackup *RRSetRoutingPolicyPrimaryBackupPolicy `json:"primaryBackup,omitempty"` + Wrr *RRSetRoutingPolicyWrrPolicy `json:"wrr,omitempty"` WrrPolicy *RRSetRoutingPolicyWrrPolicy `json:"wrrPolicy,omitempty"` @@ -2370,13 +2372,22 @@ func (s *RRSetRoutingPolicy) MarshalJSON() ([]byte, error) { // RRSetRoutingPolicyGeoPolicy: Configures a RRSetRoutingPolicy that // routes based on the geo location of the querying user. type RRSetRoutingPolicyGeoPolicy struct { + // EnableFencing: Without fencing, if health check fails for all + // configured items in the current geo bucket, we'll failover to the + // next nearest geo bucket. With fencing, if health check is enabled, as + // long as some targets in the current geo bucket are healthy, we'll + // return only the healthy targets. However, if they're all unhealthy, + // we won't failover to the next nearest bucket, we'll simply return all + // the items in the current bucket even though they're unhealthy. + EnableFencing bool `json:"enableFencing,omitempty"` + // Items: The primary geo routing configuration. If there are multiple // items with the same location, an error is returned instead. Items []*RRSetRoutingPolicyGeoPolicyGeoPolicyItem `json:"items,omitempty"` Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "Items") to + // ForceSendFields is a list of field names (e.g. "EnableFencing") 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 @@ -2384,10 +2395,10 @@ type RRSetRoutingPolicyGeoPolicy struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") 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. "EnableFencing") 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:"-"` @@ -2402,6 +2413,11 @@ func (s *RRSetRoutingPolicyGeoPolicy) MarshalJSON() ([]byte, error) { // RRSetRoutingPolicyGeoPolicyGeoPolicyItem: ResourceRecordSet data for // one geo location. type RRSetRoutingPolicyGeoPolicyGeoPolicyItem struct { + // HealthCheckedTargets: For A and AAAA types only. Endpoints to return + // in the query result only if they are healthy. These can be specified + // along with rrdata within this item. + HealthCheckedTargets *RRSetRoutingPolicyHealthCheckTargets `json:"healthCheckedTargets,omitempty"` + Kind string `json:"kind,omitempty"` // Location: The geo-location granularity is a GCP region. This location @@ -2416,7 +2432,96 @@ type RRSetRoutingPolicyGeoPolicyGeoPolicyItem struct { // for DNSSEC enabled zones, there's a restriction of 1 ip per item. . SignatureRrdatas []string `json:"signatureRrdatas,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to + // ForceSendFields is a list of field names (e.g. + // "HealthCheckedTargets") 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. "HealthCheckedTargets") 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 *RRSetRoutingPolicyGeoPolicyGeoPolicyItem) MarshalJSON() ([]byte, error) { + type NoMethod RRSetRoutingPolicyGeoPolicyGeoPolicyItem + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RRSetRoutingPolicyHealthCheckTargets: HealthCheckTargets describes +// endpoints to health-check when responding to Routing Policy queries. +// Only the healthy endpoints will be included in the response. +type RRSetRoutingPolicyHealthCheckTargets struct { + InternalLoadBalancers []*RRSetRoutingPolicyLoadBalancerTarget `json:"internalLoadBalancers,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "InternalLoadBalancers") 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. "InternalLoadBalancers") 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 *RRSetRoutingPolicyHealthCheckTargets) MarshalJSON() ([]byte, error) { + type NoMethod RRSetRoutingPolicyHealthCheckTargets + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type RRSetRoutingPolicyLoadBalancerTarget struct { + // IpAddress: The frontend IP address of the + IpAddress string `json:"ipAddress,omitempty"` + + // Possible values: + // "undefined" + // "tcp" + // "udp" + IpProtocol string `json:"ipProtocol,omitempty"` + + Kind string `json:"kind,omitempty"` + + // Possible values: + // "none" + // "regionalL4ilb" + LoadBalancerType string `json:"loadBalancerType,omitempty"` + + // NetworkUrl: The fully qualified url of the network on which the ILB + // is + NetworkUrl string `json:"networkUrl,omitempty"` + + // Port: Load Balancer to health check. The configured port of the Load + // Balancer. + Port string `json:"port,omitempty"` + + // Project: present. This should be formatted like + // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + // The project ID in which the ILB exists. + Project string `json:"project,omitempty"` + + // Region: The region for regional ILBs. + Region string `json:"region,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IpAddress") 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 @@ -2424,8 +2529,8 @@ type RRSetRoutingPolicyGeoPolicyGeoPolicyItem struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "IpAddress") 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. @@ -2433,12 +2538,69 @@ type RRSetRoutingPolicyGeoPolicyGeoPolicyItem struct { NullFields []string `json:"-"` } -func (s *RRSetRoutingPolicyGeoPolicyGeoPolicyItem) MarshalJSON() ([]byte, error) { - type NoMethod RRSetRoutingPolicyGeoPolicyGeoPolicyItem +func (s *RRSetRoutingPolicyLoadBalancerTarget) MarshalJSON() ([]byte, error) { + type NoMethod RRSetRoutingPolicyLoadBalancerTarget + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RRSetRoutingPolicyPrimaryBackupPolicy: Configures a +// RRSetRoutingPolicy such that all queries are responded with the +// primary_targets if they are healthy. And if all of them are +// unhealthy, then we fallback to a geo localized policy. +type RRSetRoutingPolicyPrimaryBackupPolicy struct { + // BackupGeoTargets: Backup targets provide a regional failover policy + // for the otherwise global primary targets. If serving state is set to + // BACKUP, this policy essentially becomes a geo routing policy. + BackupGeoTargets *RRSetRoutingPolicyGeoPolicy `json:"backupGeoTargets,omitempty"` + + Kind string `json:"kind,omitempty"` + + PrimaryTargets *RRSetRoutingPolicyHealthCheckTargets `json:"primaryTargets,omitempty"` + + // TrickleTraffic: When serving state is PRIMARY, this field provides + // the option of sending a small percentage of the traffic to the backup + // targets. + TrickleTraffic float64 `json:"trickleTraffic,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackupGeoTargets") 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. "BackupGeoTargets") 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 *RRSetRoutingPolicyPrimaryBackupPolicy) MarshalJSON() ([]byte, error) { + type NoMethod RRSetRoutingPolicyPrimaryBackupPolicy raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +func (s *RRSetRoutingPolicyPrimaryBackupPolicy) UnmarshalJSON(data []byte) error { + type NoMethod RRSetRoutingPolicyPrimaryBackupPolicy + var s1 struct { + TrickleTraffic gensupport.JSONFloat64 `json:"trickleTraffic"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.TrickleTraffic = float64(s1.TrickleTraffic) + return nil +} + // RRSetRoutingPolicyWrrPolicy: Configures a RRSetRoutingPolicy that // routes in a weighted round robin fashion. type RRSetRoutingPolicyWrrPolicy struct { @@ -2472,6 +2634,14 @@ func (s *RRSetRoutingPolicyWrrPolicy) MarshalJSON() ([]byte, error) { // RRSetRoutingPolicyWrrPolicyWrrPolicyItem: A routing block which // contains the routing information for one WRR item. type RRSetRoutingPolicyWrrPolicyWrrPolicyItem struct { + // HealthCheckedTargets: endpoints that need to be health checked before + // making the routing decision. The unhealthy endpoints will be omitted + // from the result. If all endpoints within a buckete are unhealthy, + // we'll choose a different bucket (sampled w.r.t. its weight) for + // responding. Note that if DNSSEC is enabled for this zone, only one of + // rrdata or health_checked_targets can be set. + HealthCheckedTargets *RRSetRoutingPolicyHealthCheckTargets `json:"healthCheckedTargets,omitempty"` + Kind string `json:"kind,omitempty"` Rrdatas []string `json:"rrdatas,omitempty"` @@ -2488,20 +2658,22 @@ type RRSetRoutingPolicyWrrPolicyWrrPolicyItem struct { // should be non-negative. Weight float64 `json:"weight,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") 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 is a list of field names (e.g. + // "HealthCheckedTargets") 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. "Kind") 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 is a list of field names (e.g. "HealthCheckedTargets") 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:"-"` } diff --git a/drivelabels/v2beta/drivelabels-api.json b/drivelabels/v2beta/drivelabels-api.json new file mode 100644 index 00000000000..2cb007fdcb1 --- /dev/null +++ b/drivelabels/v2beta/drivelabels-api.json @@ -0,0 +1,2902 @@ +{ + "basePath": "", + "baseUrl": "https://drivelabels.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Drive Labels", + "description": "An API for managing Drive Labels", + "discoveryVersion": "v1", + "documentationLink": "https://developers.google.com/drive/labels", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "drivelabels:v2beta", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://drivelabels.mtls.googleapis.com/", + "name": "drivelabels", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "labels": { + "methods": { + "create": { + "description": "Creates a new Label.", + "flatPath": "v2beta/labels", + "httpMethod": "POST", + "id": "drivelabels.labels.create", + "parameterOrder": [], + "parameters": { + "languageCode": { + "description": "The BCP-47 language code to use for evaluating localized Field labels in response. When not specified, values in the default configured language will be used.", + "location": "query", + "type": "string" + }, + "useAdminAccess": { + "description": "Set to `true` in order to use the user's admin privileges. The server will verify the user is an admin before allowing access.", + "location": "query", + "type": "boolean" + } + }, + "path": "v2beta/labels", + "request": { + "$ref": "GoogleAppsDriveLabelsV2betaLabel" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2betaLabel" + } + }, + "delete": { + "description": "Permanently deletes a Label and related metadata on Drive Items. Once deleted, the Label and related Drive item metadata will be deleted. Only draft Labels, and disabled Labels may be deleted.", + "flatPath": "v2beta/labels/{labelsId}", + "httpMethod": "DELETE", + "id": "drivelabels.labels.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Label resource name.", + "location": "path", + "pattern": "^labels/[^/]+$", + "required": true, + "type": "string" + }, + "useAdminAccess": { + "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + "location": "query", + "type": "boolean" + }, + "writeControl.requiredRevisionId": { + "description": "The revision_id of the label that the write request will be applied to. If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error.", + "location": "query", + "type": "string" + } + }, + "path": "v2beta/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + } + }, + "delta": { + "description": "Updates a single Label by applying a set of update requests resulting in a new draft revision. The batch update is all-or-nothing: If any of the update requests are invalid, no changes are applied. The resulting draft revision must be published before the changes may be used with Drive Items.", + "flatPath": "v2beta/labels/{labelsId}:delta", + "httpMethod": "POST", + "id": "drivelabels.labels.delta", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Label to update.", + "location": "path", + "pattern": "^labels/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+name}:delta", + "request": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequest" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponse" + } + }, + "disable": { + "description": "Disable a published Label. Disabling a Label will result in a new disabled published revision based on the current published revision. If there is a draft revision, a new disabled draft revision will be created based on the latest draft revision. Older draft revisions will be deleted. Once disabled, a label may be deleted with `DeleteLabel`.", + "flatPath": "v2beta/labels/{labelsId}:disable", + "httpMethod": "POST", + "id": "drivelabels.labels.disable", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Label resource name.", + "location": "path", + "pattern": "^labels/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+name}:disable", + "request": { + "$ref": "GoogleAppsDriveLabelsV2betaDisableLabelRequest" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2betaLabel" + } + }, + "enable": { + "description": "Enable a disabled Label and restore it to its published state. This will result in a new published revision based on the current disabled published revision. If there is an existing disabled draft revision, a new revision will be created based on that draft and will be enabled.", + "flatPath": "v2beta/labels/{labelsId}:enable", + "httpMethod": "POST", + "id": "drivelabels.labels.enable", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Label resource name.", + "location": "path", + "pattern": "^labels/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+name}:enable", + "request": { + "$ref": "GoogleAppsDriveLabelsV2betaEnableLabelRequest" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2betaLabel" + } + }, + "get": { + "description": "Get a Label by its resource name. Resource name may be any of: * `labels/{id}` - See to `labels/{id}@latest` * `labels/{id}@latest` - Gets the latest revision of the Label. * `labels/{id}@published` - Gets the current published revision of the Label. * `labels/{id}@{revision_id}` - Gets the Label at the specified revision ID.", + "flatPath": "v2beta/labels/{labelsId}", + "httpMethod": "GET", + "id": "drivelabels.labels.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "languageCode": { + "description": "The BCP-47 language code to use for evaluating localized Field labels. When not specified, values in the default configured language will be used.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. Label resource name. May be any of: * `labels/{id}` (equivalent to labels/{id}@latest) * `labels/{id}@latest` * `labels/{id}@published` * `labels/{id}@{revision_id}`", + "location": "path", + "pattern": "^labels/[^/]+$", + "required": true, + "type": "string" + }, + "useAdminAccess": { + "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + "location": "query", + "type": "boolean" + }, + "view": { + "description": "When specified, only certain Fields belonging to the indicated view will be returned.", + "enum": [ + "LABEL_VIEW_BASIC", + "LABEL_VIEW_FULL" + ], + "enumDescriptions": [ + "Implies the field mask: `name,id,revision_id,label_type,properties.*`", + "All possible fields." + ], + "location": "query", + "type": "string" + } + }, + "path": "v2beta/{+name}", + "response": { + "$ref": "GoogleAppsDriveLabelsV2betaLabel" + } + }, + "list": { + "description": "-------------------------------------------------------------------------- ## Label APIs --------------------------------------------------------------- List Labels.", + "flatPath": "v2beta/labels", + "httpMethod": "GET", + "id": "drivelabels.labels.list", + "parameterOrder": [], + "parameters": { + "languageCode": { + "description": "The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language will be used.", + "location": "query", + "type": "string" + }, + "minimumRole": { + "description": "Specifies the level of access the user must have on the returned Labels. The minimum role a user must have on a label. Defaults to `READER`.", + "enum": [ + "LABEL_ROLE_UNSPECIFIED", + "READER", + "APPLIER", + "ORGANIZER", + "EDITOR" + ], + "enumDescriptions": [ + "Unknown role.", + "A reader can read the Label and associated metadata applied to Drive items.", + "An applier can write associated metadata on Drive items in which they also have write access to. Implies `READER`.", + "An organizer is allowed to pin this label in shared drives they manage and add new appliers to the label.", + "Editors may make any updates including deleting the Label which will also delete associated Drive item metadata. Implies `APPLIER`." + ], + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of Labels to return per page. Default: 50. Max: 200.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The token of the page to return.", + "location": "query", + "type": "string" + }, + "publishedOnly": { + "description": "Whether to include only published labels in the results. * When `true`, only the current published label revisions will be returned. Disabled labels will be included. Returned Label resource names will reference the published revision (`labels/{id}/{revision_id}`). * When `false`, the current label revisions will be returned, which may not by published. Returned Label resource names will not reference a specific revision (`labels/{id}`).", + "location": "query", + "type": "boolean" + }, + "useAdminAccess": { + "description": "Set to `true` in order to use the user's admin credentials. This will return all Labels within the customer.", + "location": "query", + "type": "boolean" + }, + "view": { + "description": "When specified, only certain fields belonging to the indicated view will be returned.", + "enum": [ + "LABEL_VIEW_BASIC", + "LABEL_VIEW_FULL" + ], + "enumDescriptions": [ + "Implies the field mask: `name,id,revision_id,label_type,properties.*`", + "All possible fields." + ], + "location": "query", + "type": "string" + } + }, + "path": "v2beta/labels", + "response": { + "$ref": "GoogleAppsDriveLabelsV2betaListLabelsResponse" + } + }, + "publish": { + "description": "Publish all draft changes to the Label. Once published, the Label may not return to its draft state. See `google.apps.drive.labels.v2.Lifecycle` for more information. Publishing a Label will result in a new published revision. All previous draft revisions will be deleted. Previous published revisions will be kept but are subject to automated deletion as needed. Once published, some changes are no longer permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the Label will be rejected. For example, the following changes to a Label will be rejected after the Label is published: * The label cannot be directly deleted. It must be disabled first, then deleted. * Field.FieldType cannot be changed. * Changes to Field validation options cannot reject something that was previously accepted. * Reducing the max entries.", + "flatPath": "v2beta/labels/{labelsId}:publish", + "httpMethod": "POST", + "id": "drivelabels.labels.publish", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Label resource name.", + "location": "path", + "pattern": "^labels/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+name}:publish", + "request": { + "$ref": "GoogleAppsDriveLabelsV2betaPublishLabelRequest" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2betaLabel" + } + }, + "updateLabelCopyMode": { + "description": "Updates a Label's `CopyMode`. Changes to this policy are not revisioned, do not require publishing, and take effect immediately.", + "flatPath": "v2beta/labels/{labelsId}:updateLabelCopyMode", + "httpMethod": "POST", + "id": "drivelabels.labels.updateLabelCopyMode", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Label to update.", + "location": "path", + "pattern": "^labels/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+name}:updateLabelCopyMode", + "request": { + "$ref": "GoogleAppsDriveLabelsV2betaUpdateLabelCopyModeRequest" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2betaLabel" + } + } + }, + "resources": { + "locks": { + "methods": { + "list": { + "description": "Lists the Locks on a Label.", + "flatPath": "v2beta/labels/{labelsId}/locks", + "httpMethod": "GET", + "id": "drivelabels.labels.locks.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of Locks to return per page. Default: 100. Max: 200.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The token of the page to return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Label on which Locks are applied. Format: labels/{label}", + "location": "path", + "pattern": "^labels/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+parent}/locks", + "response": { + "$ref": "GoogleAppsDriveLabelsV2betaListLabelLocksResponse" + } + } + } + }, + "permissions": { + "methods": { + "batchDelete": { + "description": "Deletes Label permissions. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + "flatPath": "v2beta/labels/{labelsId}/permissions:batchDelete", + "httpMethod": "POST", + "id": "drivelabels.labels.permissions.batchDelete", + "parameterOrder": [ + "labelsId" + ], + "parameters": { + "labelsId": { + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v2beta/labels/{labelsId}/permissions:batchDelete", + "request": { + "$ref": "GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest" + }, + "response": { + "$ref": "GoogleProtobufEmpty" + } + }, + "batchUpdate": { + "description": "Updates Label permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + "flatPath": "v2beta/labels/{labelsId}/permissions:batchUpdate", + "httpMethod": "POST", + "id": "drivelabels.labels.permissions.batchUpdate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent Label resource name shared by all permissions being updated. Format: labels/{label} If this is set, the parent field in the UpdateLabelPermissionRequest messages must either be empty or match this field.", + "location": "path", + "pattern": "^labels/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+parent}/permissions:batchUpdate", + "request": { + "$ref": "GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse" + } + }, + "create": { + "description": "Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + "flatPath": "v2beta/labels/{labelsId}/permissions", + "httpMethod": "POST", + "id": "drivelabels.labels.permissions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent Label resource name on the Label Permission is created. Format: labels/{label}", + "location": "path", + "pattern": "^labels/[^/]+$", + "required": true, + "type": "string" + }, + "useAdminAccess": { + "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + "location": "query", + "type": "boolean" + } + }, + "path": "v2beta/{+parent}/permissions", + "request": { + "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" + } + }, + "delete": { + "description": "Deletes a Label's permission. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + "flatPath": "v2beta/labels/{labelsId}/permissions/{permissionsId}", + "httpMethod": "DELETE", + "id": "drivelabels.labels.permissions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Label Permission resource name.", + "location": "path", + "pattern": "^labels/[^/]+/permissions/[^/]+$", + "required": true, + "type": "string" + }, + "useAdminAccess": { + "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + "location": "query", + "type": "boolean" + } + }, + "path": "v2beta/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + } + }, + "list": { + "description": "Lists a Label's permissions.", + "flatPath": "v2beta/labels/{labelsId}/permissions", + "httpMethod": "GET", + "id": "drivelabels.labels.permissions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of permissions to return per page. Default: 50. Max: 200.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The token of the page to return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent Label resource name on which Label Permission are listed. Format: labels/{label}", + "location": "path", + "pattern": "^labels/[^/]+$", + "required": true, + "type": "string" + }, + "useAdminAccess": { + "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + "location": "query", + "type": "boolean" + } + }, + "path": "v2beta/{+parent}/permissions", + "response": { + "$ref": "GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse" + } + }, + "patch": { + "description": "Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + "flatPath": "v2beta/labels/{labelsId}/permissions/{permissionsId}", + "httpMethod": "PATCH", + "id": "drivelabels.labels.permissions.patch", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent Label resource name.", + "location": "path", + "pattern": "^labels/[^/]+/permissions/[^/]+$", + "required": true, + "type": "string" + }, + "useAdminAccess": { + "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + "location": "query", + "type": "boolean" + } + }, + "path": "v2beta/{+parent}", + "request": { + "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" + } + } + } + }, + "revisions": { + "resources": { + "locks": { + "methods": { + "list": { + "description": "Lists the Locks on a Label.", + "flatPath": "v2beta/labels/{labelsId}/revisions/{revisionsId}/locks", + "httpMethod": "GET", + "id": "drivelabels.labels.revisions.locks.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of Locks to return per page. Default: 100. Max: 200.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The token of the page to return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Label on which Locks are applied. Format: labels/{label}", + "location": "path", + "pattern": "^labels/[^/]+/revisions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+parent}/locks", + "response": { + "$ref": "GoogleAppsDriveLabelsV2betaListLabelLocksResponse" + } + } + } + }, + "permissions": { + "methods": { + "batchDelete": { + "description": "Deletes Label permissions. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + "flatPath": "v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions:batchDelete", + "httpMethod": "POST", + "id": "drivelabels.labels.revisions.permissions.batchDelete", + "parameterOrder": [ + "labelsId", + "revisionsId" + ], + "parameters": { + "labelsId": { + "location": "path", + "required": true, + "type": "string" + }, + "revisionsId": { + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions:batchDelete", + "request": { + "$ref": "GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest" + }, + "response": { + "$ref": "GoogleProtobufEmpty" + } + }, + "batchUpdate": { + "description": "Updates Label permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + "flatPath": "v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions:batchUpdate", + "httpMethod": "POST", + "id": "drivelabels.labels.revisions.permissions.batchUpdate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent Label resource name shared by all permissions being updated. Format: labels/{label} If this is set, the parent field in the UpdateLabelPermissionRequest messages must either be empty or match this field.", + "location": "path", + "pattern": "^labels/[^/]+/revisions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+parent}/permissions:batchUpdate", + "request": { + "$ref": "GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse" + } + }, + "create": { + "description": "Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + "flatPath": "v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions", + "httpMethod": "POST", + "id": "drivelabels.labels.revisions.permissions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent Label resource name on the Label Permission is created. Format: labels/{label}", + "location": "path", + "pattern": "^labels/[^/]+/revisions/[^/]+$", + "required": true, + "type": "string" + }, + "useAdminAccess": { + "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + "location": "query", + "type": "boolean" + } + }, + "path": "v2beta/{+parent}/permissions", + "request": { + "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" + } + }, + "delete": { + "description": "Deletes a Label's permission. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + "flatPath": "v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions/{permissionsId}", + "httpMethod": "DELETE", + "id": "drivelabels.labels.revisions.permissions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Label Permission resource name.", + "location": "path", + "pattern": "^labels/[^/]+/revisions/[^/]+/permissions/[^/]+$", + "required": true, + "type": "string" + }, + "useAdminAccess": { + "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + "location": "query", + "type": "boolean" + } + }, + "path": "v2beta/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + } + }, + "list": { + "description": "Lists a Label's permissions.", + "flatPath": "v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions", + "httpMethod": "GET", + "id": "drivelabels.labels.revisions.permissions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of permissions to return per page. Default: 50. Max: 200.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The token of the page to return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent Label resource name on which Label Permission are listed. Format: labels/{label}", + "location": "path", + "pattern": "^labels/[^/]+/revisions/[^/]+$", + "required": true, + "type": "string" + }, + "useAdminAccess": { + "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + "location": "query", + "type": "boolean" + } + }, + "path": "v2beta/{+parent}/permissions", + "response": { + "$ref": "GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse" + } + }, + "patch": { + "description": "Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + "flatPath": "v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions/{permissionsId}", + "httpMethod": "PATCH", + "id": "drivelabels.labels.revisions.permissions.patch", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent Label resource name.", + "location": "path", + "pattern": "^labels/[^/]+/revisions/[^/]+/permissions/[^/]+$", + "required": true, + "type": "string" + }, + "useAdminAccess": { + "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + "location": "query", + "type": "boolean" + } + }, + "path": "v2beta/{+parent}", + "request": { + "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" + } + } + } + } + } + } + } + }, + "limits": { + "methods": { + "getLabel": { + "description": "Get the constraints on the structure of a Label; such as, the maximum number of Fields allowed and maximum length of the label title.", + "flatPath": "v2beta/limits/label", + "httpMethod": "GET", + "id": "drivelabels.limits.getLabel", + "parameterOrder": [], + "parameters": { + "name": { + "description": "Required. Label revision resource name Must be: \"limits/label\"", + "location": "query", + "type": "string" + } + }, + "path": "v2beta/limits/label", + "response": { + "$ref": "GoogleAppsDriveLabelsV2betaLabelLimits" + } + } + } + }, + "users": { + "methods": { + "getCapabilities": { + "description": "Gets the user capabilities.", + "flatPath": "v2beta/users/{usersId}/capabilities", + "httpMethod": "GET", + "id": "drivelabels.users.getCapabilities", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the user. Only \"users/me/capabilities\" is supported.", + "location": "path", + "pattern": "^users/[^/]+/capabilities$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+name}", + "response": { + "$ref": "GoogleAppsDriveLabelsV2betaUserCapabilities" + } + } + } + } + }, + "revision": "20220726", + "rootUrl": "https://drivelabels.googleapis.com/", + "schemas": { + "GoogleAppsDriveLabelsV2betaBadgeColors": { + "description": "The color derived from BadgeConfig and coerced to the nearest supported color.", + "id": "GoogleAppsDriveLabelsV2betaBadgeColors", + "properties": { + "backgroundColor": { + "$ref": "GoogleTypeColor", + "description": "Output only. Badge background which pairs with the foreground", + "readOnly": true + }, + "foregroundColor": { + "$ref": "GoogleTypeColor", + "description": "Output only. Badge foreground which pairs with the background", + "readOnly": true + }, + "soloColor": { + "$ref": "GoogleTypeColor", + "description": "Output only. Color that can be used for text without a background", + "readOnly": true + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaBadgeConfig": { + "description": "Badge status of the label.", + "id": "GoogleAppsDriveLabelsV2betaBadgeConfig", + "properties": { + "color": { + "$ref": "GoogleTypeColor", + "description": "The color of the badge. When not specified, no badge will be rendered. This color will be coerced into the closest recommended supported color." + }, + "priorityOverride": { + "description": "Override the default global priority of this badge. When set to 0, the default priority heuristic will be used.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest": { + "description": "Deletes one of more Label Permissions.", + "id": "GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest", + "properties": { + "requests": { + "description": "Required. The request message specifying the resources to update.", + "items": { + "$ref": "GoogleAppsDriveLabelsV2betaDeleteLabelPermissionRequest" + }, + "type": "array" + }, + "useAdminAccess": { + "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access. If this is set, the use_admin_access field in the DeleteLabelPermissionRequest messages must either be empty or match this field.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest": { + "description": "Updates one or more Label Permissions.", + "id": "GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest", + "properties": { + "requests": { + "description": "Required. The request message specifying the resources to update.", + "items": { + "$ref": "GoogleAppsDriveLabelsV2betaUpdateLabelPermissionRequest" + }, + "type": "array" + }, + "useAdminAccess": { + "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access. If this is set, the use_admin_access field in the UpdateLabelPermissionRequest messages must either be empty or match this field.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse": { + "description": "Response for updating one or more Label Permissions.", + "id": "GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse", + "properties": { + "permissions": { + "description": "Required. Permissions updated.", + "items": { + "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDateLimits": { + "description": "Limits for date Field type.", + "id": "GoogleAppsDriveLabelsV2betaDateLimits", + "properties": { + "maxValue": { + "$ref": "GoogleTypeDate", + "description": "Maximum value for the date Field type." + }, + "minValue": { + "$ref": "GoogleTypeDate", + "description": "Minimum value for the date Field type." + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeleteLabelPermissionRequest": { + "description": "Deletes a Label Permission. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + "id": "GoogleAppsDriveLabelsV2betaDeleteLabelPermissionRequest", + "properties": { + "name": { + "description": "Required. Label Permission resource name.", + "type": "string" + }, + "useAdminAccess": { + "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequest": { + "description": "The set of requests for updating aspects of a Label. If any request is not valid, no requests will be applied.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequest", + "properties": { + "languageCode": { + "description": "The BCP-47 language code to use for evaluating localized Field labels when `include_label_in_response` is `true`.", + "type": "string" + }, + "requests": { + "description": "A list of updates to apply to the Label. Requests will be applied in the order they are specified.", + "items": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestRequest" + }, + "type": "array" + }, + "useAdminAccess": { + "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + "type": "boolean" + }, + "view": { + "description": "When specified, only certain fields belonging to the indicated view will be returned.", + "enum": [ + "LABEL_VIEW_BASIC", + "LABEL_VIEW_FULL" + ], + "enumDescriptions": [ + "Implies the field mask: `name,id,revision_id,label_type,properties.*`", + "All possible fields." + ], + "type": "string" + }, + "writeControl": { + "$ref": "GoogleAppsDriveLabelsV2betaWriteControl", + "description": "Provides control over how write requests are executed." + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateFieldRequest": { + "description": "Request to create a Field within a Label.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateFieldRequest", + "properties": { + "field": { + "$ref": "GoogleAppsDriveLabelsV2betaField", + "description": "Required. Field to create." + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateSelectionChoiceRequest": { + "description": "Request to create a Selection Choice.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateSelectionChoiceRequest", + "properties": { + "choice": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoice", + "description": "Required. The Choice to create." + }, + "fieldId": { + "description": "Required. The Selection Field in which a Choice will be created.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteFieldRequest": { + "description": "Request to delete the Field.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteFieldRequest", + "properties": { + "id": { + "description": "Required. ID of the Field to delete.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteSelectionChoiceRequest": { + "description": "Request to delete a Choice.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteSelectionChoiceRequest", + "properties": { + "fieldId": { + "description": "Required. The Selection Field from which a Choice will be deleted.", + "type": "string" + }, + "id": { + "description": "Required. Choice to delete.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableFieldRequest": { + "description": "Request to disable the Field.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableFieldRequest", + "properties": { + "disabledPolicy": { + "$ref": "GoogleAppsDriveLabelsV2betaLifecycleDisabledPolicy", + "description": "Required. Field Disabled Policy." + }, + "id": { + "description": "Required. Key of the Field to disable.", + "type": "string" + }, + "updateMask": { + "description": "The fields that should be updated. At least one field must be specified. The root `disabled_policy` is implied and should not be specified. A single `*` can be used as short-hand for updating every field.", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableSelectionChoiceRequest": { + "description": "Request to disable a Choice.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableSelectionChoiceRequest", + "properties": { + "disabledPolicy": { + "$ref": "GoogleAppsDriveLabelsV2betaLifecycleDisabledPolicy", + "description": "Required. The disabled policy to update." + }, + "fieldId": { + "description": "Required. The Selection Field in which a Choice will be disabled.", + "type": "string" + }, + "id": { + "description": "Required. Choice to disable.", + "type": "string" + }, + "updateMask": { + "description": "The fields that should be updated. At least one field must be specified. The root `disabled_policy` is implied and should not be specified. A single `*` can be used as short-hand for updating every field.", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableFieldRequest": { + "description": "Request to enable the Field.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableFieldRequest", + "properties": { + "id": { + "description": "Required. ID of the Field to enable.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableSelectionChoiceRequest": { + "description": "Request to enable a Choice.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableSelectionChoiceRequest", + "properties": { + "fieldId": { + "description": "Required. The Selection Field in which a Choice will be enabled.", + "type": "string" + }, + "id": { + "description": "Required. Choice to enable.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestRequest": { + "description": "A single kind of update to apply to a Label.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestRequest", + "properties": { + "createField": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateFieldRequest", + "description": "Creates a new Field." + }, + "createSelectionChoice": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateSelectionChoiceRequest", + "description": "Creates Choice within a Selection field." + }, + "deleteField": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteFieldRequest", + "description": "Deletes a Field from the label." + }, + "deleteSelectionChoice": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteSelectionChoiceRequest", + "description": "Delete a Choice within a Selection Field." + }, + "disableField": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableFieldRequest", + "description": "Disables the Field." + }, + "disableSelectionChoice": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableSelectionChoiceRequest", + "description": "Disable a Choice within a Selection Field." + }, + "enableField": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableFieldRequest", + "description": "Enables the Field." + }, + "enableSelectionChoice": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableSelectionChoiceRequest", + "description": "Enable a Choice within a Selection Field." + }, + "updateField": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldPropertiesRequest", + "description": "Updates basic properties of a Field." + }, + "updateFieldType": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldTypeRequest", + "description": "Update Field type and/or type options." + }, + "updateLabel": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateLabelPropertiesRequest", + "description": "Updates the Label properties." + }, + "updateSelectionChoiceProperties": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateSelectionChoicePropertiesRequest", + "description": "Update a Choice properties within a Selection Field." + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldPropertiesRequest": { + "description": "Request to update Field properties.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldPropertiesRequest", + "properties": { + "id": { + "description": "Required. The Field to update.", + "type": "string" + }, + "properties": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldProperties", + "description": "Required. Basic Field properties." + }, + "updateMask": { + "description": "The fields that should be updated. At least one field must be specified. The root `properties` is implied and should not be specified. A single `*` can be used as short-hand for updating every field.", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldTypeRequest": { + "description": "Request to change the type of a Field.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldTypeRequest", + "properties": { + "dateOptions": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldDateOptions", + "description": "Update field to Date." + }, + "id": { + "description": "Required. The Field to update.", + "type": "string" + }, + "integerOptions": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldIntegerOptions", + "description": "Update field to Integer." + }, + "longTextOptions": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldLongTextOptions", + "description": "Update field to Long Text." + }, + "selectionOptions": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldSelectionOptions", + "description": "Update field to Selection." + }, + "textOptions": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldTextOptions", + "description": "Update field to Text." + }, + "updateMask": { + "description": "The fields that should be updated. At least one field must be specified. The root of `type_options` is implied and should not be specified. A single `*` can be used as short-hand for updating every field.", + "format": "google-fieldmask", + "type": "string" + }, + "userOptions": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldUserOptions", + "description": "Update field to User." + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateLabelPropertiesRequest": { + "description": "Updates basic properties of a Label.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateLabelPropertiesRequest", + "properties": { + "properties": { + "$ref": "GoogleAppsDriveLabelsV2betaLabelProperties", + "description": "Required. Label properties to update." + }, + "updateMask": { + "description": "The fields that should be updated. At least one field must be specified. The root `label_properties` is implied and should not be specified. A single `*` can be used as short-hand for updating every field.", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateSelectionChoicePropertiesRequest": { + "description": "Request to update a Choice properties.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateSelectionChoicePropertiesRequest", + "properties": { + "fieldId": { + "description": "Required. The Selection Field to update.", + "type": "string" + }, + "id": { + "description": "Required. The Choice to update.", + "type": "string" + }, + "properties": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceProperties", + "description": "Required. The Choice properties to update." + }, + "updateMask": { + "description": "The fields that should be updated. At least one field must be specified. The root `properties` is implied and should not be specified. A single `*` can be used as short-hand for updating every field.", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponse": { + "description": "Response for Label update.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponse", + "properties": { + "responses": { + "description": "The reply of the updates. This maps 1:1 with the updates, although responses to some requests may be empty.", + "items": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseResponse" + }, + "type": "array" + }, + "updatedLabel": { + "$ref": "GoogleAppsDriveLabelsV2betaLabel", + "description": "The label after updates were applied. This is only set if [BatchUpdateLabelResponse2.include_label_in_response] is `true` and there were no errors." + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateFieldResponse": { + "description": "Response following Field create.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateFieldResponse", + "properties": { + "id": { + "description": "The field of the created field. When left blank in a create request, a key will be autogenerated and can be identified here.", + "type": "string" + }, + "priority": { + "description": "The priority of the created field. The priority may change from what was specified to assure contiguous priorities between fields (1-n).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateSelectionChoiceResponse": { + "description": "Response following Selection Choice create.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateSelectionChoiceResponse", + "properties": { + "fieldId": { + "description": "The server-generated id of the field.", + "type": "string" + }, + "id": { + "description": "The server-generated ID of the created choice within the Field", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDeleteFieldResponse": { + "description": "Response following Field delete.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDeleteFieldResponse", + "properties": {}, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDeleteSelectionChoiceResponse": { + "description": "Response following Choice delete.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDeleteSelectionChoiceResponse", + "properties": {}, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDisableFieldResponse": { + "description": "Response following Field disable.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDisableFieldResponse", + "properties": {}, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDisableSelectionChoiceResponse": { + "description": "Response following Choice disable.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDisableSelectionChoiceResponse", + "properties": {}, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseEnableFieldResponse": { + "description": "Response following Field enable.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseEnableFieldResponse", + "properties": {}, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseEnableSelectionChoiceResponse": { + "description": "Response following Choice enable.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseEnableSelectionChoiceResponse", + "properties": {}, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseResponse": { + "description": "A single response from an update.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseResponse", + "properties": { + "createField": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateFieldResponse", + "description": "Creates a new Field." + }, + "createSelectionChoice": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateSelectionChoiceResponse", + "description": "Creates a new selection list option to add to a Selection Field." + }, + "deleteField": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDeleteFieldResponse", + "description": "Deletes a Field from the label." + }, + "deleteSelectionChoice": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDeleteSelectionChoiceResponse", + "description": "Deletes a Choice from a Selection Field." + }, + "disableField": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDisableFieldResponse", + "description": "Disables Field." + }, + "disableSelectionChoice": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDisableSelectionChoiceResponse", + "description": "Disables a Choice within a Selection Field." + }, + "enableField": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseEnableFieldResponse", + "description": "Enables Field." + }, + "enableSelectionChoice": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseEnableSelectionChoiceResponse", + "description": "Enables a Choice within a Selection Field." + }, + "updateField": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateFieldPropertiesResponse", + "description": "Updates basic properties of a Field." + }, + "updateFieldType": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateFieldTypeResponse", + "description": "Update Field type and/or type options." + }, + "updateLabel": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateLabelPropertiesResponse", + "description": "Updated basic properties of a Label." + }, + "updateSelectionChoiceProperties": { + "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateSelectionChoicePropertiesResponse", + "description": "Updates a Choice within a Selection Field." + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateFieldPropertiesResponse": { + "description": "Response following update to Field properties.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateFieldPropertiesResponse", + "properties": { + "priority": { + "description": "The priority of the updated field. The priority may change from what was specified to assure contiguous priorities between fields (1-n).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateFieldTypeResponse": { + "description": "Response following update to Field type.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateFieldTypeResponse", + "properties": {}, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateLabelPropertiesResponse": { + "description": "Response following update to Label properties.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateLabelPropertiesResponse", + "properties": {}, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateSelectionChoicePropertiesResponse": { + "description": "Response following update to Selection Choice properties.", + "id": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateSelectionChoicePropertiesResponse", + "properties": { + "priority": { + "description": "The priority of the updated choice. The priority may change from what was specified to assure contiguous priorities between choices (1-n).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaDisableLabelRequest": { + "description": "Request to deprecate a published Label.", + "id": "GoogleAppsDriveLabelsV2betaDisableLabelRequest", + "properties": { + "disabledPolicy": { + "$ref": "GoogleAppsDriveLabelsV2betaLifecycleDisabledPolicy", + "description": "Disabled policy to use." + }, + "languageCode": { + "description": "The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language will be used.", + "type": "string" + }, + "updateMask": { + "description": "The fields that should be updated. At least one field must be specified. The root `disabled_policy` is implied and should not be specified. A single `*` can be used as short-hand for updating every field.", + "format": "google-fieldmask", + "type": "string" + }, + "useAdminAccess": { + "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + "type": "boolean" + }, + "writeControl": { + "$ref": "GoogleAppsDriveLabelsV2betaWriteControl", + "description": "Provides control over how write requests are executed. Defaults to unset, which means last write wins." + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaEnableLabelRequest": { + "description": "Request to enable a label.", + "id": "GoogleAppsDriveLabelsV2betaEnableLabelRequest", + "properties": { + "languageCode": { + "description": "The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language will be used.", + "type": "string" + }, + "useAdminAccess": { + "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + "type": "boolean" + }, + "writeControl": { + "$ref": "GoogleAppsDriveLabelsV2betaWriteControl", + "description": "Provides control over how write requests are executed. Defaults to unset, which means last write wins." + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaField": { + "description": "Defines a field which has a display name, data type, and other configuration options. This field defines the kind of metadata that may be set on a Drive item.", + "id": "GoogleAppsDriveLabelsV2betaField", + "properties": { + "appliedCapabilities": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldAppliedCapabilities", + "description": "Output only. The capabilities this user has on this Field and its value when the Label is applied on Drive items.", + "readOnly": true + }, + "createTime": { + "description": "Output only. The time this field was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "creator": { + "$ref": "GoogleAppsDriveLabelsV2betaUserInfo", + "description": "Output only. The user who created this field.", + "readOnly": true + }, + "dateOptions": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldDateOptions", + "description": "Date field options." + }, + "disableTime": { + "description": "Output only. The time this field was disabled. This value has no meaning when the field is not disabled.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "disabler": { + "$ref": "GoogleAppsDriveLabelsV2betaUserInfo", + "description": "Output only. The user who disabled this field. This value has no meaning when the field is not disabled.", + "readOnly": true + }, + "displayHints": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldDisplayHints", + "description": "Output only. UI Display hints for rendering a Field.", + "readOnly": true + }, + "id": { + "description": "Output only. The key of a field, unique within a Label or Library. This value is autogenerated, and will match the form `([a-zA-Z0-9_])+", + "readOnly": true, + "type": "string" + }, + "integerOptions": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldIntegerOptions", + "description": "Integer field options." + }, + "lifecycle": { + "$ref": "GoogleAppsDriveLabelsV2betaLifecycle", + "description": "Output only. The lifecycle of this Field.", + "readOnly": true + }, + "lockStatus": { + "$ref": "GoogleAppsDriveLabelsV2betaLockStatus", + "description": "Output only. The LockStatus of this field.", + "readOnly": true + }, + "properties": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldProperties", + "description": "The basic properties of the field." + }, + "publisher": { + "$ref": "GoogleAppsDriveLabelsV2betaUserInfo", + "description": "Output only. The user who published this field. This value has no meaning when the field is not published.", + "readOnly": true + }, + "queryKey": { + "description": "Output only. The key to use when constructing Drive search queries to find files based on values defined for this Field on files. For example: \"`{query_key}` \u003e 2001-01-01\"", + "readOnly": true, + "type": "string" + }, + "schemaCapabilities": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldSchemaCapabilities", + "description": "Output only. The capabilities this user has when editing this Field", + "readOnly": true + }, + "selectionOptions": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldSelectionOptions", + "description": "Selection field options." + }, + "textOptions": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldTextOptions", + "description": "Text field options." + }, + "updateTime": { + "description": "Output only. The time this field was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "updater": { + "$ref": "GoogleAppsDriveLabelsV2betaUserInfo", + "description": "Output only. The user who modified this field.", + "readOnly": true + }, + "userOptions": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldUserOptions", + "description": "User field options." + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaFieldAppliedCapabilities": { + "description": "The capabilities related to this field on applied metadata.", + "id": "GoogleAppsDriveLabelsV2betaFieldAppliedCapabilities", + "properties": { + "canRead": { + "description": "Whether the user can read related applied metadata on items.", + "type": "boolean" + }, + "canSearch": { + "description": "Whether the user can search for drive items referencing this field.", + "type": "boolean" + }, + "canWrite": { + "description": "Whether the user can set this field on drive items.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaFieldDateOptions": { + "description": "Options for the date field type.", + "id": "GoogleAppsDriveLabelsV2betaFieldDateOptions", + "properties": { + "dateFormat": { + "description": "Output only. ICU Date format.", + "readOnly": true, + "type": "string" + }, + "dateFormatType": { + "description": "Localized date formatting option. Field values will be rendered in this format according to their locale.", + "enum": [ + "DATE_FORMAT_UNSPECIFIED", + "LONG_DATE", + "SHORT_DATE" + ], + "enumDescriptions": [ + "Date format unspecified.", + "Includes full month name. e.g. January 12, 1999 MMMM d, y", + "Short, numeric, representation. e.g. 12/13/99 M/d/yy" + ], + "type": "string" + }, + "maxValue": { + "$ref": "GoogleTypeDate", + "description": "Output only. Maximum valid value (year, month, day).", + "readOnly": true + }, + "minValue": { + "$ref": "GoogleTypeDate", + "description": "Output only. Minimum valid value (year, month, day).", + "readOnly": true + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaFieldDisplayHints": { + "description": "UI Display hints for rendering a Field.", + "id": "GoogleAppsDriveLabelsV2betaFieldDisplayHints", + "properties": { + "disabled": { + "description": "Whether the field should be shown in the UI as disabled.", + "type": "boolean" + }, + "hiddenInSearch": { + "description": "This Field should be hidden in the search menu.", + "type": "boolean" + }, + "required": { + "description": "Whether the Field should be shown as required in the UI.", + "type": "boolean" + }, + "shownInApply": { + "description": "This Field should be shown when applying values to a Drive item.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaFieldIntegerOptions": { + "description": "Options for the Integer field type.", + "id": "GoogleAppsDriveLabelsV2betaFieldIntegerOptions", + "properties": { + "maxValue": { + "description": "Output only. The maximum valid value for the integer field.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "minValue": { + "description": "Output only. The minimum valid value for the integer field.", + "format": "int64", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaFieldLimits": { + "description": "Field constants governing the structure of a Field; such as, the maximum title length, minimum and maximum field values or length, etc.", + "id": "GoogleAppsDriveLabelsV2betaFieldLimits", + "properties": { + "dateLimits": { + "$ref": "GoogleAppsDriveLabelsV2betaDateLimits", + "description": "Date Field limits." + }, + "integerLimits": { + "$ref": "GoogleAppsDriveLabelsV2betaIntegerLimits", + "description": "Integer Field limits." + }, + "longTextLimits": { + "$ref": "GoogleAppsDriveLabelsV2betaLongTextLimits", + "description": "Long text Field limits." + }, + "maxDescriptionLength": { + "description": "Limits for Field description, also called help text.", + "format": "int32", + "type": "integer" + }, + "maxDisplayNameLength": { + "description": "Limits for Field title.", + "format": "int32", + "type": "integer" + }, + "maxIdLength": { + "description": "Max length for the id.", + "format": "int32", + "type": "integer" + }, + "selectionLimits": { + "$ref": "GoogleAppsDriveLabelsV2betaSelectionLimits", + "description": "Selection Field limits." + }, + "textLimits": { + "$ref": "GoogleAppsDriveLabelsV2betaTextLimits", + "description": "The relevant limits for the specified Field.Type. Text Field limits." + }, + "userLimits": { + "$ref": "GoogleAppsDriveLabelsV2betaUserLimits", + "description": "User Field limits." + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaFieldListOptions": { + "description": "Options for a multi-valued variant of an associated field type.", + "id": "GoogleAppsDriveLabelsV2betaFieldListOptions", + "properties": { + "maxEntries": { + "description": "Maximum number of entries permitted.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaFieldLongTextOptions": { + "description": "Options the Long Text field type.", + "id": "GoogleAppsDriveLabelsV2betaFieldLongTextOptions", + "properties": { + "maxLength": { + "description": "Output only. The maximum valid length of values for the text field.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "minLength": { + "description": "Output only. The minimum valid length of values for the text field.", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaFieldProperties": { + "description": "The basic properties of the field.", + "id": "GoogleAppsDriveLabelsV2betaFieldProperties", + "properties": { + "displayName": { + "description": "Required. The display text to show in the UI identifying this field.", + "type": "string" + }, + "insertBeforeField": { + "description": "Input only. Insert or move this Field to be ordered before the indicated Field. If empty, the Field will be placed at the end of the list.", + "type": "string" + }, + "required": { + "description": "Whether the field should be marked as required.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaFieldSchemaCapabilities": { + "description": "The capabilities related to this Field when editing the Field.", + "id": "GoogleAppsDriveLabelsV2betaFieldSchemaCapabilities", + "properties": { + "canDelete": { + "description": "Whether the user can delete this Field. The user must have permissions and the Field must be deprecated.", + "type": "boolean" + }, + "canDisable": { + "description": "Whether the user can disable this Field. The user must have permissions and this Field must not already be disabled.", + "type": "boolean" + }, + "canEnable": { + "description": "Whether the user can enable this Field. The user must have permissions and this Field must be disabled.", + "type": "boolean" + }, + "canUpdate": { + "description": "Whether the user can change this field.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaFieldSelectionOptions": { + "description": "Options for the selection field type.", + "id": "GoogleAppsDriveLabelsV2betaFieldSelectionOptions", + "properties": { + "choices": { + "description": "The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.", + "items": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoice" + }, + "type": "array" + }, + "listOptions": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldListOptions", + "description": "When specified, indicates that this field support a list of values. Once the field is published, this cannot be changed." + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoice": { + "description": "Selection field Choice.", + "id": "GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoice", + "properties": { + "appliedCapabilities": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceAppliedCapabilities", + "description": "Output only. The capabilities related to this Choice on applied metadata.", + "readOnly": true + }, + "createTime": { + "description": "Output only. The time this Choice was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "creator": { + "$ref": "GoogleAppsDriveLabelsV2betaUserInfo", + "description": "Output only. The user who created this Choice.", + "readOnly": true + }, + "disableTime": { + "description": "Output only. The time this Choice was disabled. This value has no meaning when the Choice is not disabled.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "disabler": { + "$ref": "GoogleAppsDriveLabelsV2betaUserInfo", + "description": "Output only. The user who disabled this Choice. This value has no meaning when the option is not disabled.", + "readOnly": true + }, + "displayHints": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceDisplayHints", + "description": "Output only. UI Display hints for rendering a Choice.", + "readOnly": true + }, + "id": { + "description": "The unique value of the Choice. This ID will be autogenerated, and will match the form `([a-zA-Z0-9_])+`.", + "type": "string" + }, + "lifecycle": { + "$ref": "GoogleAppsDriveLabelsV2betaLifecycle", + "description": "Output only. Lifecycle of the Choice.", + "readOnly": true + }, + "lockStatus": { + "$ref": "GoogleAppsDriveLabelsV2betaLockStatus", + "description": "Output only. The LockStatus of this Choice.", + "readOnly": true + }, + "properties": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceProperties", + "description": "Basic properties of the Choice." + }, + "publishTime": { + "description": "Output only. The time this Choice was published. This value has no meaning when the Choice is not published.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "publisher": { + "$ref": "GoogleAppsDriveLabelsV2betaUserInfo", + "description": "Output only. The user who published this Choice. This value has no meaning when the Choice is not published.", + "readOnly": true + }, + "schemaCapabilities": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceSchemaCapabilities", + "description": "Output only. The capabilities related to this option when editing the option.", + "readOnly": true + }, + "updateTime": { + "description": "Output only. The time this Choice was updated last.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "updater": { + "$ref": "GoogleAppsDriveLabelsV2betaUserInfo", + "description": "Output only. The user who updated this Choice last.", + "readOnly": true + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceAppliedCapabilities": { + "description": "The capabilities related to this Choice on applied metadata.", + "id": "GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceAppliedCapabilities", + "properties": { + "canRead": { + "description": "Whether the user can read related applied metadata on items.", + "type": "boolean" + }, + "canSearch": { + "description": "Whether the user can use this Choice in search queries.", + "type": "boolean" + }, + "canSelect": { + "description": "Whether the user can select this Choice on an item.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceDisplayHints": { + "description": "UI Display hints for rendering a Option.", + "id": "GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceDisplayHints", + "properties": { + "badgeColors": { + "$ref": "GoogleAppsDriveLabelsV2betaBadgeColors", + "description": "The colors to use for the badge. Coerced to Google Material colors based on the chosen `properties.badge_config.color`." + }, + "badgePriority": { + "description": "The priority of this badge, used to compare and sort between multiple badges. A lower number means that the badge should be shown first. When a badging configuration is not present, this will be 0. Otherwise, this will be set to `BadgeConfig.priority_override` or the default heuristic which prefers creation date of the Label, and field and option priority.", + "format": "int64", + "type": "string" + }, + "darkBadgeColors": { + "$ref": "GoogleAppsDriveLabelsV2betaBadgeColors", + "description": "The dark-mode color to use for the badge. Coerced to Google Material colors based on the chosen `properties.badge_config.color`." + }, + "disabled": { + "description": "Whether the option should be shown in the UI as disabled.", + "type": "boolean" + }, + "hiddenInSearch": { + "description": "This option should be hidden in the search menu.", + "type": "boolean" + }, + "shownInApply": { + "description": "This option should be shown in the menu when applying values to a Drive item.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceProperties": { + "description": "Basic properties of the Choice.", + "id": "GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceProperties", + "properties": { + "badgeConfig": { + "$ref": "GoogleAppsDriveLabelsV2betaBadgeConfig", + "description": "The badge configuration for this Choice. When set, the Label that owns this Choice will be considered a \"badged label\"." + }, + "description": { + "description": "The description of this Label.", + "type": "string" + }, + "displayName": { + "description": "Required. The display text to show in the UI identifying this field.", + "type": "string" + }, + "insertBeforeChoice": { + "description": "Input only. Insert or move this Choice to be ordered before the indicated Choice. If empty, the Choice will be placed at the end of the list.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceSchemaCapabilities": { + "description": "The capabilities related to this Choice when editing the Choice.", + "id": "GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceSchemaCapabilities", + "properties": { + "canDelete": { + "description": "Whether the user can delete this Choice.", + "type": "boolean" + }, + "canDisable": { + "description": "Whether the user can disable this Chioce.", + "type": "boolean" + }, + "canEnable": { + "description": "Whether the user can enable this Choice.", + "type": "boolean" + }, + "canUpdate": { + "description": "Whether the user can update this Choice.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaFieldTextOptions": { + "description": "Options for the Text field type.", + "id": "GoogleAppsDriveLabelsV2betaFieldTextOptions", + "properties": { + "maxLength": { + "description": "Output only. The maximum valid length of values for the text field.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "minLength": { + "description": "Output only. The minimum valid length of values for the text field.", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaFieldUserOptions": { + "description": "Options for the user field type.", + "id": "GoogleAppsDriveLabelsV2betaFieldUserOptions", + "properties": { + "listOptions": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldListOptions", + "description": "When specified, indicates that this field support a list of values. Once the field is published, this cannot be changed." + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaIntegerLimits": { + "description": "Limits for integer Field type.", + "id": "GoogleAppsDriveLabelsV2betaIntegerLimits", + "properties": { + "maxValue": { + "description": "Maximum value for an integer Field type.", + "format": "int64", + "type": "string" + }, + "minValue": { + "description": "Minimum value for an integer Field type.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaLabel": { + "description": "A Label defines a taxonomy which may be applied to a Drive items in order to organize and search across Items. Labels may be simple strings, or may contain Fields that describe additional metadata which can be further used to organize and search Drive items.", + "id": "GoogleAppsDriveLabelsV2betaLabel", + "properties": { + "appliedCapabilities": { + "$ref": "GoogleAppsDriveLabelsV2betaLabelAppliedCapabilities", + "description": "Output only. The capabilities related to this label on applied metadata.", + "readOnly": true + }, + "appliedLabelPolicy": { + "$ref": "GoogleAppsDriveLabelsV2betaLabelAppliedLabelPolicy", + "description": "Output only. Behavior of this Label when its applied to Drive items.", + "readOnly": true + }, + "createTime": { + "description": "Output only. The time this label was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "creator": { + "$ref": "GoogleAppsDriveLabelsV2betaUserInfo", + "description": "Output only. The user who created this label.", + "readOnly": true + }, + "disableTime": { + "description": "Output only. The time this label was disabled. This value has no meaning when the label is not disabled.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "disabler": { + "$ref": "GoogleAppsDriveLabelsV2betaUserInfo", + "description": "Output only. The user who disabled this label. This value has no meaning when the label is not disabled.", + "readOnly": true + }, + "displayHints": { + "$ref": "GoogleAppsDriveLabelsV2betaLabelDisplayHints", + "description": "Output only. UI Display hints for rendering the Label.", + "readOnly": true + }, + "fields": { + "description": "List of Fields in descending priority order.", + "items": { + "$ref": "GoogleAppsDriveLabelsV2betaField" + }, + "type": "array" + }, + "id": { + "description": "Output only. Globally unique identifier of this Label. ID makes up part of the Label `name`, but unlike `name`, ID is consistent between revisions. Matches the regex: `([a-zA-Z0-9])+`", + "readOnly": true, + "type": "string" + }, + "labelType": { + "description": "Required. The type of this label.", + "enum": [ + "LABEL_TYPE_UNSPECIFIED", + "SHARED", + "ADMIN" + ], + "enumDescriptions": [ + "Unknown label type.", + "Shared labels may be shared with users to apply to Drive items.", + "Admin owned label. Only creatable and editable by admins, supports some additional admin-only features." + ], + "type": "string" + }, + "learnMoreUri": { + "description": "Custom URL to present to users to allow them to learn more about this label and how it should be used.", + "type": "string" + }, + "lifecycle": { + "$ref": "GoogleAppsDriveLabelsV2betaLifecycle", + "description": "Output only. The lifecycle state of the label including whether it's published, deprecated, and has draft changes.", + "readOnly": true + }, + "lockStatus": { + "$ref": "GoogleAppsDriveLabelsV2betaLockStatus", + "description": "Output only. The LockStatus of this label.", + "readOnly": true + }, + "name": { + "description": "Output only. Resource name of the Label. Will be in the form of either: `labels/{id}` or `labels/{id}@{revision_id}` depending on the request. See `id` and `revision_id` below.", + "readOnly": true, + "type": "string" + }, + "properties": { + "$ref": "GoogleAppsDriveLabelsV2betaLabelProperties", + "description": "Required. The basic properties of the Label." + }, + "publishTime": { + "description": "Output only. The time this label was published. This value has no meaning when the label is not published.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "publisher": { + "$ref": "GoogleAppsDriveLabelsV2betaUserInfo", + "description": "Output only. The user who published this label. This value has no meaning when the label is not published.", + "readOnly": true + }, + "revisionCreateTime": { + "description": "Output only. The time this label revision was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "revisionCreator": { + "$ref": "GoogleAppsDriveLabelsV2betaUserInfo", + "description": "Output only. The user who created this label revision.", + "readOnly": true + }, + "revisionId": { + "description": "Output only. Revision ID of the Label. Revision ID may be part of the Label `name` depending on the request issued. A new revision is created whenever revisioned properties of a Label are changed. Matches the regex: `([a-zA-Z0-9])+`", + "readOnly": true, + "type": "string" + }, + "schemaCapabilities": { + "$ref": "GoogleAppsDriveLabelsV2betaLabelSchemaCapabilities", + "description": "Output only. The capabilities the user has on this Label.", + "readOnly": true + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaLabelAppliedCapabilities": { + "description": "The capabilities a user has on this Label's applied metadata.", + "id": "GoogleAppsDriveLabelsV2betaLabelAppliedCapabilities", + "properties": { + "canApply": { + "description": "Whether the user can apply this Label to items.", + "type": "boolean" + }, + "canRead": { + "description": "Whether the user can read applied metadata related to this label.", + "type": "boolean" + }, + "canRemove": { + "description": "Whether the user can remove this Label from items.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaLabelAppliedLabelPolicy": { + "description": "Behavior of this Label when its applied to Drive items.", + "id": "GoogleAppsDriveLabelsV2betaLabelAppliedLabelPolicy", + "properties": { + "copyMode": { + "description": "Indicates how the applied Label, and Field values should be copied when a Drive item is copied.", + "enum": [ + "COPY_MODE_UNSPECIFIED", + "DO_NOT_COPY", + "ALWAYS_COPY", + "COPY_APPLIABLE" + ], + "enumDescriptions": [ + "Copy mode unspecified.", + "The applied Label and Field values will not be copied by default when the Drive item it is applied to is copied.", + "The applied Label and Field values will always be copied when the Drive item it is applied to is copied. Only admins may use this mode.", + "The applied Label and Field values will be copied if and only if the label is appliable by the user making the copy." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaLabelDisplayHints": { + "description": "UI Display hints for rendering the Label.", + "id": "GoogleAppsDriveLabelsV2betaLabelDisplayHints", + "properties": { + "disabled": { + "description": "Whether the Label should be shown in the UI as disabled.", + "type": "boolean" + }, + "hiddenInSearch": { + "description": "This Label should be hidden in the search menu when searching for Drive items.", + "type": "boolean" + }, + "priority": { + "description": "Order to display label in a list", + "format": "int64", + "type": "string" + }, + "shownInApply": { + "description": "This Label should be shown in the apply menu.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaLabelLimits": { + "description": "Label constraints governing the structure of a Label; such as, the maximum number of Fields allowed and maximum length of the label title.", + "id": "GoogleAppsDriveLabelsV2betaLabelLimits", + "properties": { + "fieldLimits": { + "$ref": "GoogleAppsDriveLabelsV2betaFieldLimits", + "description": "The limits for Fields." + }, + "maxDeletedFields": { + "description": "The maximum number of published Fields that can be deleted.", + "format": "int32", + "type": "integer" + }, + "maxDescriptionLength": { + "description": "The maximum number of characters allowed for the description.", + "format": "int32", + "type": "integer" + }, + "maxDraftRevisions": { + "description": "The maximum number of draft revisions that will be kept before deleting old drafts.", + "format": "int32", + "type": "integer" + }, + "maxFields": { + "description": "The maximum number of Fields allowed within the label.", + "format": "int32", + "type": "integer" + }, + "maxTitleLength": { + "description": "The maximum number of characters allowed for the title.", + "format": "int32", + "type": "integer" + }, + "name": { + "description": "Resource name.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaLabelLock": { + "description": "A Lock that can be applied to a Label, Field, or Choice.", + "id": "GoogleAppsDriveLabelsV2betaLabelLock", + "properties": { + "capabilities": { + "$ref": "GoogleAppsDriveLabelsV2betaLabelLockCapabilities", + "description": "Output only. The user's capabilities on this LabelLock.", + "readOnly": true + }, + "choiceId": { + "description": "The ID of the Selection Field Choice that should be locked. If present, `field_id` must also be present.", + "type": "string" + }, + "createTime": { + "description": "Output only. The time this LabelLock was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "creator": { + "$ref": "GoogleAppsDriveLabelsV2betaUserInfo", + "description": "Output only. The user whose credentials were used to create the LabelLock. This will not be present if no user was responsible for creating the LabelLock.", + "readOnly": true + }, + "deleteTime": { + "description": "Output only. A timestamp indicating when this LabelLock was scheduled for deletion. This will be present only if this LabelLock is in the DELETING state.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "fieldId": { + "description": "The ID of the Field that should be locked. Empty if the whole Label should be locked.", + "type": "string" + }, + "name": { + "description": "Output only. Resource name of this LabelLock.", + "readOnly": true, + "type": "string" + }, + "policyUri": { + "description": "Output only. A URI referring to the policy that created this Lock.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. This LabelLock's state.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "DELETING" + ], + "enumDescriptions": [ + "Unknown state.", + "The LabelLock is active and is being enforced by the server.", + "The LabelLock is being deleted. The LabelLock will continue to be enforced by the server until it has been fully removed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaLabelLockCapabilities": { + "description": "A description of a user's capabilities on a LabelLock.", + "id": "GoogleAppsDriveLabelsV2betaLabelLockCapabilities", + "properties": { + "canViewPolicy": { + "description": "True if the user is authorized to view the policy.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaLabelPermission": { + "description": "The permission that applies to a principal (user, group, audience) on a label.", + "id": "GoogleAppsDriveLabelsV2betaLabelPermission", + "properties": { + "audience": { + "description": "Audience to grant a role to. The magic value of `audiences/default` may be used to apply the role to the default audience in the context of the organization that owns the Label.", + "type": "string" + }, + "email": { + "description": "Specifies the email address for a user or group pricinpal. Not populated for audience principals. User and Group permissions may only be inserted using email address. On update requests, if email address is specified, no principal should be specified.", + "type": "string" + }, + "group": { + "description": "Group resource name.", + "type": "string" + }, + "name": { + "description": "Resource name of this permission.", + "type": "string" + }, + "person": { + "description": "Person resource name.", + "type": "string" + }, + "role": { + "description": "The role the principal should have.", + "enum": [ + "LABEL_ROLE_UNSPECIFIED", + "READER", + "APPLIER", + "ORGANIZER", + "EDITOR" + ], + "enumDescriptions": [ + "Unknown role.", + "A reader can read the Label and associated metadata applied to Drive items.", + "An applier can write associated metadata on Drive items in which they also have write access to. Implies `READER`.", + "An organizer is allowed to pin this label in shared drives they manage and add new appliers to the label.", + "Editors may make any updates including deleting the Label which will also delete associated Drive item metadata. Implies `APPLIER`." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaLabelProperties": { + "description": "Basic properties of the Label.", + "id": "GoogleAppsDriveLabelsV2betaLabelProperties", + "properties": { + "description": { + "description": "The description of this Label.", + "type": "string" + }, + "title": { + "description": "Required. Title of the Label.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaLabelSchemaCapabilities": { + "description": "The capabilities related to this Label when editing the Label.", + "id": "GoogleAppsDriveLabelsV2betaLabelSchemaCapabilities", + "properties": { + "canDelete": { + "description": "Whether the user can delete this Label. The user must have permission and the Label must be disabled.", + "type": "boolean" + }, + "canDisable": { + "description": "Whether the user can disable this Label. The user must have permission and this Label must not already be disabled.", + "type": "boolean" + }, + "canEnable": { + "description": "Whether the user can enable this Label. The user must have permission and this Label must be disabled.", + "type": "boolean" + }, + "canUpdate": { + "description": "Whether the user can change this Label.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaLifecycle": { + "description": "The lifecycle state of an object, e.g. Label, Field, or Choice. The Lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -\u003e `PUBLISHED` * `UNPUBLISHED_DRAFT` -\u003e (Deleted) * `PUBLISHED` -\u003e `DISABLED` * `DISABLED` -\u003e `PUBLISHED` * `DISABLED` -\u003e (Deleted) The published and disabled states have some distinct characteristics: * Published - Some kinds of changes may be made to an object in this state, in which case `has_unpublished_changes` will be true. Some kinds of changes are not permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the Label will be rejected. * Disabled - When disabled, the configured `DisabledPolicy` will take effect.", + "id": "GoogleAppsDriveLabelsV2betaLifecycle", + "properties": { + "disabledPolicy": { + "$ref": "GoogleAppsDriveLabelsV2betaLifecycleDisabledPolicy", + "description": "The policy that governs how to show a disabled label, field, or selection choice." + }, + "hasUnpublishedChanges": { + "description": "Output only. Whether the object associated with this lifecycle has unpublished changes.", + "readOnly": true, + "type": "boolean" + }, + "state": { + "description": "Output only. The state of the object associated with this lifecycle.", + "enum": [ + "STATE_UNSPECIFIED", + "UNPUBLISHED_DRAFT", + "PUBLISHED", + "DISABLED", + "DELETED" + ], + "enumDescriptions": [ + "Unknown State.", + "The initial state of an object. Once published, the object may never return to this state. Once an object is published, certain kinds of changes are no longer permitted.", + "The object has been published. The object may have unpublished draft changes as indicated by `has_unpublished_changes`.", + "The object has been published, and has since been disabled. The object may have unpublished draft changes as indicated by `has_unpublished_changes`.", + "The object has been deleted" + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaLifecycleDisabledPolicy": { + "description": "The policy that governs how to treat a disabled label, field, or selection choice in different contexts.", + "id": "GoogleAppsDriveLabelsV2betaLifecycleDisabledPolicy", + "properties": { + "hideInSearch": { + "description": "Whether to hide this disabled object in the search menu for Drive items. * When `false` the object will generally be shown in the UI as disabled (but still permit searching) when searching for Drive items. * When `true` the object will generally be hidden in the UI when searching for Drive items.", + "type": "boolean" + }, + "showInApply": { + "description": "Whether to show this disabled object in the apply menu on Drive items. * When `true` the object will generally be shown in the UI as disabled and is unselectable. * When `false` the object will generally be hidden in the UI.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaListLabelLocksResponse": { + "description": "The response to a ListLabelLocksRequest.", + "id": "GoogleAppsDriveLabelsV2betaListLabelLocksResponse", + "properties": { + "labelLocks": { + "description": "LabelLocks.", + "items": { + "$ref": "GoogleAppsDriveLabelsV2betaLabelLock" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The token of the next page in the response.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse": { + "description": "Response for listing the permissions on a Label.", + "id": "GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse", + "properties": { + "labelPermissions": { + "description": "Label permissions.", + "items": { + "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The token of the next page in the response.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaListLabelsResponse": { + "description": "Response for listing Labels.", + "id": "GoogleAppsDriveLabelsV2betaListLabelsResponse", + "properties": { + "labels": { + "description": "Labels.", + "items": { + "$ref": "GoogleAppsDriveLabelsV2betaLabel" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The token of the next page in the response.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaListLimits": { + "description": "Limits for list-variant of a Field type.", + "id": "GoogleAppsDriveLabelsV2betaListLimits", + "properties": { + "maxEntries": { + "description": "Maximum number of values allowed for the Field type.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaLockStatus": { + "description": "Contains information about whether a label component should be considered locked.", + "id": "GoogleAppsDriveLabelsV2betaLockStatus", + "properties": { + "locked": { + "description": "Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component may be implicitly locked even if it is not the direct target of a LabelLock, in which case this field will be false.", + "readOnly": true, + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaLongTextLimits": { + "description": "Limits for long text Field type.", + "id": "GoogleAppsDriveLabelsV2betaLongTextLimits", + "properties": { + "maxLength": { + "description": "Maximum length allowed for a long text Field type.", + "format": "int32", + "type": "integer" + }, + "minLength": { + "description": "Minimum length allowed for a long text Field type.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaPublishLabelRequest": { + "description": "Request to publish a label.", + "id": "GoogleAppsDriveLabelsV2betaPublishLabelRequest", + "properties": { + "languageCode": { + "description": "The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language will be used.", + "type": "string" + }, + "useAdminAccess": { + "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + "type": "boolean" + }, + "writeControl": { + "$ref": "GoogleAppsDriveLabelsV2betaWriteControl", + "description": "Provides control over how write requests are executed. Defaults to unset, which means last write wins." + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaSelectionLimits": { + "description": "Limits for selection Field type.", + "id": "GoogleAppsDriveLabelsV2betaSelectionLimits", + "properties": { + "listLimits": { + "$ref": "GoogleAppsDriveLabelsV2betaListLimits", + "description": "Limits for list-variant of a Field type." + }, + "maxChoices": { + "description": "The max number of choices.", + "format": "int32", + "type": "integer" + }, + "maxDeletedChoices": { + "description": "Maximum number of deleted choices.", + "format": "int32", + "type": "integer" + }, + "maxDisplayNameLength": { + "description": "Maximum length for display name.", + "format": "int32", + "type": "integer" + }, + "maxIdLength": { + "description": "Maximum ID length for a selection options.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaTextLimits": { + "description": "Limits for text Field type.", + "id": "GoogleAppsDriveLabelsV2betaTextLimits", + "properties": { + "maxLength": { + "description": "Maximum length allowed for a text Field type.", + "format": "int32", + "type": "integer" + }, + "minLength": { + "description": "Minimum length allowed for a text Field type.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaUpdateLabelCopyModeRequest": { + "description": "Request to update the `CopyMode` of the given Label. Changes to this policy are not revisioned, do not require publishing, and take effect immediately. \\", + "id": "GoogleAppsDriveLabelsV2betaUpdateLabelCopyModeRequest", + "properties": { + "copyMode": { + "description": "Required. Indicates how the applied Label, and Field values should be copied when a Drive item is copied.", + "enum": [ + "COPY_MODE_UNSPECIFIED", + "DO_NOT_COPY", + "ALWAYS_COPY", + "COPY_APPLIABLE" + ], + "enumDescriptions": [ + "Copy mode unspecified.", + "The applied Label and Field values will not be copied by default when the Drive item it is applied to is copied.", + "The applied Label and Field values will always be copied when the Drive item it is applied to is copied. Only admins may use this mode.", + "The applied Label and Field values will be copied if and only if the label is appliable by the user making the copy." + ], + "type": "string" + }, + "languageCode": { + "description": "The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language will be used.", + "type": "string" + }, + "useAdminAccess": { + "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + "type": "boolean" + }, + "view": { + "description": "When specified, only certain fields belonging to the indicated view will be returned.", + "enum": [ + "LABEL_VIEW_BASIC", + "LABEL_VIEW_FULL" + ], + "enumDescriptions": [ + "Implies the field mask: `name,id,revision_id,label_type,properties.*`", + "All possible fields." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaUpdateLabelPermissionRequest": { + "description": "Updates a Label Permission. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + "id": "GoogleAppsDriveLabelsV2betaUpdateLabelPermissionRequest", + "properties": { + "labelPermission": { + "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission", + "description": "Required. The permission to create or update on the Label." + }, + "parent": { + "description": "Required. The parent Label resource name.", + "type": "string" + }, + "useAdminAccess": { + "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaUserCapabilities": { + "description": "The capabilities of a user.", + "id": "GoogleAppsDriveLabelsV2betaUserCapabilities", + "properties": { + "canAccessLabelManager": { + "description": "Output only. Whether the user is allowed access to the label manager.", + "readOnly": true, + "type": "boolean" + }, + "canAdministrateLabels": { + "description": "Output only. Whether the user is an administrator for the shared labels feature.", + "readOnly": true, + "type": "boolean" + }, + "canCreateAdminLabels": { + "description": "Output only. Whether the user is allowed to create new admin labels.", + "readOnly": true, + "type": "boolean" + }, + "canCreateSharedLabels": { + "description": "Output only. Whether the user is allowed to create new shared labels.", + "readOnly": true, + "type": "boolean" + }, + "name": { + "description": "Output only. Resource name for the user capabilities.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaUserInfo": { + "description": "Information about a user.", + "id": "GoogleAppsDriveLabelsV2betaUserInfo", + "properties": { + "person": { + "description": "The identifier for this user who can be used with the People API to get more information. e.g. people/12345678", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaUserLimits": { + "description": "Limits for Field.Type.USER.", + "id": "GoogleAppsDriveLabelsV2betaUserLimits", + "properties": { + "listLimits": { + "$ref": "GoogleAppsDriveLabelsV2betaListLimits", + "description": "Limits for list-variant of a Field type." + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2betaWriteControl": { + "description": "Provides control over how write requests are executed. When not specified, the last write wins.", + "id": "GoogleAppsDriveLabelsV2betaWriteControl", + "properties": { + "requiredRevisionId": { + "description": "The revision_id of the label that the write request will be applied to. If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleProtobufEmpty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "GoogleProtobufEmpty", + "properties": {}, + "type": "object" + }, + "GoogleTypeColor": { + "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:\u0026red green:\u0026green blue:\u0026blue alpha:\u0026alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha \u003c= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red \u003c\u003c 16) | (green \u003c\u003c 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i \u003c missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", + "id": "GoogleTypeColor", + "properties": { + "alpha": { + "description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).", + "format": "float", + "type": "number" + }, + "blue": { + "description": "The amount of blue in the color as a value in the interval [0, 1].", + "format": "float", + "type": "number" + }, + "green": { + "description": "The amount of green in the color as a value in the interval [0, 1].", + "format": "float", + "type": "number" + }, + "red": { + "description": "The amount of red in the color as a value in the interval [0, 1].", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleTypeDate": { + "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", + "id": "GoogleTypeDate", + "properties": { + "day": { + "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", + "format": "int32", + "type": "integer" + }, + "month": { + "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", + "format": "int32", + "type": "integer" + }, + "year": { + "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Drive Labels API", + "version": "v2beta", + "version_module": true +} \ No newline at end of file diff --git a/drivelabels/v2beta/drivelabels-gen.go b/drivelabels/v2beta/drivelabels-gen.go new file mode 100644 index 00000000000..2e314863d38 --- /dev/null +++ b/drivelabels/v2beta/drivelabels-gen.go @@ -0,0 +1,7680 @@ +// Copyright 2022 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package drivelabels provides access to the Drive Labels API. +// +// For product documentation, see: https://developers.google.com/drive/labels +// +// Creating a client +// +// Usage example: +// +// import "google.golang.org/api/drivelabels/v2beta" +// ... +// ctx := context.Background() +// drivelabelsService, err := drivelabels.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// drivelabelsService, err := drivelabels.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// drivelabelsService, err := drivelabels.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. +package drivelabels // import "google.golang.org/api/drivelabels/v2beta" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint + +const apiId = "drivelabels:v2beta" +const apiName = "drivelabels" +const apiVersion = "v2beta" +const basePath = "https://drivelabels.googleapis.com/" +const mtlsBasePath = "https://drivelabels.mtls.googleapis.com/" + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Labels = NewLabelsService(s) + s.Limits = NewLimitsService(s) + s.Users = NewUsersService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Labels *LabelsService + + Limits *LimitsService + + Users *UsersService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewLabelsService(s *Service) *LabelsService { + rs := &LabelsService{s: s} + rs.Locks = NewLabelsLocksService(s) + rs.Permissions = NewLabelsPermissionsService(s) + rs.Revisions = NewLabelsRevisionsService(s) + return rs +} + +type LabelsService struct { + s *Service + + Locks *LabelsLocksService + + Permissions *LabelsPermissionsService + + Revisions *LabelsRevisionsService +} + +func NewLabelsLocksService(s *Service) *LabelsLocksService { + rs := &LabelsLocksService{s: s} + return rs +} + +type LabelsLocksService struct { + s *Service +} + +func NewLabelsPermissionsService(s *Service) *LabelsPermissionsService { + rs := &LabelsPermissionsService{s: s} + return rs +} + +type LabelsPermissionsService struct { + s *Service +} + +func NewLabelsRevisionsService(s *Service) *LabelsRevisionsService { + rs := &LabelsRevisionsService{s: s} + rs.Locks = NewLabelsRevisionsLocksService(s) + rs.Permissions = NewLabelsRevisionsPermissionsService(s) + return rs +} + +type LabelsRevisionsService struct { + s *Service + + Locks *LabelsRevisionsLocksService + + Permissions *LabelsRevisionsPermissionsService +} + +func NewLabelsRevisionsLocksService(s *Service) *LabelsRevisionsLocksService { + rs := &LabelsRevisionsLocksService{s: s} + return rs +} + +type LabelsRevisionsLocksService struct { + s *Service +} + +func NewLabelsRevisionsPermissionsService(s *Service) *LabelsRevisionsPermissionsService { + rs := &LabelsRevisionsPermissionsService{s: s} + return rs +} + +type LabelsRevisionsPermissionsService struct { + s *Service +} + +func NewLimitsService(s *Service) *LimitsService { + rs := &LimitsService{s: s} + return rs +} + +type LimitsService struct { + s *Service +} + +func NewUsersService(s *Service) *UsersService { + rs := &UsersService{s: s} + return rs +} + +type UsersService struct { + s *Service +} + +// GoogleAppsDriveLabelsV2betaBadgeColors: The color derived from +// BadgeConfig and coerced to the nearest supported color. +type GoogleAppsDriveLabelsV2betaBadgeColors struct { + // BackgroundColor: Output only. Badge background which pairs with the + // foreground + BackgroundColor *GoogleTypeColor `json:"backgroundColor,omitempty"` + + // ForegroundColor: Output only. Badge foreground which pairs with the + // background + ForegroundColor *GoogleTypeColor `json:"foregroundColor,omitempty"` + + // SoloColor: Output only. Color that can be used for text without a + // background + SoloColor *GoogleTypeColor `json:"soloColor,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackgroundColor") 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. "BackgroundColor") 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 *GoogleAppsDriveLabelsV2betaBadgeColors) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaBadgeColors + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaBadgeConfig: Badge status of the label. +type GoogleAppsDriveLabelsV2betaBadgeConfig struct { + // Color: The color of the badge. When not specified, no badge will be + // rendered. This color will be coerced into the closest recommended + // supported color. + Color *GoogleTypeColor `json:"color,omitempty"` + + // PriorityOverride: Override the default global priority of this badge. + // When set to 0, the default priority heuristic will be used. + PriorityOverride int64 `json:"priorityOverride,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "Color") 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. "Color") 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 *GoogleAppsDriveLabelsV2betaBadgeConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaBadgeConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest: +// Deletes one of more Label Permissions. +type GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest struct { + // Requests: Required. The request message specifying the resources to + // update. + Requests []*GoogleAppsDriveLabelsV2betaDeleteLabelPermissionRequest `json:"requests,omitempty"` + + // UseAdminAccess: Set to `true` in order to use the user's admin + // credentials. The server will verify the user is an admin for the + // Label before allowing access. If this is set, the use_admin_access + // field in the DeleteLabelPermissionRequest messages must either be + // empty or match this field. + UseAdminAccess bool `json:"useAdminAccess,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Requests") 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. "Requests") 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 *GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest: +// Updates one or more Label Permissions. +type GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest struct { + // Requests: Required. The request message specifying the resources to + // update. + Requests []*GoogleAppsDriveLabelsV2betaUpdateLabelPermissionRequest `json:"requests,omitempty"` + + // UseAdminAccess: Set to `true` in order to use the user's admin + // credentials. The server will verify the user is an admin for the + // Label before allowing access. If this is set, the use_admin_access + // field in the UpdateLabelPermissionRequest messages must either be + // empty or match this field. + UseAdminAccess bool `json:"useAdminAccess,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Requests") 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. "Requests") 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 *GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse: +// Response for updating one or more Label Permissions. +type GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse struct { + // Permissions: Required. Permissions updated. + Permissions []*GoogleAppsDriveLabelsV2betaLabelPermission `json:"permissions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Permissions") 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. "Permissions") 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 *GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaDateLimits: Limits for date Field type. +type GoogleAppsDriveLabelsV2betaDateLimits struct { + // MaxValue: Maximum value for the date Field type. + MaxValue *GoogleTypeDate `json:"maxValue,omitempty"` + + // MinValue: Minimum value for the date Field type. + MinValue *GoogleTypeDate `json:"minValue,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MaxValue") 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. "MaxValue") 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 *GoogleAppsDriveLabelsV2betaDateLimits) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaDateLimits + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaDeleteLabelPermissionRequest: Deletes a +// Label Permission. Permissions affect the Label resource as a whole, +// are not revisioned, and do not require publishing. +type GoogleAppsDriveLabelsV2betaDeleteLabelPermissionRequest struct { + // Name: Required. Label Permission resource name. + Name string `json:"name,omitempty"` + + // UseAdminAccess: Set to `true` in order to use the user's admin + // credentials. The server will verify the user is an admin for the + // Label before allowing access. + UseAdminAccess bool `json:"useAdminAccess,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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 *GoogleAppsDriveLabelsV2betaDeleteLabelPermissionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaDeleteLabelPermissionRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequest: The set of +// requests for updating aspects of a Label. If any request is not +// valid, no requests will be applied. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequest struct { + // LanguageCode: The BCP-47 language code to use for evaluating + // localized Field labels when `include_label_in_response` is `true`. + LanguageCode string `json:"languageCode,omitempty"` + + // Requests: A list of updates to apply to the Label. Requests will be + // applied in the order they are specified. + Requests []*GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestRequest `json:"requests,omitempty"` + + // UseAdminAccess: Set to `true` in order to use the user's admin + // credentials. The server will verify the user is an admin for the + // Label before allowing access. + UseAdminAccess bool `json:"useAdminAccess,omitempty"` + + // View: When specified, only certain fields belonging to the indicated + // view will be returned. + // + // Possible values: + // "LABEL_VIEW_BASIC" - Implies the field mask: + // `name,id,revision_id,label_type,properties.*` + // "LABEL_VIEW_FULL" - All possible fields. + View string `json:"view,omitempty"` + + // WriteControl: Provides control over how write requests are executed. + WriteControl *GoogleAppsDriveLabelsV2betaWriteControl `json:"writeControl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LanguageCode") 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. "LanguageCode") 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 *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateFieldRequest: +// Request to create a Field within a Label. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateFieldRequest struct { + // Field: Required. Field to create. + Field *GoogleAppsDriveLabelsV2betaField `json:"field,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Field") 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. "Field") 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 *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateFieldRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateFieldRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateSelectionChoic +// eRequest: Request to create a Selection Choice. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateSelectionChoiceRequest struct { + // Choice: Required. The Choice to create. + Choice *GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoice `json:"choice,omitempty"` + + // FieldId: Required. The Selection Field in which a Choice will be + // created. + FieldId string `json:"fieldId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Choice") 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. "Choice") 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 *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateSelectionChoiceRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateSelectionChoiceRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteFieldRequest: +// Request to delete the Field. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteFieldRequest struct { + // Id: Required. ID of the Field to delete. + Id string `json:"id,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteFieldRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteFieldRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteSelectionChoic +// eRequest: Request to delete a Choice. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteSelectionChoiceRequest struct { + // FieldId: Required. The Selection Field from which a Choice will be + // deleted. + FieldId string `json:"fieldId,omitempty"` + + // Id: Required. Choice to delete. + Id string `json:"id,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FieldId") 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. "FieldId") 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 *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteSelectionChoiceRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteSelectionChoiceRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableFieldRequest: +// Request to disable the Field. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableFieldRequest struct { + // DisabledPolicy: Required. Field Disabled Policy. + DisabledPolicy *GoogleAppsDriveLabelsV2betaLifecycleDisabledPolicy `json:"disabledPolicy,omitempty"` + + // Id: Required. Key of the Field to disable. + Id string `json:"id,omitempty"` + + // UpdateMask: The fields that should be updated. At least one field + // must be specified. The root `disabled_policy` is implied and should + // not be specified. A single `*` can be used as short-hand for updating + // every field. + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisabledPolicy") 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. "DisabledPolicy") 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 *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableFieldRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableFieldRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableSelectionChoi +// ceRequest: Request to disable a Choice. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableSelectionChoiceRequest struct { + // DisabledPolicy: Required. The disabled policy to update. + DisabledPolicy *GoogleAppsDriveLabelsV2betaLifecycleDisabledPolicy `json:"disabledPolicy,omitempty"` + + // FieldId: Required. The Selection Field in which a Choice will be + // disabled. + FieldId string `json:"fieldId,omitempty"` + + // Id: Required. Choice to disable. + Id string `json:"id,omitempty"` + + // UpdateMask: The fields that should be updated. At least one field + // must be specified. The root `disabled_policy` is implied and should + // not be specified. A single `*` can be used as short-hand for updating + // every field. + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisabledPolicy") 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. "DisabledPolicy") 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 *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableSelectionChoiceRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableSelectionChoiceRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableFieldRequest: +// Request to enable the Field. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableFieldRequest struct { + // Id: Required. ID of the Field to enable. + Id string `json:"id,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableFieldRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableFieldRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableSelectionChoic +// eRequest: Request to enable a Choice. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableSelectionChoiceRequest struct { + // FieldId: Required. The Selection Field in which a Choice will be + // enabled. + FieldId string `json:"fieldId,omitempty"` + + // Id: Required. Choice to enable. + Id string `json:"id,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FieldId") 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. "FieldId") 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 *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableSelectionChoiceRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableSelectionChoiceRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestRequest: A single +// kind of update to apply to a Label. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestRequest struct { + // CreateField: Creates a new Field. + CreateField *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateFieldRequest `json:"createField,omitempty"` + + // CreateSelectionChoice: Creates Choice within a Selection field. + CreateSelectionChoice *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateSelectionChoiceRequest `json:"createSelectionChoice,omitempty"` + + // DeleteField: Deletes a Field from the label. + DeleteField *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteFieldRequest `json:"deleteField,omitempty"` + + // DeleteSelectionChoice: Delete a Choice within a Selection Field. + DeleteSelectionChoice *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteSelectionChoiceRequest `json:"deleteSelectionChoice,omitempty"` + + // DisableField: Disables the Field. + DisableField *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableFieldRequest `json:"disableField,omitempty"` + + // DisableSelectionChoice: Disable a Choice within a Selection Field. + DisableSelectionChoice *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableSelectionChoiceRequest `json:"disableSelectionChoice,omitempty"` + + // EnableField: Enables the Field. + EnableField *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableFieldRequest `json:"enableField,omitempty"` + + // EnableSelectionChoice: Enable a Choice within a Selection Field. + EnableSelectionChoice *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableSelectionChoiceRequest `json:"enableSelectionChoice,omitempty"` + + // UpdateField: Updates basic properties of a Field. + UpdateField *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldPropertiesRequest `json:"updateField,omitempty"` + + // UpdateFieldType: Update Field type and/or type options. + UpdateFieldType *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldTypeRequest `json:"updateFieldType,omitempty"` + + // UpdateLabel: Updates the Label properties. + UpdateLabel *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateLabelPropertiesRequest `json:"updateLabel,omitempty"` + + // UpdateSelectionChoiceProperties: Update a Choice properties within a + // Selection Field. + UpdateSelectionChoiceProperties *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateSelectionChoicePropertiesRequest `json:"updateSelectionChoiceProperties,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateField") 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. "CreateField") 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 *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldPropertie +// sRequest: Request to update Field properties. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldPropertiesRequest struct { + // Id: Required. The Field to update. + Id string `json:"id,omitempty"` + + // Properties: Required. Basic Field properties. + Properties *GoogleAppsDriveLabelsV2betaFieldProperties `json:"properties,omitempty"` + + // UpdateMask: The fields that should be updated. At least one field + // must be specified. The root `properties` is implied and should not be + // specified. A single `*` can be used as short-hand for updating every + // field. + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldPropertiesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldPropertiesRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldTypeReque +// st: Request to change the type of a Field. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldTypeRequest struct { + // DateOptions: Update field to Date. + DateOptions *GoogleAppsDriveLabelsV2betaFieldDateOptions `json:"dateOptions,omitempty"` + + // Id: Required. The Field to update. + Id string `json:"id,omitempty"` + + // IntegerOptions: Update field to Integer. + IntegerOptions *GoogleAppsDriveLabelsV2betaFieldIntegerOptions `json:"integerOptions,omitempty"` + + // LongTextOptions: Update field to Long Text. + LongTextOptions *GoogleAppsDriveLabelsV2betaFieldLongTextOptions `json:"longTextOptions,omitempty"` + + // SelectionOptions: Update field to Selection. + SelectionOptions *GoogleAppsDriveLabelsV2betaFieldSelectionOptions `json:"selectionOptions,omitempty"` + + // TextOptions: Update field to Text. + TextOptions *GoogleAppsDriveLabelsV2betaFieldTextOptions `json:"textOptions,omitempty"` + + // UpdateMask: The fields that should be updated. At least one field + // must be specified. The root of `type_options` is implied and should + // not be specified. A single `*` can be used as short-hand for updating + // every field. + UpdateMask string `json:"updateMask,omitempty"` + + // UserOptions: Update field to User. + UserOptions *GoogleAppsDriveLabelsV2betaFieldUserOptions `json:"userOptions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DateOptions") 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. "DateOptions") 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 *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldTypeRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldTypeRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateLabelPropertie +// sRequest: Updates basic properties of a Label. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateLabelPropertiesRequest struct { + // Properties: Required. Label properties to update. + Properties *GoogleAppsDriveLabelsV2betaLabelProperties `json:"properties,omitempty"` + + // UpdateMask: The fields that should be updated. At least one field + // must be specified. The root `label_properties` is implied and should + // not be specified. A single `*` can be used as short-hand for updating + // every field. + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Properties") 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. "Properties") 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 *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateLabelPropertiesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateLabelPropertiesRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateSelectionChoic +// ePropertiesRequest: Request to update a Choice properties. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateSelectionChoicePropertiesRequest struct { + // FieldId: Required. The Selection Field to update. + FieldId string `json:"fieldId,omitempty"` + + // Id: Required. The Choice to update. + Id string `json:"id,omitempty"` + + // Properties: Required. The Choice properties to update. + Properties *GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceProperties `json:"properties,omitempty"` + + // UpdateMask: The fields that should be updated. At least one field + // must be specified. The root `properties` is implied and should not be + // specified. A single `*` can be used as short-hand for updating every + // field. + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FieldId") 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. "FieldId") 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 *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateSelectionChoicePropertiesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateSelectionChoicePropertiesRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponse: Response for +// Label update. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponse struct { + // Responses: The reply of the updates. This maps 1:1 with the updates, + // although responses to some requests may be empty. + Responses []*GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseResponse `json:"responses,omitempty"` + + // UpdatedLabel: The label after updates were applied. This is only set + // if [BatchUpdateLabelResponse2.include_label_in_response] is `true` + // and there were no errors. + UpdatedLabel *GoogleAppsDriveLabelsV2betaLabel `json:"updatedLabel,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Responses") 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. "Responses") 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 *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateFieldResponse +// : Response following Field create. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateFieldResponse struct { + // Id: The field of the created field. When left blank in a create + // request, a key will be autogenerated and can be identified here. + Id string `json:"id,omitempty"` + + // Priority: The priority of the created field. The priority may change + // from what was specified to assure contiguous priorities between + // fields (1-n). + Priority int64 `json:"priority,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateFieldResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateFieldResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateSelectionChoi +// ceResponse: Response following Selection Choice create. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateSelectionChoiceResponse struct { + // FieldId: The server-generated id of the field. + FieldId string `json:"fieldId,omitempty"` + + // Id: The server-generated ID of the created choice within the Field + Id string `json:"id,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FieldId") 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. "FieldId") 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 *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateSelectionChoiceResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateSelectionChoiceResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDeleteFieldResponse +// : Response following Field delete. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDeleteFieldResponse struct { +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDeleteSelectionChoi +// ceResponse: Response following Choice delete. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDeleteSelectionChoiceResponse struct { +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDisableFieldRespons +// e: Response following Field disable. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDisableFieldResponse struct { +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDisableSelectionCho +// iceResponse: Response following Choice disable. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDisableSelectionChoiceResponse struct { +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseEnableFieldResponse +// : Response following Field enable. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseEnableFieldResponse struct { +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseEnableSelectionChoi +// ceResponse: Response following Choice enable. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseEnableSelectionChoiceResponse struct { +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseResponse: A single +// response from an update. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseResponse struct { + // CreateField: Creates a new Field. + CreateField *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateFieldResponse `json:"createField,omitempty"` + + // CreateSelectionChoice: Creates a new selection list option to add to + // a Selection Field. + CreateSelectionChoice *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateSelectionChoiceResponse `json:"createSelectionChoice,omitempty"` + + // DeleteField: Deletes a Field from the label. + DeleteField *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDeleteFieldResponse `json:"deleteField,omitempty"` + + // DeleteSelectionChoice: Deletes a Choice from a Selection Field. + DeleteSelectionChoice *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDeleteSelectionChoiceResponse `json:"deleteSelectionChoice,omitempty"` + + // DisableField: Disables Field. + DisableField *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDisableFieldResponse `json:"disableField,omitempty"` + + // DisableSelectionChoice: Disables a Choice within a Selection Field. + DisableSelectionChoice *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDisableSelectionChoiceResponse `json:"disableSelectionChoice,omitempty"` + + // EnableField: Enables Field. + EnableField *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseEnableFieldResponse `json:"enableField,omitempty"` + + // EnableSelectionChoice: Enables a Choice within a Selection Field. + EnableSelectionChoice *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseEnableSelectionChoiceResponse `json:"enableSelectionChoice,omitempty"` + + // UpdateField: Updates basic properties of a Field. + UpdateField *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateFieldPropertiesResponse `json:"updateField,omitempty"` + + // UpdateFieldType: Update Field type and/or type options. + UpdateFieldType *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateFieldTypeResponse `json:"updateFieldType,omitempty"` + + // UpdateLabel: Updated basic properties of a Label. + UpdateLabel *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateLabelPropertiesResponse `json:"updateLabel,omitempty"` + + // UpdateSelectionChoiceProperties: Updates a Choice within a Selection + // Field. + UpdateSelectionChoiceProperties *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateSelectionChoicePropertiesResponse `json:"updateSelectionChoiceProperties,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateField") 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. "CreateField") 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 *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateFieldProperti +// esResponse: Response following update to Field properties. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateFieldPropertiesResponse struct { + // Priority: The priority of the updated field. The priority may change + // from what was specified to assure contiguous priorities between + // fields (1-n). + Priority int64 `json:"priority,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Priority") 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. "Priority") 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 *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateFieldPropertiesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateFieldPropertiesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateFieldTypeResp +// onse: Response following update to Field type. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateFieldTypeResponse struct { +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateLabelProperti +// esResponse: Response following update to Label properties. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateLabelPropertiesResponse struct { +} + +// GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateSelectionChoi +// cePropertiesResponse: Response following update to Selection Choice +// properties. +type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateSelectionChoicePropertiesResponse struct { + // Priority: The priority of the updated choice. The priority may change + // from what was specified to assure contiguous priorities between + // choices (1-n). + Priority int64 `json:"priority,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Priority") 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. "Priority") 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 *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateSelectionChoicePropertiesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateSelectionChoicePropertiesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaDisableLabelRequest: Request to deprecate +// a published Label. +type GoogleAppsDriveLabelsV2betaDisableLabelRequest struct { + // DisabledPolicy: Disabled policy to use. + DisabledPolicy *GoogleAppsDriveLabelsV2betaLifecycleDisabledPolicy `json:"disabledPolicy,omitempty"` + + // LanguageCode: The BCP-47 language code to use for evaluating + // localized field labels. When not specified, values in the default + // configured language will be used. + LanguageCode string `json:"languageCode,omitempty"` + + // UpdateMask: The fields that should be updated. At least one field + // must be specified. The root `disabled_policy` is implied and should + // not be specified. A single `*` can be used as short-hand for updating + // every field. + UpdateMask string `json:"updateMask,omitempty"` + + // UseAdminAccess: Set to `true` in order to use the user's admin + // credentials. The server will verify the user is an admin for the + // Label before allowing access. + UseAdminAccess bool `json:"useAdminAccess,omitempty"` + + // WriteControl: Provides control over how write requests are executed. + // Defaults to unset, which means last write wins. + WriteControl *GoogleAppsDriveLabelsV2betaWriteControl `json:"writeControl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisabledPolicy") 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. "DisabledPolicy") 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 *GoogleAppsDriveLabelsV2betaDisableLabelRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaDisableLabelRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaEnableLabelRequest: Request to enable a +// label. +type GoogleAppsDriveLabelsV2betaEnableLabelRequest struct { + // LanguageCode: The BCP-47 language code to use for evaluating + // localized field labels. When not specified, values in the default + // configured language will be used. + LanguageCode string `json:"languageCode,omitempty"` + + // UseAdminAccess: Set to `true` in order to use the user's admin + // credentials. The server will verify the user is an admin for the + // Label before allowing access. + UseAdminAccess bool `json:"useAdminAccess,omitempty"` + + // WriteControl: Provides control over how write requests are executed. + // Defaults to unset, which means last write wins. + WriteControl *GoogleAppsDriveLabelsV2betaWriteControl `json:"writeControl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LanguageCode") 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. "LanguageCode") 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 *GoogleAppsDriveLabelsV2betaEnableLabelRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaEnableLabelRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaField: Defines a field which has a display +// name, data type, and other configuration options. This field defines +// the kind of metadata that may be set on a Drive item. +type GoogleAppsDriveLabelsV2betaField struct { + // AppliedCapabilities: Output only. The capabilities this user has on + // this Field and its value when the Label is applied on Drive items. + AppliedCapabilities *GoogleAppsDriveLabelsV2betaFieldAppliedCapabilities `json:"appliedCapabilities,omitempty"` + + // CreateTime: Output only. The time this field was created. + CreateTime string `json:"createTime,omitempty"` + + // Creator: Output only. The user who created this field. + Creator *GoogleAppsDriveLabelsV2betaUserInfo `json:"creator,omitempty"` + + // DateOptions: Date field options. + DateOptions *GoogleAppsDriveLabelsV2betaFieldDateOptions `json:"dateOptions,omitempty"` + + // DisableTime: Output only. The time this field was disabled. This + // value has no meaning when the field is not disabled. + DisableTime string `json:"disableTime,omitempty"` + + // Disabler: Output only. The user who disabled this field. This value + // has no meaning when the field is not disabled. + Disabler *GoogleAppsDriveLabelsV2betaUserInfo `json:"disabler,omitempty"` + + // DisplayHints: Output only. UI Display hints for rendering a Field. + DisplayHints *GoogleAppsDriveLabelsV2betaFieldDisplayHints `json:"displayHints,omitempty"` + + // Id: Output only. The key of a field, unique within a Label or + // Library. This value is autogenerated, and will match the form + // `([a-zA-Z0-9_])+ + Id string `json:"id,omitempty"` + + // IntegerOptions: Integer field options. + IntegerOptions *GoogleAppsDriveLabelsV2betaFieldIntegerOptions `json:"integerOptions,omitempty"` + + // Lifecycle: Output only. The lifecycle of this Field. + Lifecycle *GoogleAppsDriveLabelsV2betaLifecycle `json:"lifecycle,omitempty"` + + // LockStatus: Output only. The LockStatus of this field. + LockStatus *GoogleAppsDriveLabelsV2betaLockStatus `json:"lockStatus,omitempty"` + + // Properties: The basic properties of the field. + Properties *GoogleAppsDriveLabelsV2betaFieldProperties `json:"properties,omitempty"` + + // Publisher: Output only. The user who published this field. This value + // has no meaning when the field is not published. + Publisher *GoogleAppsDriveLabelsV2betaUserInfo `json:"publisher,omitempty"` + + // QueryKey: Output only. The key to use when constructing Drive search + // queries to find files based on values defined for this Field on + // files. For example: "{query_key}` > 2001-01-01" + QueryKey string `json:"queryKey,omitempty"` + + // SchemaCapabilities: Output only. The capabilities this user has when + // editing this Field + SchemaCapabilities *GoogleAppsDriveLabelsV2betaFieldSchemaCapabilities `json:"schemaCapabilities,omitempty"` + + // SelectionOptions: Selection field options. + SelectionOptions *GoogleAppsDriveLabelsV2betaFieldSelectionOptions `json:"selectionOptions,omitempty"` + + // TextOptions: Text field options. + TextOptions *GoogleAppsDriveLabelsV2betaFieldTextOptions `json:"textOptions,omitempty"` + + // UpdateTime: Output only. The time this field was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // Updater: Output only. The user who modified this field. + Updater *GoogleAppsDriveLabelsV2betaUserInfo `json:"updater,omitempty"` + + // UserOptions: User field options. + UserOptions *GoogleAppsDriveLabelsV2betaFieldUserOptions `json:"userOptions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AppliedCapabilities") + // 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. "AppliedCapabilities") 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 *GoogleAppsDriveLabelsV2betaField) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaField + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaFieldAppliedCapabilities: The capabilities +// related to this field on applied metadata. +type GoogleAppsDriveLabelsV2betaFieldAppliedCapabilities struct { + // CanRead: Whether the user can read related applied metadata on items. + CanRead bool `json:"canRead,omitempty"` + + // CanSearch: Whether the user can search for drive items referencing + // this field. + CanSearch bool `json:"canSearch,omitempty"` + + // CanWrite: Whether the user can set this field on drive items. + CanWrite bool `json:"canWrite,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CanRead") 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. "CanRead") 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 *GoogleAppsDriveLabelsV2betaFieldAppliedCapabilities) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaFieldAppliedCapabilities + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaFieldDateOptions: Options for the date +// field type. +type GoogleAppsDriveLabelsV2betaFieldDateOptions struct { + // DateFormat: Output only. ICU Date format. + DateFormat string `json:"dateFormat,omitempty"` + + // DateFormatType: Localized date formatting option. Field values will + // be rendered in this format according to their locale. + // + // Possible values: + // "DATE_FORMAT_UNSPECIFIED" - Date format unspecified. + // "LONG_DATE" - Includes full month name. e.g. January 12, 1999 MMMM + // d, y + // "SHORT_DATE" - Short, numeric, representation. e.g. 12/13/99 M/d/yy + DateFormatType string `json:"dateFormatType,omitempty"` + + // MaxValue: Output only. Maximum valid value (year, month, day). + MaxValue *GoogleTypeDate `json:"maxValue,omitempty"` + + // MinValue: Output only. Minimum valid value (year, month, day). + MinValue *GoogleTypeDate `json:"minValue,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DateFormat") 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. "DateFormat") 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 *GoogleAppsDriveLabelsV2betaFieldDateOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaFieldDateOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaFieldDisplayHints: UI Display hints for +// rendering a Field. +type GoogleAppsDriveLabelsV2betaFieldDisplayHints struct { + // Disabled: Whether the field should be shown in the UI as disabled. + Disabled bool `json:"disabled,omitempty"` + + // HiddenInSearch: This Field should be hidden in the search menu. + HiddenInSearch bool `json:"hiddenInSearch,omitempty"` + + // Required: Whether the Field should be shown as required in the UI. + Required bool `json:"required,omitempty"` + + // ShownInApply: This Field should be shown when applying values to a + // Drive item. + ShownInApply bool `json:"shownInApply,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Disabled") 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. "Disabled") 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 *GoogleAppsDriveLabelsV2betaFieldDisplayHints) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaFieldDisplayHints + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaFieldIntegerOptions: Options for the +// Integer field type. +type GoogleAppsDriveLabelsV2betaFieldIntegerOptions struct { + // MaxValue: Output only. The maximum valid value for the integer field. + MaxValue int64 `json:"maxValue,omitempty,string"` + + // MinValue: Output only. The minimum valid value for the integer field. + MinValue int64 `json:"minValue,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "MaxValue") 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. "MaxValue") 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 *GoogleAppsDriveLabelsV2betaFieldIntegerOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaFieldIntegerOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaFieldLimits: Field constants governing the +// structure of a Field; such as, the maximum title length, minimum and +// maximum field values or length, etc. +type GoogleAppsDriveLabelsV2betaFieldLimits struct { + // DateLimits: Date Field limits. + DateLimits *GoogleAppsDriveLabelsV2betaDateLimits `json:"dateLimits,omitempty"` + + // IntegerLimits: Integer Field limits. + IntegerLimits *GoogleAppsDriveLabelsV2betaIntegerLimits `json:"integerLimits,omitempty"` + + // LongTextLimits: Long text Field limits. + LongTextLimits *GoogleAppsDriveLabelsV2betaLongTextLimits `json:"longTextLimits,omitempty"` + + // MaxDescriptionLength: Limits for Field description, also called help + // text. + MaxDescriptionLength int64 `json:"maxDescriptionLength,omitempty"` + + // MaxDisplayNameLength: Limits for Field title. + MaxDisplayNameLength int64 `json:"maxDisplayNameLength,omitempty"` + + // MaxIdLength: Max length for the id. + MaxIdLength int64 `json:"maxIdLength,omitempty"` + + // SelectionLimits: Selection Field limits. + SelectionLimits *GoogleAppsDriveLabelsV2betaSelectionLimits `json:"selectionLimits,omitempty"` + + // TextLimits: The relevant limits for the specified Field.Type. Text + // Field limits. + TextLimits *GoogleAppsDriveLabelsV2betaTextLimits `json:"textLimits,omitempty"` + + // UserLimits: User Field limits. + UserLimits *GoogleAppsDriveLabelsV2betaUserLimits `json:"userLimits,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DateLimits") 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. "DateLimits") 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 *GoogleAppsDriveLabelsV2betaFieldLimits) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaFieldLimits + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaFieldListOptions: Options for a +// multi-valued variant of an associated field type. +type GoogleAppsDriveLabelsV2betaFieldListOptions struct { + // MaxEntries: Maximum number of entries permitted. + MaxEntries int64 `json:"maxEntries,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MaxEntries") 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. "MaxEntries") 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 *GoogleAppsDriveLabelsV2betaFieldListOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaFieldListOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaFieldLongTextOptions: Options the Long +// Text field type. +type GoogleAppsDriveLabelsV2betaFieldLongTextOptions struct { + // MaxLength: Output only. The maximum valid length of values for the + // text field. + MaxLength int64 `json:"maxLength,omitempty"` + + // MinLength: Output only. The minimum valid length of values for the + // text field. + MinLength int64 `json:"minLength,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MaxLength") 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. "MaxLength") 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 *GoogleAppsDriveLabelsV2betaFieldLongTextOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaFieldLongTextOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaFieldProperties: The basic properties of +// the field. +type GoogleAppsDriveLabelsV2betaFieldProperties struct { + // DisplayName: Required. The display text to show in the UI identifying + // this field. + DisplayName string `json:"displayName,omitempty"` + + // InsertBeforeField: Input only. Insert or move this Field to be + // ordered before the indicated Field. If empty, the Field will be + // placed at the end of the list. + InsertBeforeField string `json:"insertBeforeField,omitempty"` + + // Required: Whether the field should be marked as required. + Required bool `json:"required,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") 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. "DisplayName") 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 *GoogleAppsDriveLabelsV2betaFieldProperties) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaFieldProperties + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaFieldSchemaCapabilities: The capabilities +// related to this Field when editing the Field. +type GoogleAppsDriveLabelsV2betaFieldSchemaCapabilities struct { + // CanDelete: Whether the user can delete this Field. The user must have + // permissions and the Field must be deprecated. + CanDelete bool `json:"canDelete,omitempty"` + + // CanDisable: Whether the user can disable this Field. The user must + // have permissions and this Field must not already be disabled. + CanDisable bool `json:"canDisable,omitempty"` + + // CanEnable: Whether the user can enable this Field. The user must have + // permissions and this Field must be disabled. + CanEnable bool `json:"canEnable,omitempty"` + + // CanUpdate: Whether the user can change this field. + CanUpdate bool `json:"canUpdate,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CanDelete") 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. "CanDelete") 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 *GoogleAppsDriveLabelsV2betaFieldSchemaCapabilities) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaFieldSchemaCapabilities + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaFieldSelectionOptions: Options for the +// selection field type. +type GoogleAppsDriveLabelsV2betaFieldSelectionOptions struct { + // Choices: The options available for this selection field. The list + // order is consistent, and modified with `insert_before_choice`. + Choices []*GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoice `json:"choices,omitempty"` + + // ListOptions: When specified, indicates that this field support a list + // of values. Once the field is published, this cannot be changed. + ListOptions *GoogleAppsDriveLabelsV2betaFieldListOptions `json:"listOptions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Choices") 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. "Choices") 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 *GoogleAppsDriveLabelsV2betaFieldSelectionOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaFieldSelectionOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoice: Selection +// field Choice. +type GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoice struct { + // AppliedCapabilities: Output only. The capabilities related to this + // Choice on applied metadata. + AppliedCapabilities *GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceAppliedCapabilities `json:"appliedCapabilities,omitempty"` + + // CreateTime: Output only. The time this Choice was created. + CreateTime string `json:"createTime,omitempty"` + + // Creator: Output only. The user who created this Choice. + Creator *GoogleAppsDriveLabelsV2betaUserInfo `json:"creator,omitempty"` + + // DisableTime: Output only. The time this Choice was disabled. This + // value has no meaning when the Choice is not disabled. + DisableTime string `json:"disableTime,omitempty"` + + // Disabler: Output only. The user who disabled this Choice. This value + // has no meaning when the option is not disabled. + Disabler *GoogleAppsDriveLabelsV2betaUserInfo `json:"disabler,omitempty"` + + // DisplayHints: Output only. UI Display hints for rendering a Choice. + DisplayHints *GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceDisplayHints `json:"displayHints,omitempty"` + + // Id: The unique value of the Choice. This ID will be autogenerated, + // and will match the form `([a-zA-Z0-9_])+`. + Id string `json:"id,omitempty"` + + // Lifecycle: Output only. Lifecycle of the Choice. + Lifecycle *GoogleAppsDriveLabelsV2betaLifecycle `json:"lifecycle,omitempty"` + + // LockStatus: Output only. The LockStatus of this Choice. + LockStatus *GoogleAppsDriveLabelsV2betaLockStatus `json:"lockStatus,omitempty"` + + // Properties: Basic properties of the Choice. + Properties *GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceProperties `json:"properties,omitempty"` + + // PublishTime: Output only. The time this Choice was published. This + // value has no meaning when the Choice is not published. + PublishTime string `json:"publishTime,omitempty"` + + // Publisher: Output only. The user who published this Choice. This + // value has no meaning when the Choice is not published. + Publisher *GoogleAppsDriveLabelsV2betaUserInfo `json:"publisher,omitempty"` + + // SchemaCapabilities: Output only. The capabilities related to this + // option when editing the option. + SchemaCapabilities *GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceSchemaCapabilities `json:"schemaCapabilities,omitempty"` + + // UpdateTime: Output only. The time this Choice was updated last. + UpdateTime string `json:"updateTime,omitempty"` + + // Updater: Output only. The user who updated this Choice last. + Updater *GoogleAppsDriveLabelsV2betaUserInfo `json:"updater,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AppliedCapabilities") + // 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. "AppliedCapabilities") 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 *GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoice) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoice + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceAppliedCapabilit +// ies: The capabilities related to this Choice on applied metadata. +type GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceAppliedCapabilities struct { + // CanRead: Whether the user can read related applied metadata on items. + CanRead bool `json:"canRead,omitempty"` + + // CanSearch: Whether the user can use this Choice in search queries. + CanSearch bool `json:"canSearch,omitempty"` + + // CanSelect: Whether the user can select this Choice on an item. + CanSelect bool `json:"canSelect,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CanRead") 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. "CanRead") 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 *GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceAppliedCapabilities) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceAppliedCapabilities + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceDisplayHints: +// UI Display hints for rendering a Option. +type GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceDisplayHints struct { + // BadgeColors: The colors to use for the badge. Coerced to Google + // Material colors based on the chosen `properties.badge_config.color`. + BadgeColors *GoogleAppsDriveLabelsV2betaBadgeColors `json:"badgeColors,omitempty"` + + // BadgePriority: The priority of this badge, used to compare and sort + // between multiple badges. A lower number means that the badge should + // be shown first. When a badging configuration is not present, this + // will be 0. Otherwise, this will be set to + // `BadgeConfig.priority_override` or the default heuristic which + // prefers creation date of the Label, and field and option priority. + BadgePriority int64 `json:"badgePriority,omitempty,string"` + + // DarkBadgeColors: The dark-mode color to use for the badge. Coerced to + // Google Material colors based on the chosen + // `properties.badge_config.color`. + DarkBadgeColors *GoogleAppsDriveLabelsV2betaBadgeColors `json:"darkBadgeColors,omitempty"` + + // Disabled: Whether the option should be shown in the UI as disabled. + Disabled bool `json:"disabled,omitempty"` + + // HiddenInSearch: This option should be hidden in the search menu. + HiddenInSearch bool `json:"hiddenInSearch,omitempty"` + + // ShownInApply: This option should be shown in the menu when applying + // values to a Drive item. + ShownInApply bool `json:"shownInApply,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BadgeColors") 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. "BadgeColors") 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 *GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceDisplayHints) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceDisplayHints + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceProperties: +// Basic properties of the Choice. +type GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceProperties struct { + // BadgeConfig: The badge configuration for this Choice. When set, the + // Label that owns this Choice will be considered a "badged label". + BadgeConfig *GoogleAppsDriveLabelsV2betaBadgeConfig `json:"badgeConfig,omitempty"` + + // Description: The description of this Label. + Description string `json:"description,omitempty"` + + // DisplayName: Required. The display text to show in the UI identifying + // this field. + DisplayName string `json:"displayName,omitempty"` + + // InsertBeforeChoice: Input only. Insert or move this Choice to be + // ordered before the indicated Choice. If empty, the Choice will be + // placed at the end of the list. + InsertBeforeChoice string `json:"insertBeforeChoice,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BadgeConfig") 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. "BadgeConfig") 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 *GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceProperties) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceProperties + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceSchemaCapabiliti +// es: The capabilities related to this Choice when editing the Choice. +type GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceSchemaCapabilities struct { + // CanDelete: Whether the user can delete this Choice. + CanDelete bool `json:"canDelete,omitempty"` + + // CanDisable: Whether the user can disable this Chioce. + CanDisable bool `json:"canDisable,omitempty"` + + // CanEnable: Whether the user can enable this Choice. + CanEnable bool `json:"canEnable,omitempty"` + + // CanUpdate: Whether the user can update this Choice. + CanUpdate bool `json:"canUpdate,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CanDelete") 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. "CanDelete") 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 *GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceSchemaCapabilities) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceSchemaCapabilities + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaFieldTextOptions: Options for the Text +// field type. +type GoogleAppsDriveLabelsV2betaFieldTextOptions struct { + // MaxLength: Output only. The maximum valid length of values for the + // text field. + MaxLength int64 `json:"maxLength,omitempty"` + + // MinLength: Output only. The minimum valid length of values for the + // text field. + MinLength int64 `json:"minLength,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MaxLength") 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. "MaxLength") 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 *GoogleAppsDriveLabelsV2betaFieldTextOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaFieldTextOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaFieldUserOptions: Options for the user +// field type. +type GoogleAppsDriveLabelsV2betaFieldUserOptions struct { + // ListOptions: When specified, indicates that this field support a list + // of values. Once the field is published, this cannot be changed. + ListOptions *GoogleAppsDriveLabelsV2betaFieldListOptions `json:"listOptions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ListOptions") 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. "ListOptions") 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 *GoogleAppsDriveLabelsV2betaFieldUserOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaFieldUserOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaIntegerLimits: Limits for integer Field +// type. +type GoogleAppsDriveLabelsV2betaIntegerLimits struct { + // MaxValue: Maximum value for an integer Field type. + MaxValue int64 `json:"maxValue,omitempty,string"` + + // MinValue: Minimum value for an integer Field type. + MinValue int64 `json:"minValue,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "MaxValue") 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. "MaxValue") 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 *GoogleAppsDriveLabelsV2betaIntegerLimits) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaIntegerLimits + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaLabel: A Label defines a taxonomy which +// may be applied to a Drive items in order to organize and search +// across Items. Labels may be simple strings, or may contain Fields +// that describe additional metadata which can be further used to +// organize and search Drive items. +type GoogleAppsDriveLabelsV2betaLabel struct { + // AppliedCapabilities: Output only. The capabilities related to this + // label on applied metadata. + AppliedCapabilities *GoogleAppsDriveLabelsV2betaLabelAppliedCapabilities `json:"appliedCapabilities,omitempty"` + + // AppliedLabelPolicy: Output only. Behavior of this Label when its + // applied to Drive items. + AppliedLabelPolicy *GoogleAppsDriveLabelsV2betaLabelAppliedLabelPolicy `json:"appliedLabelPolicy,omitempty"` + + // CreateTime: Output only. The time this label was created. + CreateTime string `json:"createTime,omitempty"` + + // Creator: Output only. The user who created this label. + Creator *GoogleAppsDriveLabelsV2betaUserInfo `json:"creator,omitempty"` + + // DisableTime: Output only. The time this label was disabled. This + // value has no meaning when the label is not disabled. + DisableTime string `json:"disableTime,omitempty"` + + // Disabler: Output only. The user who disabled this label. This value + // has no meaning when the label is not disabled. + Disabler *GoogleAppsDriveLabelsV2betaUserInfo `json:"disabler,omitempty"` + + // DisplayHints: Output only. UI Display hints for rendering the Label. + DisplayHints *GoogleAppsDriveLabelsV2betaLabelDisplayHints `json:"displayHints,omitempty"` + + // Fields: List of Fields in descending priority order. + Fields []*GoogleAppsDriveLabelsV2betaField `json:"fields,omitempty"` + + // Id: Output only. Globally unique identifier of this Label. ID makes + // up part of the Label `name`, but unlike `name`, ID is consistent + // between revisions. Matches the regex: `([a-zA-Z0-9])+` + Id string `json:"id,omitempty"` + + // LabelType: Required. The type of this label. + // + // Possible values: + // "LABEL_TYPE_UNSPECIFIED" - Unknown label type. + // "SHARED" - Shared labels may be shared with users to apply to Drive + // items. + // "ADMIN" - Admin owned label. Only creatable and editable by admins, + // supports some additional admin-only features. + LabelType string `json:"labelType,omitempty"` + + // LearnMoreUri: Custom URL to present to users to allow them to learn + // more about this label and how it should be used. + LearnMoreUri string `json:"learnMoreUri,omitempty"` + + // Lifecycle: Output only. The lifecycle state of the label including + // whether it's published, deprecated, and has draft changes. + Lifecycle *GoogleAppsDriveLabelsV2betaLifecycle `json:"lifecycle,omitempty"` + + // LockStatus: Output only. The LockStatus of this label. + LockStatus *GoogleAppsDriveLabelsV2betaLockStatus `json:"lockStatus,omitempty"` + + // Name: Output only. Resource name of the Label. Will be in the form of + // either: `labels/{id}` or `labels/{id}@{revision_id}` depending on the + // request. See `id` and `revision_id` below. + Name string `json:"name,omitempty"` + + // Properties: Required. The basic properties of the Label. + Properties *GoogleAppsDriveLabelsV2betaLabelProperties `json:"properties,omitempty"` + + // PublishTime: Output only. The time this label was published. This + // value has no meaning when the label is not published. + PublishTime string `json:"publishTime,omitempty"` + + // Publisher: Output only. The user who published this label. This value + // has no meaning when the label is not published. + Publisher *GoogleAppsDriveLabelsV2betaUserInfo `json:"publisher,omitempty"` + + // RevisionCreateTime: Output only. The time this label revision was + // created. + RevisionCreateTime string `json:"revisionCreateTime,omitempty"` + + // RevisionCreator: Output only. The user who created this label + // revision. + RevisionCreator *GoogleAppsDriveLabelsV2betaUserInfo `json:"revisionCreator,omitempty"` + + // RevisionId: Output only. Revision ID of the Label. Revision ID may be + // part of the Label `name` depending on the request issued. A new + // revision is created whenever revisioned properties of a Label are + // changed. Matches the regex: `([a-zA-Z0-9])+` + RevisionId string `json:"revisionId,omitempty"` + + // SchemaCapabilities: Output only. The capabilities the user has on + // this Label. + SchemaCapabilities *GoogleAppsDriveLabelsV2betaLabelSchemaCapabilities `json:"schemaCapabilities,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AppliedCapabilities") + // 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. "AppliedCapabilities") 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 *GoogleAppsDriveLabelsV2betaLabel) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaLabel + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaLabelAppliedCapabilities: The capabilities +// a user has on this Label's applied metadata. +type GoogleAppsDriveLabelsV2betaLabelAppliedCapabilities struct { + // CanApply: Whether the user can apply this Label to items. + CanApply bool `json:"canApply,omitempty"` + + // CanRead: Whether the user can read applied metadata related to this + // label. + CanRead bool `json:"canRead,omitempty"` + + // CanRemove: Whether the user can remove this Label from items. + CanRemove bool `json:"canRemove,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CanApply") 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. "CanApply") 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 *GoogleAppsDriveLabelsV2betaLabelAppliedCapabilities) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaLabelAppliedCapabilities + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaLabelAppliedLabelPolicy: Behavior of this +// Label when its applied to Drive items. +type GoogleAppsDriveLabelsV2betaLabelAppliedLabelPolicy struct { + // CopyMode: Indicates how the applied Label, and Field values should be + // copied when a Drive item is copied. + // + // Possible values: + // "COPY_MODE_UNSPECIFIED" - Copy mode unspecified. + // "DO_NOT_COPY" - The applied Label and Field values will not be + // copied by default when the Drive item it is applied to is copied. + // "ALWAYS_COPY" - The applied Label and Field values will always be + // copied when the Drive item it is applied to is copied. Only admins + // may use this mode. + // "COPY_APPLIABLE" - The applied Label and Field values will be + // copied if and only if the label is appliable by the user making the + // copy. + CopyMode string `json:"copyMode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CopyMode") 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. "CopyMode") 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 *GoogleAppsDriveLabelsV2betaLabelAppliedLabelPolicy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaLabelAppliedLabelPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaLabelDisplayHints: UI Display hints for +// rendering the Label. +type GoogleAppsDriveLabelsV2betaLabelDisplayHints struct { + // Disabled: Whether the Label should be shown in the UI as disabled. + Disabled bool `json:"disabled,omitempty"` + + // HiddenInSearch: This Label should be hidden in the search menu when + // searching for Drive items. + HiddenInSearch bool `json:"hiddenInSearch,omitempty"` + + // Priority: Order to display label in a list + Priority int64 `json:"priority,omitempty,string"` + + // ShownInApply: This Label should be shown in the apply menu. + ShownInApply bool `json:"shownInApply,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Disabled") 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. "Disabled") 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 *GoogleAppsDriveLabelsV2betaLabelDisplayHints) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaLabelDisplayHints + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaLabelLimits: Label constraints governing +// the structure of a Label; such as, the maximum number of Fields +// allowed and maximum length of the label title. +type GoogleAppsDriveLabelsV2betaLabelLimits struct { + // FieldLimits: The limits for Fields. + FieldLimits *GoogleAppsDriveLabelsV2betaFieldLimits `json:"fieldLimits,omitempty"` + + // MaxDeletedFields: The maximum number of published Fields that can be + // deleted. + MaxDeletedFields int64 `json:"maxDeletedFields,omitempty"` + + // MaxDescriptionLength: The maximum number of characters allowed for + // the description. + MaxDescriptionLength int64 `json:"maxDescriptionLength,omitempty"` + + // MaxDraftRevisions: The maximum number of draft revisions that will be + // kept before deleting old drafts. + MaxDraftRevisions int64 `json:"maxDraftRevisions,omitempty"` + + // MaxFields: The maximum number of Fields allowed within the label. + MaxFields int64 `json:"maxFields,omitempty"` + + // MaxTitleLength: The maximum number of characters allowed for the + // title. + MaxTitleLength int64 `json:"maxTitleLength,omitempty"` + + // Name: Resource name. + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "FieldLimits") 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. "FieldLimits") 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 *GoogleAppsDriveLabelsV2betaLabelLimits) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaLabelLimits + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaLabelLock: A Lock that can be applied to a +// Label, Field, or Choice. +type GoogleAppsDriveLabelsV2betaLabelLock struct { + // Capabilities: Output only. The user's capabilities on this LabelLock. + Capabilities *GoogleAppsDriveLabelsV2betaLabelLockCapabilities `json:"capabilities,omitempty"` + + // ChoiceId: The ID of the Selection Field Choice that should be locked. + // If present, `field_id` must also be present. + ChoiceId string `json:"choiceId,omitempty"` + + // CreateTime: Output only. The time this LabelLock was created. + CreateTime string `json:"createTime,omitempty"` + + // Creator: Output only. The user whose credentials were used to create + // the LabelLock. This will not be present if no user was responsible + // for creating the LabelLock. + Creator *GoogleAppsDriveLabelsV2betaUserInfo `json:"creator,omitempty"` + + // DeleteTime: Output only. A timestamp indicating when this LabelLock + // was scheduled for deletion. This will be present only if this + // LabelLock is in the DELETING state. + DeleteTime string `json:"deleteTime,omitempty"` + + // FieldId: The ID of the Field that should be locked. Empty if the + // whole Label should be locked. + FieldId string `json:"fieldId,omitempty"` + + // Name: Output only. Resource name of this LabelLock. + Name string `json:"name,omitempty"` + + // PolicyUri: Output only. A URI referring to the policy that created + // this Lock. + PolicyUri string `json:"policyUri,omitempty"` + + // State: Output only. This LabelLock's state. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unknown state. + // "ACTIVE" - The LabelLock is active and is being enforced by the + // server. + // "DELETING" - The LabelLock is being deleted. The LabelLock will + // continue to be enforced by the server until it has been fully + // removed. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Capabilities") 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. "Capabilities") 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 *GoogleAppsDriveLabelsV2betaLabelLock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaLabelLock + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaLabelLockCapabilities: A description of a +// user's capabilities on a LabelLock. +type GoogleAppsDriveLabelsV2betaLabelLockCapabilities struct { + // CanViewPolicy: True if the user is authorized to view the policy. + CanViewPolicy bool `json:"canViewPolicy,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CanViewPolicy") 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. "CanViewPolicy") 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 *GoogleAppsDriveLabelsV2betaLabelLockCapabilities) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaLabelLockCapabilities + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaLabelPermission: The permission that +// applies to a principal (user, group, audience) on a label. +type GoogleAppsDriveLabelsV2betaLabelPermission struct { + // Audience: Audience to grant a role to. The magic value of + // `audiences/default` may be used to apply the role to the default + // audience in the context of the organization that owns the Label. + Audience string `json:"audience,omitempty"` + + // Email: Specifies the email address for a user or group pricinpal. Not + // populated for audience principals. User and Group permissions may + // only be inserted using email address. On update requests, if email + // address is specified, no principal should be specified. + Email string `json:"email,omitempty"` + + // Group: Group resource name. + Group string `json:"group,omitempty"` + + // Name: Resource name of this permission. + Name string `json:"name,omitempty"` + + // Person: Person resource name. + Person string `json:"person,omitempty"` + + // Role: The role the principal should have. + // + // Possible values: + // "LABEL_ROLE_UNSPECIFIED" - Unknown role. + // "READER" - A reader can read the Label and associated metadata + // applied to Drive items. + // "APPLIER" - An applier can write associated metadata on Drive items + // in which they also have write access to. Implies `READER`. + // "ORGANIZER" - An organizer is allowed to pin this label in shared + // drives they manage and add new appliers to the label. + // "EDITOR" - Editors may make any updates including deleting the + // Label which will also delete associated Drive item metadata. Implies + // `APPLIER`. + Role string `json:"role,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Audience") 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. "Audience") 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 *GoogleAppsDriveLabelsV2betaLabelPermission) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaLabelPermission + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaLabelProperties: Basic properties of the +// Label. +type GoogleAppsDriveLabelsV2betaLabelProperties struct { + // Description: The description of this Label. + Description string `json:"description,omitempty"` + + // Title: Required. Title of the Label. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") 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. "Description") 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 *GoogleAppsDriveLabelsV2betaLabelProperties) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaLabelProperties + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaLabelSchemaCapabilities: The capabilities +// related to this Label when editing the Label. +type GoogleAppsDriveLabelsV2betaLabelSchemaCapabilities struct { + // CanDelete: Whether the user can delete this Label. The user must have + // permission and the Label must be disabled. + CanDelete bool `json:"canDelete,omitempty"` + + // CanDisable: Whether the user can disable this Label. The user must + // have permission and this Label must not already be disabled. + CanDisable bool `json:"canDisable,omitempty"` + + // CanEnable: Whether the user can enable this Label. The user must have + // permission and this Label must be disabled. + CanEnable bool `json:"canEnable,omitempty"` + + // CanUpdate: Whether the user can change this Label. + CanUpdate bool `json:"canUpdate,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CanDelete") 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. "CanDelete") 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 *GoogleAppsDriveLabelsV2betaLabelSchemaCapabilities) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaLabelSchemaCapabilities + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaLifecycle: The lifecycle state of an +// object, e.g. Label, Field, or Choice. The Lifecycle enforces the +// following transitions: * `UNPUBLISHED_DRAFT` (starting state) * +// `UNPUBLISHED_DRAFT` -> `PUBLISHED` * `UNPUBLISHED_DRAFT` -> (Deleted) +// * `PUBLISHED` -> `DISABLED` * `DISABLED` -> `PUBLISHED` * `DISABLED` +// -> (Deleted) The published and disabled states have some distinct +// characteristics: * Published - Some kinds of changes may be made to +// an object in this state, in which case `has_unpublished_changes` will +// be true. Some kinds of changes are not permitted. Generally, any +// change that would invalidate or cause new restrictions on existing +// metadata related to the Label will be rejected. * Disabled - When +// disabled, the configured `DisabledPolicy` will take effect. +type GoogleAppsDriveLabelsV2betaLifecycle struct { + // DisabledPolicy: The policy that governs how to show a disabled label, + // field, or selection choice. + DisabledPolicy *GoogleAppsDriveLabelsV2betaLifecycleDisabledPolicy `json:"disabledPolicy,omitempty"` + + // HasUnpublishedChanges: Output only. Whether the object associated + // with this lifecycle has unpublished changes. + HasUnpublishedChanges bool `json:"hasUnpublishedChanges,omitempty"` + + // State: Output only. The state of the object associated with this + // lifecycle. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unknown State. + // "UNPUBLISHED_DRAFT" - The initial state of an object. Once + // published, the object may never return to this state. Once an object + // is published, certain kinds of changes are no longer permitted. + // "PUBLISHED" - The object has been published. The object may have + // unpublished draft changes as indicated by `has_unpublished_changes`. + // "DISABLED" - The object has been published, and has since been + // disabled. The object may have unpublished draft changes as indicated + // by `has_unpublished_changes`. + // "DELETED" - The object has been deleted + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisabledPolicy") 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. "DisabledPolicy") 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 *GoogleAppsDriveLabelsV2betaLifecycle) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaLifecycle + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaLifecycleDisabledPolicy: The policy that +// governs how to treat a disabled label, field, or selection choice in +// different contexts. +type GoogleAppsDriveLabelsV2betaLifecycleDisabledPolicy struct { + // HideInSearch: Whether to hide this disabled object in the search menu + // for Drive items. * When `false` the object will generally be shown in + // the UI as disabled (but still permit searching) when searching for + // Drive items. * When `true` the object will generally be hidden in the + // UI when searching for Drive items. + HideInSearch bool `json:"hideInSearch,omitempty"` + + // ShowInApply: Whether to show this disabled object in the apply menu + // on Drive items. * When `true` the object will generally be shown in + // the UI as disabled and is unselectable. * When `false` the object + // will generally be hidden in the UI. + ShowInApply bool `json:"showInApply,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HideInSearch") 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. "HideInSearch") 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 *GoogleAppsDriveLabelsV2betaLifecycleDisabledPolicy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaLifecycleDisabledPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaListLabelLocksResponse: The response to a +// ListLabelLocksRequest. +type GoogleAppsDriveLabelsV2betaListLabelLocksResponse struct { + // LabelLocks: LabelLocks. + LabelLocks []*GoogleAppsDriveLabelsV2betaLabelLock `json:"labelLocks,omitempty"` + + // NextPageToken: The token of the next page in the response. + 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. "LabelLocks") 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. "LabelLocks") 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 *GoogleAppsDriveLabelsV2betaListLabelLocksResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaListLabelLocksResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse: Response for +// listing the permissions on a Label. +type GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse struct { + // LabelPermissions: Label permissions. + LabelPermissions []*GoogleAppsDriveLabelsV2betaLabelPermission `json:"labelPermissions,omitempty"` + + // NextPageToken: The token of the next page in the response. + 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. "LabelPermissions") 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. "LabelPermissions") 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 *GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaListLabelsResponse: Response for listing +// Labels. +type GoogleAppsDriveLabelsV2betaListLabelsResponse struct { + // Labels: Labels. + Labels []*GoogleAppsDriveLabelsV2betaLabel `json:"labels,omitempty"` + + // NextPageToken: The token of the next page in the response. + 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. "Labels") 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. "Labels") 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 *GoogleAppsDriveLabelsV2betaListLabelsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaListLabelsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaListLimits: Limits for list-variant of a +// Field type. +type GoogleAppsDriveLabelsV2betaListLimits struct { + // MaxEntries: Maximum number of values allowed for the Field type. + MaxEntries int64 `json:"maxEntries,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MaxEntries") 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. "MaxEntries") 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 *GoogleAppsDriveLabelsV2betaListLimits) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaListLimits + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaLockStatus: Contains information about +// whether a label component should be considered locked. +type GoogleAppsDriveLabelsV2betaLockStatus struct { + // Locked: Output only. Indicates whether this label component is the + // (direct) target of a LabelLock. A label component may be implicitly + // locked even if it is not the direct target of a LabelLock, in which + // case this field will be false. + Locked bool `json:"locked,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Locked") 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. "Locked") 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 *GoogleAppsDriveLabelsV2betaLockStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaLockStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaLongTextLimits: Limits for long text Field +// type. +type GoogleAppsDriveLabelsV2betaLongTextLimits struct { + // MaxLength: Maximum length allowed for a long text Field type. + MaxLength int64 `json:"maxLength,omitempty"` + + // MinLength: Minimum length allowed for a long text Field type. + MinLength int64 `json:"minLength,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MaxLength") 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. "MaxLength") 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 *GoogleAppsDriveLabelsV2betaLongTextLimits) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaLongTextLimits + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaPublishLabelRequest: Request to publish a +// label. +type GoogleAppsDriveLabelsV2betaPublishLabelRequest struct { + // LanguageCode: The BCP-47 language code to use for evaluating + // localized field labels. When not specified, values in the default + // configured language will be used. + LanguageCode string `json:"languageCode,omitempty"` + + // UseAdminAccess: Set to `true` in order to use the user's admin + // credentials. The server will verify the user is an admin for the + // Label before allowing access. + UseAdminAccess bool `json:"useAdminAccess,omitempty"` + + // WriteControl: Provides control over how write requests are executed. + // Defaults to unset, which means last write wins. + WriteControl *GoogleAppsDriveLabelsV2betaWriteControl `json:"writeControl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LanguageCode") 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. "LanguageCode") 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 *GoogleAppsDriveLabelsV2betaPublishLabelRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaPublishLabelRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaSelectionLimits: Limits for selection +// Field type. +type GoogleAppsDriveLabelsV2betaSelectionLimits struct { + // ListLimits: Limits for list-variant of a Field type. + ListLimits *GoogleAppsDriveLabelsV2betaListLimits `json:"listLimits,omitempty"` + + // MaxChoices: The max number of choices. + MaxChoices int64 `json:"maxChoices,omitempty"` + + // MaxDeletedChoices: Maximum number of deleted choices. + MaxDeletedChoices int64 `json:"maxDeletedChoices,omitempty"` + + // MaxDisplayNameLength: Maximum length for display name. + MaxDisplayNameLength int64 `json:"maxDisplayNameLength,omitempty"` + + // MaxIdLength: Maximum ID length for a selection options. + MaxIdLength int64 `json:"maxIdLength,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ListLimits") 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. "ListLimits") 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 *GoogleAppsDriveLabelsV2betaSelectionLimits) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaSelectionLimits + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaTextLimits: Limits for text Field type. +type GoogleAppsDriveLabelsV2betaTextLimits struct { + // MaxLength: Maximum length allowed for a text Field type. + MaxLength int64 `json:"maxLength,omitempty"` + + // MinLength: Minimum length allowed for a text Field type. + MinLength int64 `json:"minLength,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MaxLength") 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. "MaxLength") 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 *GoogleAppsDriveLabelsV2betaTextLimits) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaTextLimits + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaUpdateLabelCopyModeRequest: Request to +// update the `CopyMode` of the given Label. Changes to this policy are +// not revisioned, do not require publishing, and take effect +// immediately. \ +type GoogleAppsDriveLabelsV2betaUpdateLabelCopyModeRequest struct { + // CopyMode: Required. Indicates how the applied Label, and Field values + // should be copied when a Drive item is copied. + // + // Possible values: + // "COPY_MODE_UNSPECIFIED" - Copy mode unspecified. + // "DO_NOT_COPY" - The applied Label and Field values will not be + // copied by default when the Drive item it is applied to is copied. + // "ALWAYS_COPY" - The applied Label and Field values will always be + // copied when the Drive item it is applied to is copied. Only admins + // may use this mode. + // "COPY_APPLIABLE" - The applied Label and Field values will be + // copied if and only if the label is appliable by the user making the + // copy. + CopyMode string `json:"copyMode,omitempty"` + + // LanguageCode: The BCP-47 language code to use for evaluating + // localized field labels. When not specified, values in the default + // configured language will be used. + LanguageCode string `json:"languageCode,omitempty"` + + // UseAdminAccess: Set to `true` in order to use the user's admin + // credentials. The server will verify the user is an admin for the + // Label before allowing access. + UseAdminAccess bool `json:"useAdminAccess,omitempty"` + + // View: When specified, only certain fields belonging to the indicated + // view will be returned. + // + // Possible values: + // "LABEL_VIEW_BASIC" - Implies the field mask: + // `name,id,revision_id,label_type,properties.*` + // "LABEL_VIEW_FULL" - All possible fields. + View string `json:"view,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CopyMode") 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. "CopyMode") 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 *GoogleAppsDriveLabelsV2betaUpdateLabelCopyModeRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaUpdateLabelCopyModeRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaUpdateLabelPermissionRequest: Updates a +// Label Permission. Permissions affect the Label resource as a whole, +// are not revisioned, and do not require publishing. +type GoogleAppsDriveLabelsV2betaUpdateLabelPermissionRequest struct { + // LabelPermission: Required. The permission to create or update on the + // Label. + LabelPermission *GoogleAppsDriveLabelsV2betaLabelPermission `json:"labelPermission,omitempty"` + + // Parent: Required. The parent Label resource name. + Parent string `json:"parent,omitempty"` + + // UseAdminAccess: Set to `true` in order to use the user's admin + // credentials. The server will verify the user is an admin for the + // Label before allowing access. + UseAdminAccess bool `json:"useAdminAccess,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LabelPermission") 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. "LabelPermission") 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 *GoogleAppsDriveLabelsV2betaUpdateLabelPermissionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaUpdateLabelPermissionRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaUserCapabilities: The capabilities of a +// user. +type GoogleAppsDriveLabelsV2betaUserCapabilities struct { + // CanAccessLabelManager: Output only. Whether the user is allowed + // access to the label manager. + CanAccessLabelManager bool `json:"canAccessLabelManager,omitempty"` + + // CanAdministrateLabels: Output only. Whether the user is an + // administrator for the shared labels feature. + CanAdministrateLabels bool `json:"canAdministrateLabels,omitempty"` + + // CanCreateAdminLabels: Output only. Whether the user is allowed to + // create new admin labels. + CanCreateAdminLabels bool `json:"canCreateAdminLabels,omitempty"` + + // CanCreateSharedLabels: Output only. Whether the user is allowed to + // create new shared labels. + CanCreateSharedLabels bool `json:"canCreateSharedLabels,omitempty"` + + // Name: Output only. Resource name for the user capabilities. + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "CanAccessLabelManager") 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. "CanAccessLabelManager") 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 *GoogleAppsDriveLabelsV2betaUserCapabilities) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaUserCapabilities + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaUserInfo: Information about a user. +type GoogleAppsDriveLabelsV2betaUserInfo struct { + // Person: The identifier for this user who can be used with the People + // API to get more information. e.g. people/12345678 + Person string `json:"person,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Person") 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. "Person") 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 *GoogleAppsDriveLabelsV2betaUserInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaUserInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaUserLimits: Limits for Field.Type.USER. +type GoogleAppsDriveLabelsV2betaUserLimits struct { + // ListLimits: Limits for list-variant of a Field type. + ListLimits *GoogleAppsDriveLabelsV2betaListLimits `json:"listLimits,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ListLimits") 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. "ListLimits") 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 *GoogleAppsDriveLabelsV2betaUserLimits) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaUserLimits + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2betaWriteControl: Provides control over how +// write requests are executed. When not specified, the last write wins. +type GoogleAppsDriveLabelsV2betaWriteControl struct { + // RequiredRevisionId: The revision_id of the label that the write + // request will be applied to. If this is not the latest revision of the + // label, the request will not be processed and will return a 400 Bad + // Request error. + RequiredRevisionId string `json:"requiredRevisionId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequiredRevisionId") + // 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. "RequiredRevisionId") 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 *GoogleAppsDriveLabelsV2betaWriteControl) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2betaWriteControl + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleProtobufEmpty: A generic empty message that you can re-use to +// avoid defining duplicated empty messages in your APIs. A typical +// example is to use it as the request or the response type of an API +// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) +// returns (google.protobuf.Empty); } +type GoogleProtobufEmpty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// GoogleTypeColor: Represents a color in the RGBA color space. This +// representation is designed for simplicity of conversion to/from color +// representations in various languages over compactness. For example, +// the fields of this representation can be trivially provided to the +// constructor of `java.awt.Color` in Java; it can also be trivially +// provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; +// and, with just a little work, it can be easily formatted into a CSS +// `rgba()` string in JavaScript. This reference page doesn't carry +// information about the absolute color space that should be used to +// interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, +// etc.). By default, applications should assume the sRGB color space. +// When color equality needs to be decided, implementations, unless +// documented otherwise, treat two colors as equal if all their red, +// green, blue, and alpha values each differ by at most 1e-5. Example +// (Java): import com.google.type.Color; // ... public static +// java.awt.Color fromProto(Color protocolor) { float alpha = +// protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; +// return new java.awt.Color( protocolor.getRed(), +// protocolor.getGreen(), protocolor.getBlue(), alpha); } public static +// Color toProto(java.awt.Color color) { float red = (float) +// color.getRed(); float green = (float) color.getGreen(); float blue = +// (float) color.getBlue(); float denominator = 255.0; Color.Builder +// resultBuilder = Color .newBuilder() .setRed(red / denominator) +// .setGreen(green / denominator) .setBlue(blue / denominator); int +// alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( +// FloatValue .newBuilder() .setValue(((float) alpha) / denominator) +// .build()); } return resultBuilder.build(); } // ... Example (iOS / +// Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float +// red = [protocolor red]; float green = [protocolor green]; float blue +// = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; +// float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper +// value]; } return [UIColor colorWithRed:red green:green blue:blue +// alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, +// green, blue, alpha; if (![color getRed:&red green:&green blue:&blue +// alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; +// [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; +// if (alpha <= 0.9999) { [result +// setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; +// return result; } // ... Example (JavaScript): // ... var +// protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red +// || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = +// rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green +// = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); +// if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, +// blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams +// = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', +// alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, +// blue) { var rgbNumber = new Number((red << 16) | (green << 8) | +// blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - +// hexString.length; var resultBuilder = ['#']; for (var i = 0; i < +// missingZeros; i++) { resultBuilder.push('0'); } +// resultBuilder.push(hexString); return resultBuilder.join(''); }; // +// ... +type GoogleTypeColor struct { + // Alpha: The fraction of this color that should be applied to the + // pixel. That is, the final pixel color is defined by the equation: + // `pixel color = alpha * (this color) + (1.0 - alpha) * (background + // color)` This means that a value of 1.0 corresponds to a solid color, + // whereas a value of 0.0 corresponds to a completely transparent color. + // This uses a wrapper message rather than a simple float scalar so that + // it is possible to distinguish between a default value and the value + // being unset. If omitted, this color object is rendered as a solid + // color (as if the alpha value had been explicitly given a value of + // 1.0). + Alpha float64 `json:"alpha,omitempty"` + + // Blue: The amount of blue in the color as a value in the interval [0, + // 1]. + Blue float64 `json:"blue,omitempty"` + + // Green: The amount of green in the color as a value in the interval + // [0, 1]. + Green float64 `json:"green,omitempty"` + + // Red: The amount of red in the color as a value in the interval [0, + // 1]. + Red float64 `json:"red,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Alpha") 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. "Alpha") 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 *GoogleTypeColor) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeColor + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleTypeColor) UnmarshalJSON(data []byte) error { + type NoMethod GoogleTypeColor + var s1 struct { + Alpha gensupport.JSONFloat64 `json:"alpha"` + Blue gensupport.JSONFloat64 `json:"blue"` + Green gensupport.JSONFloat64 `json:"green"` + Red gensupport.JSONFloat64 `json:"red"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Alpha = float64(s1.Alpha) + s.Blue = float64(s1.Blue) + s.Green = float64(s1.Green) + s.Red = float64(s1.Red) + return nil +} + +// GoogleTypeDate: Represents a whole or partial calendar date, such as +// a birthday. The time of day and time zone are either specified +// elsewhere or are insignificant. The date is relative to the Gregorian +// Calendar. This can represent one of the following: * A full date, +// with non-zero year, month, and day values. * A month and day, with a +// zero year (for example, an anniversary). * A year on its own, with a +// zero month and a zero day. * A year and month, with a zero day (for +// example, a credit card expiration date). Related types: * +// google.type.TimeOfDay * google.type.DateTime * +// google.protobuf.Timestamp +type GoogleTypeDate struct { + // Day: Day of a month. Must be from 1 to 31 and valid for the year and + // month, or 0 to specify a year by itself or a year and month where the + // day isn't significant. + Day int64 `json:"day,omitempty"` + + // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year + // without a month and day. + Month int64 `json:"month,omitempty"` + + // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a + // date without a year. + Year int64 `json:"year,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Day") 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. "Day") 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 *GoogleTypeDate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "drivelabels.labels.create": + +type LabelsCreateCall struct { + s *Service + googleappsdrivelabelsv2betalabel *GoogleAppsDriveLabelsV2betaLabel + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Label. +func (r *LabelsService) Create(googleappsdrivelabelsv2betalabel *GoogleAppsDriveLabelsV2betaLabel) *LabelsCreateCall { + c := &LabelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.googleappsdrivelabelsv2betalabel = googleappsdrivelabelsv2betalabel + return c +} + +// LanguageCode sets the optional parameter "languageCode": The BCP-47 +// language code to use for evaluating localized Field labels in +// response. When not specified, values in the default configured +// language will be used. +func (c *LabelsCreateCall) LanguageCode(languageCode string) *LabelsCreateCall { + c.urlParams_.Set("languageCode", languageCode) + return c +} + +// UseAdminAccess sets the optional parameter "useAdminAccess": Set to +// `true` in order to use the user's admin privileges. The server will +// verify the user is an admin before allowing access. +func (c *LabelsCreateCall) UseAdminAccess(useAdminAccess bool) *LabelsCreateCall { + c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess)) + 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 *LabelsCreateCall) Fields(s ...googleapi.Field) *LabelsCreateCall { + 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 *LabelsCreateCall) Context(ctx context.Context) *LabelsCreateCall { + 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 *LabelsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsCreateCall) 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.googleappsdrivelabelsv2betalabel) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/labels") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "drivelabels.labels.create" call. +// Exactly one of *GoogleAppsDriveLabelsV2betaLabel or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAppsDriveLabelsV2betaLabel.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 *LabelsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabel, 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 := &GoogleAppsDriveLabelsV2betaLabel{ + 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 Label.", + // "flatPath": "v2beta/labels", + // "httpMethod": "POST", + // "id": "drivelabels.labels.create", + // "parameterOrder": [], + // "parameters": { + // "languageCode": { + // "description": "The BCP-47 language code to use for evaluating localized Field labels in response. When not specified, values in the default configured language will be used.", + // "location": "query", + // "type": "string" + // }, + // "useAdminAccess": { + // "description": "Set to `true` in order to use the user's admin privileges. The server will verify the user is an admin before allowing access.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v2beta/labels", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2betaLabel" + // }, + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2betaLabel" + // } + // } + +} + +// method id "drivelabels.labels.delete": + +type LabelsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Permanently deletes a Label and related metadata on Drive +// Items. Once deleted, the Label and related Drive item metadata will +// be deleted. Only draft Labels, and disabled Labels may be deleted. +// +// - name: Label resource name. +func (r *LabelsService) Delete(name string) *LabelsDeleteCall { + c := &LabelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// UseAdminAccess sets the optional parameter "useAdminAccess": Set to +// `true` in order to use the user's admin credentials. The server will +// verify the user is an admin for the Label before allowing access. +func (c *LabelsDeleteCall) UseAdminAccess(useAdminAccess bool) *LabelsDeleteCall { + c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess)) + return c +} + +// WriteControlRequiredRevisionId sets the optional parameter +// "writeControl.requiredRevisionId": The revision_id of the label that +// the write request will be applied to. If this is not the latest +// revision of the label, the request will not be processed and will +// return a 400 Bad Request error. +func (c *LabelsDeleteCall) WriteControlRequiredRevisionId(writeControlRequiredRevisionId string) *LabelsDeleteCall { + c.urlParams_.Set("writeControl.requiredRevisionId", writeControlRequiredRevisionId) + 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 *LabelsDeleteCall) Fields(s ...googleapi.Field) *LabelsDeleteCall { + 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 *LabelsDeleteCall) Context(ctx context.Context) *LabelsDeleteCall { + 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 *LabelsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsDeleteCall) 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, "v2beta/{+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 "drivelabels.labels.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 *LabelsDeleteCall) 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": "Permanently deletes a Label and related metadata on Drive Items. Once deleted, the Label and related Drive item metadata will be deleted. Only draft Labels, and disabled Labels may be deleted.", + // "flatPath": "v2beta/labels/{labelsId}", + // "httpMethod": "DELETE", + // "id": "drivelabels.labels.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Label resource name.", + // "location": "path", + // "pattern": "^labels/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "useAdminAccess": { + // "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + // "location": "query", + // "type": "boolean" + // }, + // "writeControl.requiredRevisionId": { + // "description": "The revision_id of the label that the write request will be applied to. If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2beta/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // } + // } + +} + +// method id "drivelabels.labels.delta": + +type LabelsDeltaCall struct { + s *Service + name string + googleappsdrivelabelsv2betadeltaupdatelabelrequest *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delta: Updates a single Label by applying a set of update requests +// resulting in a new draft revision. The batch update is +// all-or-nothing: If any of the update requests are invalid, no changes +// are applied. The resulting draft revision must be published before +// the changes may be used with Drive Items. +// +// - name: The resource name of the Label to update. +func (r *LabelsService) Delta(name string, googleappsdrivelabelsv2betadeltaupdatelabelrequest *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequest) *LabelsDeltaCall { + c := &LabelsDeltaCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleappsdrivelabelsv2betadeltaupdatelabelrequest = googleappsdrivelabelsv2betadeltaupdatelabelrequest + 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 *LabelsDeltaCall) Fields(s ...googleapi.Field) *LabelsDeltaCall { + 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 *LabelsDeltaCall) Context(ctx context.Context) *LabelsDeltaCall { + 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 *LabelsDeltaCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsDeltaCall) 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.googleappsdrivelabelsv2betadeltaupdatelabelrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}:delta") + 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 "drivelabels.labels.delta" call. +// Exactly one of *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponse.ServerResponse.He +// ader 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 *LabelsDeltaCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponse, 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 := &GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponse{ + 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": "Updates a single Label by applying a set of update requests resulting in a new draft revision. The batch update is all-or-nothing: If any of the update requests are invalid, no changes are applied. The resulting draft revision must be published before the changes may be used with Drive Items.", + // "flatPath": "v2beta/labels/{labelsId}:delta", + // "httpMethod": "POST", + // "id": "drivelabels.labels.delta", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the Label to update.", + // "location": "path", + // "pattern": "^labels/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+name}:delta", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequest" + // }, + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponse" + // } + // } + +} + +// method id "drivelabels.labels.disable": + +type LabelsDisableCall struct { + s *Service + name string + googleappsdrivelabelsv2betadisablelabelrequest *GoogleAppsDriveLabelsV2betaDisableLabelRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Disable: Disable a published Label. Disabling a Label will result in +// a new disabled published revision based on the current published +// revision. If there is a draft revision, a new disabled draft revision +// will be created based on the latest draft revision. Older draft +// revisions will be deleted. Once disabled, a label may be deleted with +// `DeleteLabel`. +// +// - name: Label resource name. +func (r *LabelsService) Disable(name string, googleappsdrivelabelsv2betadisablelabelrequest *GoogleAppsDriveLabelsV2betaDisableLabelRequest) *LabelsDisableCall { + c := &LabelsDisableCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleappsdrivelabelsv2betadisablelabelrequest = googleappsdrivelabelsv2betadisablelabelrequest + 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 *LabelsDisableCall) Fields(s ...googleapi.Field) *LabelsDisableCall { + 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 *LabelsDisableCall) Context(ctx context.Context) *LabelsDisableCall { + 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 *LabelsDisableCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsDisableCall) 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.googleappsdrivelabelsv2betadisablelabelrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}:disable") + 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 "drivelabels.labels.disable" call. +// Exactly one of *GoogleAppsDriveLabelsV2betaLabel or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAppsDriveLabelsV2betaLabel.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 *LabelsDisableCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabel, 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 := &GoogleAppsDriveLabelsV2betaLabel{ + 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": "Disable a published Label. Disabling a Label will result in a new disabled published revision based on the current published revision. If there is a draft revision, a new disabled draft revision will be created based on the latest draft revision. Older draft revisions will be deleted. Once disabled, a label may be deleted with `DeleteLabel`.", + // "flatPath": "v2beta/labels/{labelsId}:disable", + // "httpMethod": "POST", + // "id": "drivelabels.labels.disable", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Label resource name.", + // "location": "path", + // "pattern": "^labels/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+name}:disable", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2betaDisableLabelRequest" + // }, + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2betaLabel" + // } + // } + +} + +// method id "drivelabels.labels.enable": + +type LabelsEnableCall struct { + s *Service + name string + googleappsdrivelabelsv2betaenablelabelrequest *GoogleAppsDriveLabelsV2betaEnableLabelRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Enable: Enable a disabled Label and restore it to its published +// state. This will result in a new published revision based on the +// current disabled published revision. If there is an existing disabled +// draft revision, a new revision will be created based on that draft +// and will be enabled. +// +// - name: Label resource name. +func (r *LabelsService) Enable(name string, googleappsdrivelabelsv2betaenablelabelrequest *GoogleAppsDriveLabelsV2betaEnableLabelRequest) *LabelsEnableCall { + c := &LabelsEnableCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleappsdrivelabelsv2betaenablelabelrequest = googleappsdrivelabelsv2betaenablelabelrequest + 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 *LabelsEnableCall) Fields(s ...googleapi.Field) *LabelsEnableCall { + 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 *LabelsEnableCall) Context(ctx context.Context) *LabelsEnableCall { + 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 *LabelsEnableCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsEnableCall) 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.googleappsdrivelabelsv2betaenablelabelrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}:enable") + 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 "drivelabels.labels.enable" call. +// Exactly one of *GoogleAppsDriveLabelsV2betaLabel or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAppsDriveLabelsV2betaLabel.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 *LabelsEnableCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabel, 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 := &GoogleAppsDriveLabelsV2betaLabel{ + 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": "Enable a disabled Label and restore it to its published state. This will result in a new published revision based on the current disabled published revision. If there is an existing disabled draft revision, a new revision will be created based on that draft and will be enabled.", + // "flatPath": "v2beta/labels/{labelsId}:enable", + // "httpMethod": "POST", + // "id": "drivelabels.labels.enable", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Label resource name.", + // "location": "path", + // "pattern": "^labels/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+name}:enable", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2betaEnableLabelRequest" + // }, + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2betaLabel" + // } + // } + +} + +// method id "drivelabels.labels.get": + +type LabelsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get a Label by its resource name. Resource name may be any of: * +// `labels/{id}` - See to `labels/{id}@latest` * `labels/{id}@latest` - +// Gets the latest revision of the Label. * `labels/{id}@published` - +// Gets the current published revision of the Label. * +// `labels/{id}@{revision_id}` - Gets the Label at the specified +// revision ID. +// +// - name: Label resource name. May be any of: * `labels/{id}` +// (equivalent to labels/{id}@latest) * `labels/{id}@latest` * +// `labels/{id}@published` * `labels/{id}@{revision_id}`. +func (r *LabelsService) Get(name string) *LabelsGetCall { + c := &LabelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// LanguageCode sets the optional parameter "languageCode": The BCP-47 +// language code to use for evaluating localized Field labels. When not +// specified, values in the default configured language will be used. +func (c *LabelsGetCall) LanguageCode(languageCode string) *LabelsGetCall { + c.urlParams_.Set("languageCode", languageCode) + return c +} + +// UseAdminAccess sets the optional parameter "useAdminAccess": Set to +// `true` in order to use the user's admin credentials. The server will +// verify the user is an admin for the Label before allowing access. +func (c *LabelsGetCall) UseAdminAccess(useAdminAccess bool) *LabelsGetCall { + c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess)) + return c +} + +// View sets the optional parameter "view": When specified, only certain +// Fields belonging to the indicated view will be returned. +// +// Possible values: +// "LABEL_VIEW_BASIC" - Implies the field mask: +// `name,id,revision_id,label_type,properties.*` +// "LABEL_VIEW_FULL" - All possible fields. +func (c *LabelsGetCall) View(view string) *LabelsGetCall { + c.urlParams_.Set("view", view) + 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 *LabelsGetCall) Fields(s ...googleapi.Field) *LabelsGetCall { + 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 *LabelsGetCall) IfNoneMatch(entityTag string) *LabelsGetCall { + 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 *LabelsGetCall) Context(ctx context.Context) *LabelsGetCall { + 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 *LabelsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "drivelabels.labels.get" call. +// Exactly one of *GoogleAppsDriveLabelsV2betaLabel or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAppsDriveLabelsV2betaLabel.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 *LabelsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabel, 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 := &GoogleAppsDriveLabelsV2betaLabel{ + 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": "Get a Label by its resource name. Resource name may be any of: * `labels/{id}` - See to `labels/{id}@latest` * `labels/{id}@latest` - Gets the latest revision of the Label. * `labels/{id}@published` - Gets the current published revision of the Label. * `labels/{id}@{revision_id}` - Gets the Label at the specified revision ID.", + // "flatPath": "v2beta/labels/{labelsId}", + // "httpMethod": "GET", + // "id": "drivelabels.labels.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "languageCode": { + // "description": "The BCP-47 language code to use for evaluating localized Field labels. When not specified, values in the default configured language will be used.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. Label resource name. May be any of: * `labels/{id}` (equivalent to labels/{id}@latest) * `labels/{id}@latest` * `labels/{id}@published` * `labels/{id}@{revision_id}`", + // "location": "path", + // "pattern": "^labels/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "useAdminAccess": { + // "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + // "location": "query", + // "type": "boolean" + // }, + // "view": { + // "description": "When specified, only certain Fields belonging to the indicated view will be returned.", + // "enum": [ + // "LABEL_VIEW_BASIC", + // "LABEL_VIEW_FULL" + // ], + // "enumDescriptions": [ + // "Implies the field mask: `name,id,revision_id,label_type,properties.*`", + // "All possible fields." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2beta/{+name}", + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2betaLabel" + // } + // } + +} + +// method id "drivelabels.labels.list": + +type LabelsListCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: +// ---------------------------------------------------------------------- +// ---- ## Label APIs +// --------------------------------------------------------------- List +// Labels. +func (r *LabelsService) List() *LabelsListCall { + c := &LabelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// LanguageCode sets the optional parameter "languageCode": The BCP-47 +// language code to use for evaluating localized field labels. When not +// specified, values in the default configured language will be used. +func (c *LabelsListCall) LanguageCode(languageCode string) *LabelsListCall { + c.urlParams_.Set("languageCode", languageCode) + return c +} + +// MinimumRole sets the optional parameter "minimumRole": Specifies the +// level of access the user must have on the returned Labels. The +// minimum role a user must have on a label. Defaults to `READER`. +// +// Possible values: +// "LABEL_ROLE_UNSPECIFIED" - Unknown role. +// "READER" - A reader can read the Label and associated metadata +// applied to Drive items. +// "APPLIER" - An applier can write associated metadata on Drive items +// in which they also have write access to. Implies `READER`. +// "ORGANIZER" - An organizer is allowed to pin this label in shared +// drives they manage and add new appliers to the label. +// "EDITOR" - Editors may make any updates including deleting the +// Label which will also delete associated Drive item metadata. Implies +// `APPLIER`. +func (c *LabelsListCall) MinimumRole(minimumRole string) *LabelsListCall { + c.urlParams_.Set("minimumRole", minimumRole) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// Labels to return per page. Default: 50. Max: 200. +func (c *LabelsListCall) PageSize(pageSize int64) *LabelsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The token of the +// page to return. +func (c *LabelsListCall) PageToken(pageToken string) *LabelsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// PublishedOnly sets the optional parameter "publishedOnly": Whether to +// include only published labels in the results. * When `true`, only the +// current published label revisions will be returned. Disabled labels +// will be included. Returned Label resource names will reference the +// published revision (`labels/{id}/{revision_id}`). * When `false`, the +// current label revisions will be returned, which may not by published. +// Returned Label resource names will not reference a specific revision +// (`labels/{id}`). +func (c *LabelsListCall) PublishedOnly(publishedOnly bool) *LabelsListCall { + c.urlParams_.Set("publishedOnly", fmt.Sprint(publishedOnly)) + return c +} + +// UseAdminAccess sets the optional parameter "useAdminAccess": Set to +// `true` in order to use the user's admin credentials. This will return +// all Labels within the customer. +func (c *LabelsListCall) UseAdminAccess(useAdminAccess bool) *LabelsListCall { + c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess)) + return c +} + +// View sets the optional parameter "view": When specified, only certain +// fields belonging to the indicated view will be returned. +// +// Possible values: +// "LABEL_VIEW_BASIC" - Implies the field mask: +// `name,id,revision_id,label_type,properties.*` +// "LABEL_VIEW_FULL" - All possible fields. +func (c *LabelsListCall) View(view string) *LabelsListCall { + c.urlParams_.Set("view", view) + 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 *LabelsListCall) Fields(s ...googleapi.Field) *LabelsListCall { + 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 *LabelsListCall) IfNoneMatch(entityTag string) *LabelsListCall { + 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 *LabelsListCall) Context(ctx context.Context) *LabelsListCall { + 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 *LabelsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/labels") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "drivelabels.labels.list" call. +// Exactly one of *GoogleAppsDriveLabelsV2betaListLabelsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAppsDriveLabelsV2betaListLabelsResponse.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 *LabelsListCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaListLabelsResponse, 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 := &GoogleAppsDriveLabelsV2betaListLabelsResponse{ + 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": "-------------------------------------------------------------------------- ## Label APIs --------------------------------------------------------------- List Labels.", + // "flatPath": "v2beta/labels", + // "httpMethod": "GET", + // "id": "drivelabels.labels.list", + // "parameterOrder": [], + // "parameters": { + // "languageCode": { + // "description": "The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language will be used.", + // "location": "query", + // "type": "string" + // }, + // "minimumRole": { + // "description": "Specifies the level of access the user must have on the returned Labels. The minimum role a user must have on a label. Defaults to `READER`.", + // "enum": [ + // "LABEL_ROLE_UNSPECIFIED", + // "READER", + // "APPLIER", + // "ORGANIZER", + // "EDITOR" + // ], + // "enumDescriptions": [ + // "Unknown role.", + // "A reader can read the Label and associated metadata applied to Drive items.", + // "An applier can write associated metadata on Drive items in which they also have write access to. Implies `READER`.", + // "An organizer is allowed to pin this label in shared drives they manage and add new appliers to the label.", + // "Editors may make any updates including deleting the Label which will also delete associated Drive item metadata. Implies `APPLIER`." + // ], + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum number of Labels to return per page. Default: 50. Max: 200.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The token of the page to return.", + // "location": "query", + // "type": "string" + // }, + // "publishedOnly": { + // "description": "Whether to include only published labels in the results. * When `true`, only the current published label revisions will be returned. Disabled labels will be included. Returned Label resource names will reference the published revision (`labels/{id}/{revision_id}`). * When `false`, the current label revisions will be returned, which may not by published. Returned Label resource names will not reference a specific revision (`labels/{id}`).", + // "location": "query", + // "type": "boolean" + // }, + // "useAdminAccess": { + // "description": "Set to `true` in order to use the user's admin credentials. This will return all Labels within the customer.", + // "location": "query", + // "type": "boolean" + // }, + // "view": { + // "description": "When specified, only certain fields belonging to the indicated view will be returned.", + // "enum": [ + // "LABEL_VIEW_BASIC", + // "LABEL_VIEW_FULL" + // ], + // "enumDescriptions": [ + // "Implies the field mask: `name,id,revision_id,label_type,properties.*`", + // "All possible fields." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2beta/labels", + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2betaListLabelsResponse" + // } + // } + +} + +// 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 *LabelsListCall) Pages(ctx context.Context, f func(*GoogleAppsDriveLabelsV2betaListLabelsResponse) 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 "drivelabels.labels.publish": + +type LabelsPublishCall struct { + s *Service + name string + googleappsdrivelabelsv2betapublishlabelrequest *GoogleAppsDriveLabelsV2betaPublishLabelRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Publish: Publish all draft changes to the Label. Once published, the +// Label may not return to its draft state. See +// `google.apps.drive.labels.v2.Lifecycle` for more information. +// Publishing a Label will result in a new published revision. All +// previous draft revisions will be deleted. Previous published +// revisions will be kept but are subject to automated deletion as +// needed. Once published, some changes are no longer permitted. +// Generally, any change that would invalidate or cause new restrictions +// on existing metadata related to the Label will be rejected. For +// example, the following changes to a Label will be rejected after the +// Label is published: * The label cannot be directly deleted. It must +// be disabled first, then deleted. * Field.FieldType cannot be changed. +// * Changes to Field validation options cannot reject something that +// was previously accepted. * Reducing the max entries. +// +// - name: Label resource name. +func (r *LabelsService) Publish(name string, googleappsdrivelabelsv2betapublishlabelrequest *GoogleAppsDriveLabelsV2betaPublishLabelRequest) *LabelsPublishCall { + c := &LabelsPublishCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleappsdrivelabelsv2betapublishlabelrequest = googleappsdrivelabelsv2betapublishlabelrequest + 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 *LabelsPublishCall) Fields(s ...googleapi.Field) *LabelsPublishCall { + 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 *LabelsPublishCall) Context(ctx context.Context) *LabelsPublishCall { + 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 *LabelsPublishCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsPublishCall) 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.googleappsdrivelabelsv2betapublishlabelrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}:publish") + 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 "drivelabels.labels.publish" call. +// Exactly one of *GoogleAppsDriveLabelsV2betaLabel or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAppsDriveLabelsV2betaLabel.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 *LabelsPublishCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabel, 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 := &GoogleAppsDriveLabelsV2betaLabel{ + 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": "Publish all draft changes to the Label. Once published, the Label may not return to its draft state. See `google.apps.drive.labels.v2.Lifecycle` for more information. Publishing a Label will result in a new published revision. All previous draft revisions will be deleted. Previous published revisions will be kept but are subject to automated deletion as needed. Once published, some changes are no longer permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the Label will be rejected. For example, the following changes to a Label will be rejected after the Label is published: * The label cannot be directly deleted. It must be disabled first, then deleted. * Field.FieldType cannot be changed. * Changes to Field validation options cannot reject something that was previously accepted. * Reducing the max entries.", + // "flatPath": "v2beta/labels/{labelsId}:publish", + // "httpMethod": "POST", + // "id": "drivelabels.labels.publish", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Label resource name.", + // "location": "path", + // "pattern": "^labels/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+name}:publish", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2betaPublishLabelRequest" + // }, + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2betaLabel" + // } + // } + +} + +// method id "drivelabels.labels.updateLabelCopyMode": + +type LabelsUpdateLabelCopyModeCall struct { + s *Service + name string + googleappsdrivelabelsv2betaupdatelabelcopymoderequest *GoogleAppsDriveLabelsV2betaUpdateLabelCopyModeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateLabelCopyMode: Updates a Label's `CopyMode`. Changes to this +// policy are not revisioned, do not require publishing, and take effect +// immediately. +// +// - name: The resource name of the Label to update. +func (r *LabelsService) UpdateLabelCopyMode(name string, googleappsdrivelabelsv2betaupdatelabelcopymoderequest *GoogleAppsDriveLabelsV2betaUpdateLabelCopyModeRequest) *LabelsUpdateLabelCopyModeCall { + c := &LabelsUpdateLabelCopyModeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleappsdrivelabelsv2betaupdatelabelcopymoderequest = googleappsdrivelabelsv2betaupdatelabelcopymoderequest + 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 *LabelsUpdateLabelCopyModeCall) Fields(s ...googleapi.Field) *LabelsUpdateLabelCopyModeCall { + 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 *LabelsUpdateLabelCopyModeCall) Context(ctx context.Context) *LabelsUpdateLabelCopyModeCall { + 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 *LabelsUpdateLabelCopyModeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsUpdateLabelCopyModeCall) 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.googleappsdrivelabelsv2betaupdatelabelcopymoderequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}:updateLabelCopyMode") + 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 "drivelabels.labels.updateLabelCopyMode" call. +// Exactly one of *GoogleAppsDriveLabelsV2betaLabel or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAppsDriveLabelsV2betaLabel.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 *LabelsUpdateLabelCopyModeCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabel, 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 := &GoogleAppsDriveLabelsV2betaLabel{ + 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": "Updates a Label's `CopyMode`. Changes to this policy are not revisioned, do not require publishing, and take effect immediately.", + // "flatPath": "v2beta/labels/{labelsId}:updateLabelCopyMode", + // "httpMethod": "POST", + // "id": "drivelabels.labels.updateLabelCopyMode", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the Label to update.", + // "location": "path", + // "pattern": "^labels/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+name}:updateLabelCopyMode", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2betaUpdateLabelCopyModeRequest" + // }, + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2betaLabel" + // } + // } + +} + +// method id "drivelabels.labels.locks.list": + +type LabelsLocksListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the Locks on a Label. +// +// - parent: Label on which Locks are applied. Format: labels/{label}. +func (r *LabelsLocksService) List(parent string) *LabelsLocksListCall { + c := &LabelsLocksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// Locks to return per page. Default: 100. Max: 200. +func (c *LabelsLocksListCall) PageSize(pageSize int64) *LabelsLocksListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The token of the +// page to return. +func (c *LabelsLocksListCall) PageToken(pageToken string) *LabelsLocksListCall { + 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 *LabelsLocksListCall) Fields(s ...googleapi.Field) *LabelsLocksListCall { + 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 *LabelsLocksListCall) IfNoneMatch(entityTag string) *LabelsLocksListCall { + 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 *LabelsLocksListCall) Context(ctx context.Context) *LabelsLocksListCall { + 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 *LabelsLocksListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsLocksListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/locks") + 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 "drivelabels.labels.locks.list" call. +// Exactly one of *GoogleAppsDriveLabelsV2betaListLabelLocksResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAppsDriveLabelsV2betaListLabelLocksResponse.ServerResponse.Head +// er 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 *LabelsLocksListCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaListLabelLocksResponse, 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 := &GoogleAppsDriveLabelsV2betaListLabelLocksResponse{ + 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 the Locks on a Label.", + // "flatPath": "v2beta/labels/{labelsId}/locks", + // "httpMethod": "GET", + // "id": "drivelabels.labels.locks.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of Locks to return per page. Default: 100. Max: 200.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The token of the page to return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Label on which Locks are applied. Format: labels/{label}", + // "location": "path", + // "pattern": "^labels/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+parent}/locks", + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2betaListLabelLocksResponse" + // } + // } + +} + +// 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 *LabelsLocksListCall) Pages(ctx context.Context, f func(*GoogleAppsDriveLabelsV2betaListLabelLocksResponse) 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 "drivelabels.labels.permissions.batchDelete": + +type LabelsPermissionsBatchDeleteCall struct { + s *Service + labelsId string + googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest *GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchDelete: Deletes Label permissions. Permissions affect the Label +// resource as a whole, are not revisioned, and do not require +// publishing. +// +// - labelsId: . +func (r *LabelsPermissionsService) BatchDelete(labelsId string, googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest *GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest) *LabelsPermissionsBatchDeleteCall { + c := &LabelsPermissionsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.labelsId = labelsId + c.googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest = googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest + 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 *LabelsPermissionsBatchDeleteCall) Fields(s ...googleapi.Field) *LabelsPermissionsBatchDeleteCall { + 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 *LabelsPermissionsBatchDeleteCall) Context(ctx context.Context) *LabelsPermissionsBatchDeleteCall { + 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 *LabelsPermissionsBatchDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsPermissionsBatchDeleteCall) 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.googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/labels/{labelsId}/permissions:batchDelete") + 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{ + "labelsId": c.labelsId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "drivelabels.labels.permissions.batchDelete" 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 *LabelsPermissionsBatchDeleteCall) 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 Label permissions. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + // "flatPath": "v2beta/labels/{labelsId}/permissions:batchDelete", + // "httpMethod": "POST", + // "id": "drivelabels.labels.permissions.batchDelete", + // "parameterOrder": [ + // "labelsId" + // ], + // "parameters": { + // "labelsId": { + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/labels/{labelsId}/permissions:batchDelete", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleProtobufEmpty" + // } + // } + +} + +// method id "drivelabels.labels.permissions.batchUpdate": + +type LabelsPermissionsBatchUpdateCall struct { + s *Service + parent string + googleappsdrivelabelsv2betabatchupdatelabelpermissionsrequest *GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchUpdate: Updates Label permissions. If a permission for the +// indicated principal doesn't exist, a new Label Permission is created, +// otherwise the existing permission is updated. Permissions affect the +// Label resource as a whole, are not revisioned, and do not require +// publishing. +// +// - parent: The parent Label resource name shared by all permissions +// being updated. Format: labels/{label} If this is set, the parent +// field in the UpdateLabelPermissionRequest messages must either be +// empty or match this field. +func (r *LabelsPermissionsService) BatchUpdate(parent string, googleappsdrivelabelsv2betabatchupdatelabelpermissionsrequest *GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest) *LabelsPermissionsBatchUpdateCall { + c := &LabelsPermissionsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleappsdrivelabelsv2betabatchupdatelabelpermissionsrequest = googleappsdrivelabelsv2betabatchupdatelabelpermissionsrequest + 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 *LabelsPermissionsBatchUpdateCall) Fields(s ...googleapi.Field) *LabelsPermissionsBatchUpdateCall { + 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 *LabelsPermissionsBatchUpdateCall) Context(ctx context.Context) *LabelsPermissionsBatchUpdateCall { + 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 *LabelsPermissionsBatchUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsPermissionsBatchUpdateCall) 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.googleappsdrivelabelsv2betabatchupdatelabelpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/permissions:batchUpdate") + 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 "drivelabels.labels.permissions.batchUpdate" call. +// Exactly one of +// *GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse.Server +// Response.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 *LabelsPermissionsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse, 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 := &GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse{ + 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": "Updates Label permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + // "flatPath": "v2beta/labels/{labelsId}/permissions:batchUpdate", + // "httpMethod": "POST", + // "id": "drivelabels.labels.permissions.batchUpdate", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent Label resource name shared by all permissions being updated. Format: labels/{label} If this is set, the parent field in the UpdateLabelPermissionRequest messages must either be empty or match this field.", + // "location": "path", + // "pattern": "^labels/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+parent}/permissions:batchUpdate", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse" + // } + // } + +} + +// method id "drivelabels.labels.permissions.create": + +type LabelsPermissionsCreateCall struct { + s *Service + parent string + googleappsdrivelabelsv2betalabelpermission *GoogleAppsDriveLabelsV2betaLabelPermission + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Updates a Label's permissions. If a permission for the +// indicated principal doesn't exist, a new Label Permission is created, +// otherwise the existing permission is updated. Permissions affect the +// Label resource as a whole, are not revisioned, and do not require +// publishing. +// +// - parent: The parent Label resource name on the Label Permission is +// created. Format: labels/{label}. +func (r *LabelsPermissionsService) Create(parent string, googleappsdrivelabelsv2betalabelpermission *GoogleAppsDriveLabelsV2betaLabelPermission) *LabelsPermissionsCreateCall { + c := &LabelsPermissionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleappsdrivelabelsv2betalabelpermission = googleappsdrivelabelsv2betalabelpermission + return c +} + +// UseAdminAccess sets the optional parameter "useAdminAccess": Set to +// `true` in order to use the user's admin credentials. The server will +// verify the user is an admin for the Label before allowing access. +func (c *LabelsPermissionsCreateCall) UseAdminAccess(useAdminAccess bool) *LabelsPermissionsCreateCall { + c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess)) + 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 *LabelsPermissionsCreateCall) Fields(s ...googleapi.Field) *LabelsPermissionsCreateCall { + 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 *LabelsPermissionsCreateCall) Context(ctx context.Context) *LabelsPermissionsCreateCall { + 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 *LabelsPermissionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsPermissionsCreateCall) 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.googleappsdrivelabelsv2betalabelpermission) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/permissions") + 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 "drivelabels.labels.permissions.create" call. +// Exactly one of *GoogleAppsDriveLabelsV2betaLabelPermission or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAppsDriveLabelsV2betaLabelPermission.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 *LabelsPermissionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabelPermission, 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 := &GoogleAppsDriveLabelsV2betaLabelPermission{ + 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": "Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + // "flatPath": "v2beta/labels/{labelsId}/permissions", + // "httpMethod": "POST", + // "id": "drivelabels.labels.permissions.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent Label resource name on the Label Permission is created. Format: labels/{label}", + // "location": "path", + // "pattern": "^labels/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "useAdminAccess": { + // "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v2beta/{+parent}/permissions", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" + // }, + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" + // } + // } + +} + +// method id "drivelabels.labels.permissions.delete": + +type LabelsPermissionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Label's permission. Permissions affect the Label +// resource as a whole, are not revisioned, and do not require +// publishing. +// +// - name: Label Permission resource name. +func (r *LabelsPermissionsService) Delete(name string) *LabelsPermissionsDeleteCall { + c := &LabelsPermissionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// UseAdminAccess sets the optional parameter "useAdminAccess": Set to +// `true` in order to use the user's admin credentials. The server will +// verify the user is an admin for the Label before allowing access. +func (c *LabelsPermissionsDeleteCall) UseAdminAccess(useAdminAccess bool) *LabelsPermissionsDeleteCall { + c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess)) + 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 *LabelsPermissionsDeleteCall) Fields(s ...googleapi.Field) *LabelsPermissionsDeleteCall { + 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 *LabelsPermissionsDeleteCall) Context(ctx context.Context) *LabelsPermissionsDeleteCall { + 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 *LabelsPermissionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsPermissionsDeleteCall) 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, "v2beta/{+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 "drivelabels.labels.permissions.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 *LabelsPermissionsDeleteCall) 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 a Label's permission. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + // "flatPath": "v2beta/labels/{labelsId}/permissions/{permissionsId}", + // "httpMethod": "DELETE", + // "id": "drivelabels.labels.permissions.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Label Permission resource name.", + // "location": "path", + // "pattern": "^labels/[^/]+/permissions/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "useAdminAccess": { + // "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v2beta/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // } + // } + +} + +// method id "drivelabels.labels.permissions.list": + +type LabelsPermissionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists a Label's permissions. +// +// - parent: The parent Label resource name on which Label Permission +// are listed. Format: labels/{label}. +func (r *LabelsPermissionsService) List(parent string) *LabelsPermissionsListCall { + c := &LabelsPermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// permissions to return per page. Default: 50. Max: 200. +func (c *LabelsPermissionsListCall) PageSize(pageSize int64) *LabelsPermissionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The token of the +// page to return. +func (c *LabelsPermissionsListCall) PageToken(pageToken string) *LabelsPermissionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// UseAdminAccess sets the optional parameter "useAdminAccess": Set to +// `true` in order to use the user's admin credentials. The server will +// verify the user is an admin for the Label before allowing access. +func (c *LabelsPermissionsListCall) UseAdminAccess(useAdminAccess bool) *LabelsPermissionsListCall { + c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess)) + 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 *LabelsPermissionsListCall) Fields(s ...googleapi.Field) *LabelsPermissionsListCall { + 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 *LabelsPermissionsListCall) IfNoneMatch(entityTag string) *LabelsPermissionsListCall { + 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 *LabelsPermissionsListCall) Context(ctx context.Context) *LabelsPermissionsListCall { + 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 *LabelsPermissionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsPermissionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/permissions") + 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 "drivelabels.labels.permissions.list" call. +// Exactly one of +// *GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse.ServerRespons +// e.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 *LabelsPermissionsListCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse, 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 := &GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse{ + 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 a Label's permissions.", + // "flatPath": "v2beta/labels/{labelsId}/permissions", + // "httpMethod": "GET", + // "id": "drivelabels.labels.permissions.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of permissions to return per page. Default: 50. Max: 200.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The token of the page to return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent Label resource name on which Label Permission are listed. Format: labels/{label}", + // "location": "path", + // "pattern": "^labels/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "useAdminAccess": { + // "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v2beta/{+parent}/permissions", + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse" + // } + // } + +} + +// 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 *LabelsPermissionsListCall) Pages(ctx context.Context, f func(*GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse) 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 "drivelabels.labels.permissions.patch": + +type LabelsPermissionsPatchCall struct { + s *Service + parent string + googleappsdrivelabelsv2betalabelpermission *GoogleAppsDriveLabelsV2betaLabelPermission + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Label's permissions. If a permission for the +// indicated principal doesn't exist, a new Label Permission is created, +// otherwise the existing permission is updated. Permissions affect the +// Label resource as a whole, are not revisioned, and do not require +// publishing. +// +// - parent: The parent Label resource name. +func (r *LabelsPermissionsService) Patch(parent string, googleappsdrivelabelsv2betalabelpermission *GoogleAppsDriveLabelsV2betaLabelPermission) *LabelsPermissionsPatchCall { + c := &LabelsPermissionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleappsdrivelabelsv2betalabelpermission = googleappsdrivelabelsv2betalabelpermission + return c +} + +// UseAdminAccess sets the optional parameter "useAdminAccess": Set to +// `true` in order to use the user's admin credentials. The server will +// verify the user is an admin for the Label before allowing access. +func (c *LabelsPermissionsPatchCall) UseAdminAccess(useAdminAccess bool) *LabelsPermissionsPatchCall { + c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess)) + 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 *LabelsPermissionsPatchCall) Fields(s ...googleapi.Field) *LabelsPermissionsPatchCall { + 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 *LabelsPermissionsPatchCall) Context(ctx context.Context) *LabelsPermissionsPatchCall { + 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 *LabelsPermissionsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsPermissionsPatchCall) 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.googleappsdrivelabelsv2betalabelpermission) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "drivelabels.labels.permissions.patch" call. +// Exactly one of *GoogleAppsDriveLabelsV2betaLabelPermission or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAppsDriveLabelsV2betaLabelPermission.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 *LabelsPermissionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabelPermission, 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 := &GoogleAppsDriveLabelsV2betaLabelPermission{ + 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": "Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + // "flatPath": "v2beta/labels/{labelsId}/permissions/{permissionsId}", + // "httpMethod": "PATCH", + // "id": "drivelabels.labels.permissions.patch", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent Label resource name.", + // "location": "path", + // "pattern": "^labels/[^/]+/permissions/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "useAdminAccess": { + // "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v2beta/{+parent}", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" + // }, + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" + // } + // } + +} + +// method id "drivelabels.labels.revisions.locks.list": + +type LabelsRevisionsLocksListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the Locks on a Label. +// +// - parent: Label on which Locks are applied. Format: labels/{label}. +func (r *LabelsRevisionsLocksService) List(parent string) *LabelsRevisionsLocksListCall { + c := &LabelsRevisionsLocksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// Locks to return per page. Default: 100. Max: 200. +func (c *LabelsRevisionsLocksListCall) PageSize(pageSize int64) *LabelsRevisionsLocksListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The token of the +// page to return. +func (c *LabelsRevisionsLocksListCall) PageToken(pageToken string) *LabelsRevisionsLocksListCall { + 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 *LabelsRevisionsLocksListCall) Fields(s ...googleapi.Field) *LabelsRevisionsLocksListCall { + 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 *LabelsRevisionsLocksListCall) IfNoneMatch(entityTag string) *LabelsRevisionsLocksListCall { + 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 *LabelsRevisionsLocksListCall) Context(ctx context.Context) *LabelsRevisionsLocksListCall { + 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 *LabelsRevisionsLocksListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsRevisionsLocksListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/locks") + 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 "drivelabels.labels.revisions.locks.list" call. +// Exactly one of *GoogleAppsDriveLabelsV2betaListLabelLocksResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAppsDriveLabelsV2betaListLabelLocksResponse.ServerResponse.Head +// er 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 *LabelsRevisionsLocksListCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaListLabelLocksResponse, 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 := &GoogleAppsDriveLabelsV2betaListLabelLocksResponse{ + 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 the Locks on a Label.", + // "flatPath": "v2beta/labels/{labelsId}/revisions/{revisionsId}/locks", + // "httpMethod": "GET", + // "id": "drivelabels.labels.revisions.locks.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of Locks to return per page. Default: 100. Max: 200.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The token of the page to return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Label on which Locks are applied. Format: labels/{label}", + // "location": "path", + // "pattern": "^labels/[^/]+/revisions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+parent}/locks", + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2betaListLabelLocksResponse" + // } + // } + +} + +// 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 *LabelsRevisionsLocksListCall) Pages(ctx context.Context, f func(*GoogleAppsDriveLabelsV2betaListLabelLocksResponse) 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 "drivelabels.labels.revisions.permissions.batchDelete": + +type LabelsRevisionsPermissionsBatchDeleteCall struct { + s *Service + labelsId string + revisionsId string + googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest *GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchDelete: Deletes Label permissions. Permissions affect the Label +// resource as a whole, are not revisioned, and do not require +// publishing. +// +// - labelsId: . +// - revisionsId: . +func (r *LabelsRevisionsPermissionsService) BatchDelete(labelsId string, revisionsId string, googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest *GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest) *LabelsRevisionsPermissionsBatchDeleteCall { + c := &LabelsRevisionsPermissionsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.labelsId = labelsId + c.revisionsId = revisionsId + c.googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest = googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest + 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 *LabelsRevisionsPermissionsBatchDeleteCall) Fields(s ...googleapi.Field) *LabelsRevisionsPermissionsBatchDeleteCall { + 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 *LabelsRevisionsPermissionsBatchDeleteCall) Context(ctx context.Context) *LabelsRevisionsPermissionsBatchDeleteCall { + 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 *LabelsRevisionsPermissionsBatchDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsRevisionsPermissionsBatchDeleteCall) 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.googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions:batchDelete") + 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{ + "labelsId": c.labelsId, + "revisionsId": c.revisionsId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "drivelabels.labels.revisions.permissions.batchDelete" 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 *LabelsRevisionsPermissionsBatchDeleteCall) 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 Label permissions. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + // "flatPath": "v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions:batchDelete", + // "httpMethod": "POST", + // "id": "drivelabels.labels.revisions.permissions.batchDelete", + // "parameterOrder": [ + // "labelsId", + // "revisionsId" + // ], + // "parameters": { + // "labelsId": { + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "revisionsId": { + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions:batchDelete", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleProtobufEmpty" + // } + // } + +} + +// method id "drivelabels.labels.revisions.permissions.batchUpdate": + +type LabelsRevisionsPermissionsBatchUpdateCall struct { + s *Service + parent string + googleappsdrivelabelsv2betabatchupdatelabelpermissionsrequest *GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchUpdate: Updates Label permissions. If a permission for the +// indicated principal doesn't exist, a new Label Permission is created, +// otherwise the existing permission is updated. Permissions affect the +// Label resource as a whole, are not revisioned, and do not require +// publishing. +// +// - parent: The parent Label resource name shared by all permissions +// being updated. Format: labels/{label} If this is set, the parent +// field in the UpdateLabelPermissionRequest messages must either be +// empty or match this field. +func (r *LabelsRevisionsPermissionsService) BatchUpdate(parent string, googleappsdrivelabelsv2betabatchupdatelabelpermissionsrequest *GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest) *LabelsRevisionsPermissionsBatchUpdateCall { + c := &LabelsRevisionsPermissionsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleappsdrivelabelsv2betabatchupdatelabelpermissionsrequest = googleappsdrivelabelsv2betabatchupdatelabelpermissionsrequest + 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 *LabelsRevisionsPermissionsBatchUpdateCall) Fields(s ...googleapi.Field) *LabelsRevisionsPermissionsBatchUpdateCall { + 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 *LabelsRevisionsPermissionsBatchUpdateCall) Context(ctx context.Context) *LabelsRevisionsPermissionsBatchUpdateCall { + 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 *LabelsRevisionsPermissionsBatchUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsRevisionsPermissionsBatchUpdateCall) 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.googleappsdrivelabelsv2betabatchupdatelabelpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/permissions:batchUpdate") + 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 "drivelabels.labels.revisions.permissions.batchUpdate" call. +// Exactly one of +// *GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse.Server +// Response.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 *LabelsRevisionsPermissionsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse, 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 := &GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse{ + 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": "Updates Label permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + // "flatPath": "v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions:batchUpdate", + // "httpMethod": "POST", + // "id": "drivelabels.labels.revisions.permissions.batchUpdate", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent Label resource name shared by all permissions being updated. Format: labels/{label} If this is set, the parent field in the UpdateLabelPermissionRequest messages must either be empty or match this field.", + // "location": "path", + // "pattern": "^labels/[^/]+/revisions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+parent}/permissions:batchUpdate", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse" + // } + // } + +} + +// method id "drivelabels.labels.revisions.permissions.create": + +type LabelsRevisionsPermissionsCreateCall struct { + s *Service + parent string + googleappsdrivelabelsv2betalabelpermission *GoogleAppsDriveLabelsV2betaLabelPermission + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Updates a Label's permissions. If a permission for the +// indicated principal doesn't exist, a new Label Permission is created, +// otherwise the existing permission is updated. Permissions affect the +// Label resource as a whole, are not revisioned, and do not require +// publishing. +// +// - parent: The parent Label resource name on the Label Permission is +// created. Format: labels/{label}. +func (r *LabelsRevisionsPermissionsService) Create(parent string, googleappsdrivelabelsv2betalabelpermission *GoogleAppsDriveLabelsV2betaLabelPermission) *LabelsRevisionsPermissionsCreateCall { + c := &LabelsRevisionsPermissionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleappsdrivelabelsv2betalabelpermission = googleappsdrivelabelsv2betalabelpermission + return c +} + +// UseAdminAccess sets the optional parameter "useAdminAccess": Set to +// `true` in order to use the user's admin credentials. The server will +// verify the user is an admin for the Label before allowing access. +func (c *LabelsRevisionsPermissionsCreateCall) UseAdminAccess(useAdminAccess bool) *LabelsRevisionsPermissionsCreateCall { + c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess)) + 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 *LabelsRevisionsPermissionsCreateCall) Fields(s ...googleapi.Field) *LabelsRevisionsPermissionsCreateCall { + 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 *LabelsRevisionsPermissionsCreateCall) Context(ctx context.Context) *LabelsRevisionsPermissionsCreateCall { + 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 *LabelsRevisionsPermissionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsRevisionsPermissionsCreateCall) 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.googleappsdrivelabelsv2betalabelpermission) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/permissions") + 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 "drivelabels.labels.revisions.permissions.create" call. +// Exactly one of *GoogleAppsDriveLabelsV2betaLabelPermission or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAppsDriveLabelsV2betaLabelPermission.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 *LabelsRevisionsPermissionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabelPermission, 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 := &GoogleAppsDriveLabelsV2betaLabelPermission{ + 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": "Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + // "flatPath": "v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions", + // "httpMethod": "POST", + // "id": "drivelabels.labels.revisions.permissions.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent Label resource name on the Label Permission is created. Format: labels/{label}", + // "location": "path", + // "pattern": "^labels/[^/]+/revisions/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "useAdminAccess": { + // "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v2beta/{+parent}/permissions", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" + // }, + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" + // } + // } + +} + +// method id "drivelabels.labels.revisions.permissions.delete": + +type LabelsRevisionsPermissionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Label's permission. Permissions affect the Label +// resource as a whole, are not revisioned, and do not require +// publishing. +// +// - name: Label Permission resource name. +func (r *LabelsRevisionsPermissionsService) Delete(name string) *LabelsRevisionsPermissionsDeleteCall { + c := &LabelsRevisionsPermissionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// UseAdminAccess sets the optional parameter "useAdminAccess": Set to +// `true` in order to use the user's admin credentials. The server will +// verify the user is an admin for the Label before allowing access. +func (c *LabelsRevisionsPermissionsDeleteCall) UseAdminAccess(useAdminAccess bool) *LabelsRevisionsPermissionsDeleteCall { + c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess)) + 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 *LabelsRevisionsPermissionsDeleteCall) Fields(s ...googleapi.Field) *LabelsRevisionsPermissionsDeleteCall { + 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 *LabelsRevisionsPermissionsDeleteCall) Context(ctx context.Context) *LabelsRevisionsPermissionsDeleteCall { + 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 *LabelsRevisionsPermissionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsRevisionsPermissionsDeleteCall) 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, "v2beta/{+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 "drivelabels.labels.revisions.permissions.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 *LabelsRevisionsPermissionsDeleteCall) 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 a Label's permission. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + // "flatPath": "v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions/{permissionsId}", + // "httpMethod": "DELETE", + // "id": "drivelabels.labels.revisions.permissions.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Label Permission resource name.", + // "location": "path", + // "pattern": "^labels/[^/]+/revisions/[^/]+/permissions/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "useAdminAccess": { + // "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v2beta/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // } + // } + +} + +// method id "drivelabels.labels.revisions.permissions.list": + +type LabelsRevisionsPermissionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists a Label's permissions. +// +// - parent: The parent Label resource name on which Label Permission +// are listed. Format: labels/{label}. +func (r *LabelsRevisionsPermissionsService) List(parent string) *LabelsRevisionsPermissionsListCall { + c := &LabelsRevisionsPermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// permissions to return per page. Default: 50. Max: 200. +func (c *LabelsRevisionsPermissionsListCall) PageSize(pageSize int64) *LabelsRevisionsPermissionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The token of the +// page to return. +func (c *LabelsRevisionsPermissionsListCall) PageToken(pageToken string) *LabelsRevisionsPermissionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// UseAdminAccess sets the optional parameter "useAdminAccess": Set to +// `true` in order to use the user's admin credentials. The server will +// verify the user is an admin for the Label before allowing access. +func (c *LabelsRevisionsPermissionsListCall) UseAdminAccess(useAdminAccess bool) *LabelsRevisionsPermissionsListCall { + c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess)) + 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 *LabelsRevisionsPermissionsListCall) Fields(s ...googleapi.Field) *LabelsRevisionsPermissionsListCall { + 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 *LabelsRevisionsPermissionsListCall) IfNoneMatch(entityTag string) *LabelsRevisionsPermissionsListCall { + 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 *LabelsRevisionsPermissionsListCall) Context(ctx context.Context) *LabelsRevisionsPermissionsListCall { + 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 *LabelsRevisionsPermissionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsRevisionsPermissionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/permissions") + 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 "drivelabels.labels.revisions.permissions.list" call. +// Exactly one of +// *GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse.ServerRespons +// e.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 *LabelsRevisionsPermissionsListCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse, 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 := &GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse{ + 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 a Label's permissions.", + // "flatPath": "v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions", + // "httpMethod": "GET", + // "id": "drivelabels.labels.revisions.permissions.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of permissions to return per page. Default: 50. Max: 200.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The token of the page to return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent Label resource name on which Label Permission are listed. Format: labels/{label}", + // "location": "path", + // "pattern": "^labels/[^/]+/revisions/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "useAdminAccess": { + // "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v2beta/{+parent}/permissions", + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse" + // } + // } + +} + +// 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 *LabelsRevisionsPermissionsListCall) Pages(ctx context.Context, f func(*GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse) 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 "drivelabels.labels.revisions.permissions.patch": + +type LabelsRevisionsPermissionsPatchCall struct { + s *Service + parent string + googleappsdrivelabelsv2betalabelpermission *GoogleAppsDriveLabelsV2betaLabelPermission + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Label's permissions. If a permission for the +// indicated principal doesn't exist, a new Label Permission is created, +// otherwise the existing permission is updated. Permissions affect the +// Label resource as a whole, are not revisioned, and do not require +// publishing. +// +// - parent: The parent Label resource name. +func (r *LabelsRevisionsPermissionsService) Patch(parent string, googleappsdrivelabelsv2betalabelpermission *GoogleAppsDriveLabelsV2betaLabelPermission) *LabelsRevisionsPermissionsPatchCall { + c := &LabelsRevisionsPermissionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleappsdrivelabelsv2betalabelpermission = googleappsdrivelabelsv2betalabelpermission + return c +} + +// UseAdminAccess sets the optional parameter "useAdminAccess": Set to +// `true` in order to use the user's admin credentials. The server will +// verify the user is an admin for the Label before allowing access. +func (c *LabelsRevisionsPermissionsPatchCall) UseAdminAccess(useAdminAccess bool) *LabelsRevisionsPermissionsPatchCall { + c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess)) + 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 *LabelsRevisionsPermissionsPatchCall) Fields(s ...googleapi.Field) *LabelsRevisionsPermissionsPatchCall { + 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 *LabelsRevisionsPermissionsPatchCall) Context(ctx context.Context) *LabelsRevisionsPermissionsPatchCall { + 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 *LabelsRevisionsPermissionsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsRevisionsPermissionsPatchCall) 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.googleappsdrivelabelsv2betalabelpermission) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "drivelabels.labels.revisions.permissions.patch" call. +// Exactly one of *GoogleAppsDriveLabelsV2betaLabelPermission or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAppsDriveLabelsV2betaLabelPermission.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 *LabelsRevisionsPermissionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabelPermission, 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 := &GoogleAppsDriveLabelsV2betaLabelPermission{ + 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": "Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + // "flatPath": "v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions/{permissionsId}", + // "httpMethod": "PATCH", + // "id": "drivelabels.labels.revisions.permissions.patch", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent Label resource name.", + // "location": "path", + // "pattern": "^labels/[^/]+/revisions/[^/]+/permissions/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "useAdminAccess": { + // "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v2beta/{+parent}", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" + // }, + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" + // } + // } + +} + +// method id "drivelabels.limits.getLabel": + +type LimitsGetLabelCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetLabel: Get the constraints on the structure of a Label; such as, +// the maximum number of Fields allowed and maximum length of the label +// title. +func (r *LimitsService) GetLabel() *LimitsGetLabelCall { + c := &LimitsGetLabelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// Name sets the optional parameter "name": Required. Label revision +// resource name Must be: "limits/label" +func (c *LimitsGetLabelCall) Name(name string) *LimitsGetLabelCall { + c.urlParams_.Set("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 *LimitsGetLabelCall) Fields(s ...googleapi.Field) *LimitsGetLabelCall { + 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 *LimitsGetLabelCall) IfNoneMatch(entityTag string) *LimitsGetLabelCall { + 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 *LimitsGetLabelCall) Context(ctx context.Context) *LimitsGetLabelCall { + 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 *LimitsGetLabelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LimitsGetLabelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/limits/label") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "drivelabels.limits.getLabel" call. +// Exactly one of *GoogleAppsDriveLabelsV2betaLabelLimits or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleAppsDriveLabelsV2betaLabelLimits.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 *LimitsGetLabelCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabelLimits, 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 := &GoogleAppsDriveLabelsV2betaLabelLimits{ + 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": "Get the constraints on the structure of a Label; such as, the maximum number of Fields allowed and maximum length of the label title.", + // "flatPath": "v2beta/limits/label", + // "httpMethod": "GET", + // "id": "drivelabels.limits.getLabel", + // "parameterOrder": [], + // "parameters": { + // "name": { + // "description": "Required. Label revision resource name Must be: \"limits/label\"", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2beta/limits/label", + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2betaLabelLimits" + // } + // } + +} + +// method id "drivelabels.users.getCapabilities": + +type UsersGetCapabilitiesCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetCapabilities: Gets the user capabilities. +// +// - name: The resource name of the user. Only "users/me/capabilities" +// is supported. +func (r *UsersService) GetCapabilities(name string) *UsersGetCapabilitiesCall { + c := &UsersGetCapabilitiesCall{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 *UsersGetCapabilitiesCall) Fields(s ...googleapi.Field) *UsersGetCapabilitiesCall { + 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 *UsersGetCapabilitiesCall) IfNoneMatch(entityTag string) *UsersGetCapabilitiesCall { + 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 *UsersGetCapabilitiesCall) Context(ctx context.Context) *UsersGetCapabilitiesCall { + 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 *UsersGetCapabilitiesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *UsersGetCapabilitiesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "drivelabels.users.getCapabilities" call. +// Exactly one of *GoogleAppsDriveLabelsV2betaUserCapabilities or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAppsDriveLabelsV2betaUserCapabilities.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 *UsersGetCapabilitiesCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaUserCapabilities, 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 := &GoogleAppsDriveLabelsV2betaUserCapabilities{ + 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 user capabilities.", + // "flatPath": "v2beta/users/{usersId}/capabilities", + // "httpMethod": "GET", + // "id": "drivelabels.users.getCapabilities", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the user. Only \"users/me/capabilities\" is supported.", + // "location": "path", + // "pattern": "^users/[^/]+/capabilities$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+name}", + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2betaUserCapabilities" + // } + // } + +} diff --git a/iap/v1/iap-api.json b/iap/v1/iap-api.json index e5467f605f0..695baeed403 100644 --- a/iap/v1/iap-api.json +++ b/iap/v1/iap-api.json @@ -652,7 +652,7 @@ } } }, - "revision": "20220715", + "revision": "20220729", "rootUrl": "https://iap.googleapis.com/", "schemas": { "AccessDeniedPageSettings": { @@ -706,7 +706,7 @@ "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.", + "description": "Configuration for IAP allowed domains. Lets you to restrict access to an app and allow access to only the domains that you list.", "id": "AllowedDomainsSettings", "properties": { "domains": { diff --git a/iap/v1/iap-gen.go b/iap/v1/iap-gen.go index 554fd559445..3fed84ea6e0 100644 --- a/iap/v1/iap-gen.go +++ b/iap/v1/iap-gen.go @@ -308,9 +308,9 @@ func (s *AccessSettings) MarshalJSON() ([]byte, error) { 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. +// AllowedDomainsSettings: Configuration for IAP allowed domains. Lets +// you to restrict access to an app and allow access to only the domains +// that you list. type AllowedDomainsSettings struct { // Domains: List of trusted domains. Domains []string `json:"domains,omitempty"` diff --git a/language/v1beta2/language-api.json b/language/v1beta2/language-api.json index 064070632eb..d233a5c6f42 100644 --- a/language/v1beta2/language-api.json +++ b/language/v1beta2/language-api.json @@ -227,7 +227,7 @@ } } }, - "revision": "20210807", + "revision": "20220801", "rootUrl": "https://language.googleapis.com/", "schemas": { "AnalyzeEntitiesRequest": { @@ -871,7 +871,7 @@ "type": "object" }, "Features": { - "description": "All available features for sentiment, syntax, and semantic analysis. Setting each one to true will enable that specific analysis for the input. Next ID: 10", + "description": "All available features for sentiment, syntax, and semantic analysis. Setting each one to true will enable that specific analysis for the input. Next ID: 11", "id": "Features", "properties": { "classifyText": { diff --git a/language/v1beta2/language-gen.go b/language/v1beta2/language-gen.go index 119481f592a..4ad395554b3 100644 --- a/language/v1beta2/language-gen.go +++ b/language/v1beta2/language-gen.go @@ -1059,7 +1059,7 @@ func (s *EntityMention) MarshalJSON() ([]byte, error) { // Features: All available features for sentiment, syntax, and semantic // analysis. Setting each one to true will enable that specific analysis -// for the input. Next ID: 10 +// for the input. Next ID: 11 type Features struct { // ClassifyText: Classify the full document into categories. If this is // true, the API will use the default model which classifies into a diff --git a/memcache/v1/memcache-api.json b/memcache/v1/memcache-api.json index 7bf96961abf..3111ace5a1e 100644 --- a/memcache/v1/memcache-api.json +++ b/memcache/v1/memcache-api.json @@ -556,7 +556,7 @@ } } }, - "revision": "20220709", + "revision": "20220721", "rootUrl": "https://memcache.googleapis.com/", "schemas": { "ApplyParametersRequest": { @@ -1671,12 +1671,18 @@ "enum": [ "UPDATE_CHANNEL_UNSPECIFIED", "EARLIER", - "LATER" + "LATER", + "WEEK1", + "WEEK2", + "WEEK5" ], "enumDescriptions": [ "Unspecified channel.", "Early channel within a customer project.", - "Later channel within a customer project." + "Later channel within a customer project.", + "! ! The follow channels can ONLY be used if you adopt the new MW system! ! ! NOTE: all WEEK channels are assumed to be under a weekly window. ! There is currently no dedicated channel definitions for Daily windows. ! If you use Daily window, the system will assume a 1d (24Hours) advanced ! notification period b/w EARLY and LATER. ! We may consider support more flexible daily channel specifications in ! the future. WEEK1 == EARLIER with minimum 7d advanced notification. {7d, 14d} The system will treat them equally and will use WEEK1 whenever it can. New customers are encouraged to use this channel annotation.", + "WEEK2 == LATER with minimum 14d advanced notification {14d, 21d}.", + "WEEK5 == 40d support. minimum 35d advanced notification {35d, 42d}." ], "type": "string" }, diff --git a/memcache/v1/memcache-gen.go b/memcache/v1/memcache-gen.go index 5716d7efe6e..b4d4a7ba355 100644 --- a/memcache/v1/memcache-gen.go +++ b/memcache/v1/memcache-gen.go @@ -1879,6 +1879,20 @@ type UpdatePolicy struct { // "UPDATE_CHANNEL_UNSPECIFIED" - Unspecified channel. // "EARLIER" - Early channel within a customer project. // "LATER" - Later channel within a customer project. + // "WEEK1" - ! ! The follow channels can ONLY be used if you adopt the + // new MW system! ! ! NOTE: all WEEK channels are assumed to be under a + // weekly window. ! There is currently no dedicated channel definitions + // for Daily windows. ! If you use Daily window, the system will assume + // a 1d (24Hours) advanced ! notification period b/w EARLY and LATER. ! + // We may consider support more flexible daily channel specifications in + // ! the future. WEEK1 == EARLIER with minimum 7d advanced notification. + // {7d, 14d} The system will treat them equally and will use WEEK1 + // whenever it can. New customers are encouraged to use this channel + // annotation. + // "WEEK2" - WEEK2 == LATER with minimum 14d advanced notification + // {14d, 21d}. + // "WEEK5" - WEEK5 == 40d support. minimum 35d advanced notification + // {35d, 42d}. Channel string `json:"channel,omitempty"` // DenyMaintenancePeriods: Deny Maintenance Period that is applied to diff --git a/memcache/v1beta2/memcache-api.json b/memcache/v1beta2/memcache-api.json index fba10017bfb..8b16c93d7f9 100644 --- a/memcache/v1beta2/memcache-api.json +++ b/memcache/v1beta2/memcache-api.json @@ -584,7 +584,7 @@ } } }, - "revision": "20220709", + "revision": "20220721", "rootUrl": "https://memcache.googleapis.com/", "schemas": { "ApplyParametersRequest": { @@ -1727,12 +1727,18 @@ "enum": [ "UPDATE_CHANNEL_UNSPECIFIED", "EARLIER", - "LATER" + "LATER", + "WEEK1", + "WEEK2", + "WEEK5" ], "enumDescriptions": [ "Unspecified channel.", "Early channel within a customer project.", - "Later channel within a customer project." + "Later channel within a customer project.", + "! ! The follow channels can ONLY be used if you adopt the new MW system! ! ! NOTE: all WEEK channels are assumed to be under a weekly window. ! There is currently no dedicated channel definitions for Daily windows. ! If you use Daily window, the system will assume a 1d (24Hours) advanced ! notification period b/w EARLY and LATER. ! We may consider support more flexible daily channel specifications in ! the future. WEEK1 == EARLIER with minimum 7d advanced notification. {7d, 14d} The system will treat them equally and will use WEEK1 whenever it can. New customers are encouraged to use this channel annotation.", + "WEEK2 == LATER with minimum 14d advanced notification {14d, 21d}.", + "WEEK5 == 40d support. minimum 35d advanced notification {35d, 42d}." ], "type": "string" }, diff --git a/memcache/v1beta2/memcache-gen.go b/memcache/v1beta2/memcache-gen.go index 10c4cfdcadd..f59c64e3170 100644 --- a/memcache/v1beta2/memcache-gen.go +++ b/memcache/v1beta2/memcache-gen.go @@ -1920,6 +1920,20 @@ type UpdatePolicy struct { // "UPDATE_CHANNEL_UNSPECIFIED" - Unspecified channel. // "EARLIER" - Early channel within a customer project. // "LATER" - Later channel within a customer project. + // "WEEK1" - ! ! The follow channels can ONLY be used if you adopt the + // new MW system! ! ! NOTE: all WEEK channels are assumed to be under a + // weekly window. ! There is currently no dedicated channel definitions + // for Daily windows. ! If you use Daily window, the system will assume + // a 1d (24Hours) advanced ! notification period b/w EARLY and LATER. ! + // We may consider support more flexible daily channel specifications in + // ! the future. WEEK1 == EARLIER with minimum 7d advanced notification. + // {7d, 14d} The system will treat them equally and will use WEEK1 + // whenever it can. New customers are encouraged to use this channel + // annotation. + // "WEEK2" - WEEK2 == LATER with minimum 14d advanced notification + // {14d, 21d}. + // "WEEK5" - WEEK5 == 40d support. minimum 35d advanced notification + // {35d, 42d}. Channel string `json:"channel,omitempty"` // DenyMaintenancePeriods: Deny Maintenance Period that is applied to diff --git a/notebooks/v1/notebooks-api.json b/notebooks/v1/notebooks-api.json index ae127efb625..48949fb1c2a 100644 --- a/notebooks/v1/notebooks-api.json +++ b/notebooks/v1/notebooks-api.json @@ -1820,7 +1820,7 @@ } } }, - "revision": "20220517", + "revision": "20220716", "rootUrl": "https://notebooks.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -4027,7 +4027,7 @@ "type": "object" }, "network": { - "description": "Optional. The Compute Engine network to be used for machine communications. Cannot be specified with subnetwork. If neither `network` nor `subnet` is specified, the \"default\" network of the project is used, if it exists. A full URL or partial URI. Examples: * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default` * `projects/[project_id]/regions/global/default` Runtimes are managed resources inside Google Infrastructure. Runtimes support the following network configurations: * Google Managed Network (Network \u0026 subnet are empty) * Consumer Project VPC (network \u0026 subnet are required). Requires configuring Private Service Access. * Shared VPC (network \u0026 subnet are required). Requires configuring Private Service Access.", + "description": "Optional. The Compute Engine network to be used for machine communications. Cannot be specified with subnetwork. If neither `network` nor `subnet` is specified, the \"default\" network of the project is used, if it exists. A full URL or partial URI. Examples: * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default` * `projects/[project_id]/global/networks/default` Runtimes are managed resources inside Google Infrastructure. Runtimes support the following network configurations: * Google Managed Network (Network \u0026 subnet are empty) * Consumer Project VPC (network \u0026 subnet are required). Requires configuring Private Service Access. * Shared VPC (network \u0026 subnet are required). Requires configuring Private Service Access.", "type": "string" }, "nicType": { diff --git a/notebooks/v1/notebooks-gen.go b/notebooks/v1/notebooks-gen.go index 4686b50ea1f..153af114d88 100644 --- a/notebooks/v1/notebooks-gen.go +++ b/notebooks/v1/notebooks-gen.go @@ -3636,8 +3636,8 @@ type VirtualMachineConfig struct { // communications. Cannot be specified with subnetwork. If neither // `network` nor `subnet` is specified, the "default" network of the // project is used, if it exists. A full URL or partial URI. Examples: * - // `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/g - // lobal/default` * `projects/[project_id]/regions/global/default` + // `https://www.googleapis.com/compute/v1/projects/[project_id]/global/ne + // tworks/default` * `projects/[project_id]/global/networks/default` // Runtimes are managed resources inside Google Infrastructure. Runtimes // support the following network configurations: * Google Managed // Network (Network & subnet are empty) * Consumer Project VPC (network diff --git a/ondemandscanning/v1/ondemandscanning-api.json b/ondemandscanning/v1/ondemandscanning-api.json index 784d9ee4dca..1894f29118a 100644 --- a/ondemandscanning/v1/ondemandscanning-api.json +++ b/ondemandscanning/v1/ondemandscanning-api.json @@ -339,7 +339,7 @@ } } }, - "revision": "20220711", + "revision": "20220730", "rootUrl": "https://ondemandscanning.googleapis.com/", "schemas": { "AliasContext": { @@ -956,8 +956,8 @@ "ANALYSIS_STATUS_UNSPECIFIED", "PENDING", "SCANNING", - "FINISHED_SUCCESS", "COMPLETE", + "FINISHED_SUCCESS", "FINISHED_FAILED", "FINISHED_UNSUPPORTED" ], @@ -965,8 +965,8 @@ "Unknown.", "Resource is known but no action has been taken yet.", "Resource is being analyzed.", - "Analysis has finished successfully.", "Analysis has completed", + "Analysis has finished successfully.", "Analysis has finished unsuccessfully, the analysis itself is in a bad state.", "The resource is known not to be supported." ], diff --git a/ondemandscanning/v1/ondemandscanning-gen.go b/ondemandscanning/v1/ondemandscanning-gen.go index 30c5ac6218c..30adf9b7800 100644 --- a/ondemandscanning/v1/ondemandscanning-gen.go +++ b/ondemandscanning/v1/ondemandscanning-gen.go @@ -1073,8 +1073,8 @@ type DiscoveryOccurrence struct { // "ANALYSIS_STATUS_UNSPECIFIED" - Unknown. // "PENDING" - Resource is known but no action has been taken yet. // "SCANNING" - Resource is being analyzed. - // "FINISHED_SUCCESS" - Analysis has finished successfully. // "COMPLETE" - Analysis has completed + // "FINISHED_SUCCESS" - Analysis has finished successfully. // "FINISHED_FAILED" - Analysis has finished unsuccessfully, the // analysis itself is in a bad state. // "FINISHED_UNSUPPORTED" - The resource is known not to be supported. diff --git a/ondemandscanning/v1beta1/ondemandscanning-api.json b/ondemandscanning/v1beta1/ondemandscanning-api.json index 6208752485f..11e2a348d8d 100644 --- a/ondemandscanning/v1beta1/ondemandscanning-api.json +++ b/ondemandscanning/v1beta1/ondemandscanning-api.json @@ -339,7 +339,7 @@ } } }, - "revision": "20220711", + "revision": "20220730", "rootUrl": "https://ondemandscanning.googleapis.com/", "schemas": { "AliasContext": { @@ -952,8 +952,8 @@ "ANALYSIS_STATUS_UNSPECIFIED", "PENDING", "SCANNING", - "FINISHED_SUCCESS", "COMPLETE", + "FINISHED_SUCCESS", "FINISHED_FAILED", "FINISHED_UNSUPPORTED" ], @@ -961,8 +961,8 @@ "Unknown.", "Resource is known but no action has been taken yet.", "Resource is being analyzed.", - "Analysis has finished successfully.", "Analysis has completed", + "Analysis has finished successfully.", "Analysis has finished unsuccessfully, the analysis itself is in a bad state.", "The resource is known not to be supported." ], diff --git a/ondemandscanning/v1beta1/ondemandscanning-gen.go b/ondemandscanning/v1beta1/ondemandscanning-gen.go index f71aaaf0e3b..568838171a9 100644 --- a/ondemandscanning/v1beta1/ondemandscanning-gen.go +++ b/ondemandscanning/v1beta1/ondemandscanning-gen.go @@ -1067,8 +1067,8 @@ type DiscoveryOccurrence struct { // "ANALYSIS_STATUS_UNSPECIFIED" - Unknown. // "PENDING" - Resource is known but no action has been taken yet. // "SCANNING" - Resource is being analyzed. - // "FINISHED_SUCCESS" - Analysis has finished successfully. // "COMPLETE" - Analysis has completed + // "FINISHED_SUCCESS" - Analysis has finished successfully. // "FINISHED_FAILED" - Analysis has finished unsuccessfully, the // analysis itself is in a bad state. // "FINISHED_UNSUPPORTED" - The resource is known not to be supported. diff --git a/realtimebidding/v1/realtimebidding-api.json b/realtimebidding/v1/realtimebidding-api.json index 1f940f93238..f237474461b 100644 --- a/realtimebidding/v1/realtimebidding-api.json +++ b/realtimebidding/v1/realtimebidding-api.json @@ -1305,7 +1305,7 @@ } } }, - "revision": "20220608", + "revision": "20220802", "rootUrl": "https://realtimebidding.googleapis.com/", "schemas": { "ActivatePretargetingConfigRequest": { @@ -1820,7 +1820,7 @@ "type": "array" }, "version": { - "description": "Output only. The version of this creative. Version for a new creative is 1 and it increments during subsequent creative updates.", + "description": "Output only. The version of the creative. Version for a new creative is 1 and it increments during subsequent creative updates.", "format": "int32", "readOnly": true, "type": "integer" diff --git a/realtimebidding/v1/realtimebidding-gen.go b/realtimebidding/v1/realtimebidding-gen.go index b0add925252..3679ca7464d 100644 --- a/realtimebidding/v1/realtimebidding-gen.go +++ b/realtimebidding/v1/realtimebidding-gen.go @@ -967,7 +967,7 @@ type Creative struct { // "ALCOHOL" - The alcohol restricted category. RestrictedCategories []string `json:"restrictedCategories,omitempty"` - // Version: Output only. The version of this creative. Version for a new + // Version: Output only. The version of the creative. Version for a new // creative is 1 and it increments during subsequent creative updates. Version int64 `json:"version,omitempty"` diff --git a/recaptchaenterprise/v1/recaptchaenterprise-api.json b/recaptchaenterprise/v1/recaptchaenterprise-api.json index 2300b80d537..f3f1770ac32 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-api.json +++ b/recaptchaenterprise/v1/recaptchaenterprise-api.json @@ -371,7 +371,7 @@ ] }, "retrieveLegacySecretKey": { - "description": "Returns the secret key related to the specified public key. You should use the legacy secret key only if you are integrating with a 3rd party using the legacy reCAPTCHA instead of reCAPTCHA Enterprise.", + "description": "Returns the secret key related to the specified public key. You must use the legacy secret key only in a 3rd party integration with legacy reCAPTCHA.", "flatPath": "v1/projects/{projectsId}/keys/{keysId}:retrieveLegacySecretKey", "httpMethod": "GET", "id": "recaptchaenterprise.projects.keys.retrieveLegacySecretKey", @@ -380,7 +380,7 @@ ], "parameters": { "key": { - "description": "Required. The public key name linked to the requested secret key , in the format \"projects/{project}/keys/{key}\".", + "description": "Required. The public key name linked to the requested secret key in the format \"projects/{project}/keys/{key}\".", "location": "path", "pattern": "^projects/[^/]+/keys/[^/]+$", "required": true, @@ -409,7 +409,7 @@ ], "parameters": { "project": { - "description": "Required. The name of the project to search related account group memberships from, in the format \"projects/{project}\".", + "description": "Required. The name of the project to search related account group memberships from. Specify the project name in the following format: \"projects/{project}\".", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -441,7 +441,7 @@ ], "parameters": { "pageSize": { - "description": "Optional. The maximum number of groups to return. The service may return fewer than this value. If unspecified, at most 50 groups will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "description": "Optional. The maximum number of groups to return. The service might return fewer than this value. If unspecified, at most 50 groups are returned. The maximum value is 1000; values above 1000 are coerced to 1000.", "format": "int32", "location": "query", "type": "integer" @@ -472,7 +472,7 @@ "memberships": { "methods": { "list": { - "description": "Get the memberships in a group of related accounts.", + "description": "Get memberships in a group of related accounts.", "flatPath": "v1/projects/{projectsId}/relatedaccountgroups/{relatedaccountgroupsId}/memberships", "httpMethod": "GET", "id": "recaptchaenterprise.projects.relatedaccountgroups.memberships.list", @@ -481,7 +481,7 @@ ], "parameters": { "pageSize": { - "description": "Optional. The maximum number of accounts to return. The service may return fewer than this value. If unspecified, at most 50 accounts will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "description": "Optional. The maximum number of accounts to return. The service might return fewer than this value. If unspecified, at most 50 accounts are returned. The maximum value is 1000; values above 1000 are coerced to 1000.", "format": "int32", "location": "query", "type": "integer" @@ -514,11 +514,11 @@ } } }, - "revision": "20220722", + "revision": "20220730", "rootUrl": "https://recaptchaenterprise.googleapis.com/", "schemas": { "GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment": { - "description": "Account Defender risk assessment.", + "description": "Account defender risk assessment.", "id": "GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment", "properties": { "labels": { @@ -534,9 +534,9 @@ "enumDescriptions": [ "Default unspecified type.", "The request matches a known good profile for the user.", - "The request is potentially a suspicious login event and should be further verified either via multi-factor authentication or another system.", - "The request matched a profile that previously had suspicious account creation behavior. This could mean this is a fake account.", - "The account in the request has a high number of related accounts. It does not necessarily imply that the account is bad but could require investigating." + "The request is potentially a suspicious login event and must be further verified either through multi-factor authentication or another system.", + "The request matched a profile that previously had suspicious account creation behavior. This can mean that this is a fake account.", + "The account in the request has a high number of related accounts. It does not necessarily imply that the account is bad but can require further investigation." ], "type": "string" }, @@ -586,7 +586,7 @@ "type": "string" }, "hashedAccountId": { - "description": "Optional. Optional unique stable hashed user identifier to apply to the assessment. This is an alternative to setting the hashed_account_id in CreateAssessment, for example when the account identifier is not yet known in the initial request. It is recommended that the identifier is hashed using hmac-sha256 with stable secret.", + "description": "Optional. Unique stable hashed user identifier to apply to the assessment. This is an alternative to setting the hashed_account_id in CreateAssessment, for example when the account identifier is not yet known in the initial request. It is recommended that the identifier is hashed using hmac-sha256 with stable secret.", "format": "byte", "type": "string" }, @@ -609,11 +609,11 @@ ], "enumDescriptions": [ "Default unspecified reason.", - "Indicates a chargeback issued for the transaction with no other details. When possible, specify the type by using CHARGEBACK_FRAUD or CHARGEBACK_DISPUTE instead.", + "Indicates a chargeback issued for a transaction with no other details. When possible, specify the type by using CHARGEBACK_FRAUD or CHARGEBACK_DISPUTE instead.", "Indicates a chargeback related to an alleged unauthorized transaction from the cardholder's perspective (for example, the card number was stolen).", "Indicates a chargeback related to the cardholder having provided their card details but allegedly not being satisfied with the purchase (for example, misrepresentation, attempted cancellation).", - "Indicates a completed payment transaction was refunded by the seller.", - "Indicates a completed payment transaction was determined to be fraudulent by the seller, and was cancelled and refunded as a result.", + "Indicates a refund of the complete payment by the seller.", + "Indicates that a complete payment transaction was determined to be fraudulent by the seller, and was cancelled and refunded as a result.", "Indicates the transaction associated with the assessment is suspected of being fraudulent based on the payment method, billing details, shipping address or other transaction information.", "Indicates that the user was served a 2FA challenge. An old assessment with `ENUM_VALUES.INITIATED_TWO_FACTOR` reason that has not been overwritten with `PASSED_TWO_FACTOR` is treated as an abandoned 2FA flow. This is equivalent to `FAILED_TWO_FACTOR`.", "Indicates that the user passed a 2FA challenge.", @@ -640,7 +640,7 @@ "properties": { "accountDefenderAssessment": { "$ref": "GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment", - "description": "Assessment returned by Account Defender when a hashed_account_id is provided." + "description": "Assessment returned by account defender when a hashed_account_id is provided." }, "event": { "$ref": "GoogleCloudRecaptchaenterpriseV1Event", @@ -653,7 +653,7 @@ }, "privatePasswordLeakVerification": { "$ref": "GoogleCloudRecaptchaenterpriseV1PrivatePasswordLeakVerification", - "description": "The private password leak verification field contains the parameters used to check for leaks privately without sharing user credentials." + "description": "The private password leak verification field contains the parameters that are used to to check for leaks privately without sharing user credentials." }, "riskAnalysis": { "$ref": "GoogleCloudRecaptchaenterpriseV1RiskAnalysis", @@ -703,7 +703,7 @@ "type": "string" }, "hashedAccountId": { - "description": "Optional. Optional unique stable hashed user identifier for the request. The identifier should ideally be hashed using sha256 with stable secret.", + "description": "Optional. Unique stable hashed user identifier for the request. The identifier must be hashed using hmac-sha256 with stable secret.", "format": "byte", "type": "string" }, @@ -887,7 +887,7 @@ "id": "GoogleCloudRecaptchaenterpriseV1PrivatePasswordLeakVerification", "properties": { "encryptedLeakMatchPrefixes": { - "description": "Output only. List of prefixes of the encrypted potential password leaks that matched the given parameters. They should be compared with the client-side decryption prefix of `reencrypted_user_credentials_hash`", + "description": "Output only. List of prefixes of the encrypted potential password leaks that matched the given parameters. They must be compared with the client-side decryption prefix of `reencrypted_user_credentials_hash`", "items": { "format": "byte", "type": "string" @@ -906,7 +906,7 @@ "type": "string" }, "reencryptedUserCredentialsHash": { - "description": "Output only. Corresponds to the re-encryption of the `encrypted_user_credentials_hash` field. Used to match potential password leaks within `encrypted_leak_match_prefixes`.", + "description": "Output only. Corresponds to the re-encryption of the `encrypted_user_credentials_hash` field. It is used to match potential password leaks within `encrypted_leak_match_prefixes`.", "format": "byte", "readOnly": true, "type": "string" @@ -930,7 +930,7 @@ "id": "GoogleCloudRecaptchaenterpriseV1RelatedAccountGroupMembership", "properties": { "hashedAccountId": { - "description": "The unique stable hashed user identifier of the member. The identifier corresponds to a `hashed_account_id` provided in a previous CreateAssessment or AnnotateAssessment call.", + "description": "The unique stable hashed user identifier of the member. The identifier corresponds to a `hashed_account_id` provided in a previous `CreateAssessment` or `AnnotateAssessment` call.", "format": "byte", "type": "string" }, @@ -942,7 +942,7 @@ "type": "object" }, "GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse": { - "description": "Secret key used in legacy reCAPTCHA only. Should be used when integrating with a 3rd party which is still using legacy reCAPTCHA.", + "description": "Secret key is used only in legacy reCAPTCHA. It must be used in a 3rd party integration with legacy reCAPTCHA.", "id": "GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse", "properties": { "legacySecretKey": { @@ -1025,12 +1025,12 @@ "id": "GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsRequest", "properties": { "hashedAccountId": { - "description": "Optional. The unique stable hashed user identifier we should search connections to. The identifier should correspond to a `hashed_account_id` provided in a previous CreateAssessment or AnnotateAssessment call.", + "description": "Optional. The unique stable hashed user identifier we should search connections to. The identifier should correspond to a `hashed_account_id` provided in a previous `CreateAssessment` or `AnnotateAssessment` call.", "format": "byte", "type": "string" }, "pageSize": { - "description": "Optional. The maximum number of groups to return. The service may return fewer than this value. If unspecified, at most 50 groups will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "description": "Optional. The maximum number of groups to return. The service might return fewer than this value. If unspecified, at most 50 groups are returned. The maximum value is 1000; values above 1000 are coerced to 1000.", "format": "int32", "type": "integer" }, diff --git a/recaptchaenterprise/v1/recaptchaenterprise-gen.go b/recaptchaenterprise/v1/recaptchaenterprise-gen.go index 4d996bb7a86..c8106bc4f52 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-gen.go +++ b/recaptchaenterprise/v1/recaptchaenterprise-gen.go @@ -207,7 +207,7 @@ type ProjectsRelatedaccountgroupsMembershipsService struct { } // GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment: Account -// Defender risk assessment. +// defender risk assessment. type GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment struct { // Labels: Labels for this request. // @@ -216,14 +216,14 @@ type GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment struct { // "PROFILE_MATCH" - The request matches a known good profile for the // user. // "SUSPICIOUS_LOGIN_ACTIVITY" - The request is potentially a - // suspicious login event and should be further verified either via + // suspicious login event and must be further verified either through // multi-factor authentication or another system. // "SUSPICIOUS_ACCOUNT_CREATION" - The request matched a profile that - // previously had suspicious account creation behavior. This could mean - // this is a fake account. + // previously had suspicious account creation behavior. This can mean + // that this is a fake account. // "RELATED_ACCOUNTS_NUMBER_HIGH" - The account in the request has a // high number of related accounts. It does not necessarily imply that - // the account is bad but could require investigating. + // the account is bad but can require further investigation. Labels []string `json:"labels,omitempty"` // ForceSendFields is a list of field names (e.g. "Labels") to @@ -309,12 +309,11 @@ type GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest struct { // the reasons field instead. Annotation string `json:"annotation,omitempty"` - // HashedAccountId: Optional. Optional unique stable hashed user - // identifier to apply to the assessment. This is an alternative to - // setting the hashed_account_id in CreateAssessment, for example when - // the account identifier is not yet known in the initial request. It is - // recommended that the identifier is hashed using hmac-sha256 with - // stable secret. + // HashedAccountId: Optional. Unique stable hashed user identifier to + // apply to the assessment. This is an alternative to setting the + // hashed_account_id in CreateAssessment, for example when the account + // identifier is not yet known in the initial request. It is recommended + // that the identifier is hashed using hmac-sha256 with stable secret. HashedAccountId string `json:"hashedAccountId,omitempty"` // Reasons: Optional. Optional reasons for the annotation that will be @@ -322,8 +321,8 @@ type GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest struct { // // Possible values: // "REASON_UNSPECIFIED" - Default unspecified reason. - // "CHARGEBACK" - Indicates a chargeback issued for the transaction - // with no other details. When possible, specify the type by using + // "CHARGEBACK" - Indicates a chargeback issued for a transaction with + // no other details. When possible, specify the type by using // CHARGEBACK_FRAUD or CHARGEBACK_DISPUTE instead. // "CHARGEBACK_FRAUD" - Indicates a chargeback related to an alleged // unauthorized transaction from the cardholder's perspective (for @@ -332,9 +331,9 @@ type GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest struct { // cardholder having provided their card details but allegedly not being // satisfied with the purchase (for example, misrepresentation, // attempted cancellation). - // "REFUND" - Indicates a completed payment transaction was refunded - // by the seller. - // "REFUND_FRAUD" - Indicates a completed payment transaction was + // "REFUND" - Indicates a refund of the complete payment by the + // seller. + // "REFUND_FRAUD" - Indicates that a complete payment transaction was // determined to be fraudulent by the seller, and was cancelled and // refunded as a result. // "PAYMENT_HEURISTICS" - Indicates the transaction associated with @@ -390,7 +389,7 @@ type GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse struct { // GoogleCloudRecaptchaenterpriseV1Assessment: A recaptcha assessment // resource. type GoogleCloudRecaptchaenterpriseV1Assessment struct { - // AccountDefenderAssessment: Assessment returned by Account Defender + // AccountDefenderAssessment: Assessment returned by account defender // when a hashed_account_id is provided. AccountDefenderAssessment *GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment `json:"accountDefenderAssessment,omitempty"` @@ -402,8 +401,8 @@ type GoogleCloudRecaptchaenterpriseV1Assessment struct { Name string `json:"name,omitempty"` // PrivatePasswordLeakVerification: The private password leak - // verification field contains the parameters used to check for leaks - // privately without sharing user credentials. + // verification field contains the parameters that are used to to check + // for leaks privately without sharing user credentials. PrivatePasswordLeakVerification *GoogleCloudRecaptchaenterpriseV1PrivatePasswordLeakVerification `json:"privatePasswordLeakVerification,omitempty"` // RiskAnalysis: Output only. The risk analysis result for the event @@ -493,9 +492,9 @@ type GoogleCloudRecaptchaenterpriseV1Event struct { // client-side platforms already integrated with recaptcha enterprise. ExpectedAction string `json:"expectedAction,omitempty"` - // HashedAccountId: Optional. Optional unique stable hashed user - // identifier for the request. The identifier should ideally be hashed - // using sha256 with stable secret. + // HashedAccountId: Optional. Unique stable hashed user identifier for + // the request. The identifier must be hashed using hmac-sha256 with + // stable secret. HashedAccountId string `json:"hashedAccountId,omitempty"` // SiteKey: Optional. The site key that was used to invoke reCAPTCHA on @@ -805,7 +804,7 @@ type GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest struct { type GoogleCloudRecaptchaenterpriseV1PrivatePasswordLeakVerification struct { // EncryptedLeakMatchPrefixes: Output only. List of prefixes of the // encrypted potential password leaks that matched the given parameters. - // They should be compared with the client-side decryption prefix of + // They must be compared with the client-side decryption prefix of // `reencrypted_user_credentials_hash` EncryptedLeakMatchPrefixes []string `json:"encryptedLeakMatchPrefixes,omitempty"` @@ -820,8 +819,8 @@ type GoogleCloudRecaptchaenterpriseV1PrivatePasswordLeakVerification struct { LookupHashPrefix string `json:"lookupHashPrefix,omitempty"` // ReencryptedUserCredentialsHash: Output only. Corresponds to the - // re-encryption of the `encrypted_user_credentials_hash` field. Used to - // match potential password leaks within + // re-encryption of the `encrypted_user_credentials_hash` field. It is + // used to match potential password leaks within // `encrypted_leak_match_prefixes`. ReencryptedUserCredentialsHash string `json:"reencryptedUserCredentialsHash,omitempty"` @@ -886,7 +885,7 @@ func (s *GoogleCloudRecaptchaenterpriseV1RelatedAccountGroup) MarshalJSON() ([]b type GoogleCloudRecaptchaenterpriseV1RelatedAccountGroupMembership struct { // HashedAccountId: The unique stable hashed user identifier of the // member. The identifier corresponds to a `hashed_account_id` provided - // in a previous CreateAssessment or AnnotateAssessment call. + // in a previous `CreateAssessment` or `AnnotateAssessment` call. HashedAccountId string `json:"hashedAccountId,omitempty"` // Name: Required. The resource name for this membership in the format @@ -919,8 +918,8 @@ func (s *GoogleCloudRecaptchaenterpriseV1RelatedAccountGroupMembership) MarshalJ } // GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse: -// Secret key used in legacy reCAPTCHA only. Should be used when -// integrating with a 3rd party which is still using legacy reCAPTCHA. +// Secret key is used only in legacy reCAPTCHA. It must be used in a 3rd +// party integration with legacy reCAPTCHA. type GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse struct { // LegacySecretKey: The secret key (also known as shared secret) // authorizes communication between your application backend and the @@ -1088,14 +1087,14 @@ func (s *GoogleCloudRecaptchaenterpriseV1ScoreMetrics) MarshalJSON() ([]byte, er type GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsRequest struct { // HashedAccountId: Optional. The unique stable hashed user identifier // we should search connections to. The identifier should correspond to - // a `hashed_account_id` provided in a previous CreateAssessment or - // AnnotateAssessment call. + // a `hashed_account_id` provided in a previous `CreateAssessment` or + // `AnnotateAssessment` call. HashedAccountId string `json:"hashedAccountId,omitempty"` // PageSize: Optional. The maximum number of groups to return. The - // service may return fewer than this value. If unspecified, at most 50 - // groups will be returned. The maximum value is 1000; values above 1000 - // will be coerced to 1000. + // service might return fewer than this value. If unspecified, at most + // 50 groups are returned. The maximum value is 1000; values above 1000 + // are coerced to 1000. PageSize int64 `json:"pageSize,omitempty"` // PageToken: Optional. A page token, received from a previous @@ -2792,12 +2791,11 @@ type ProjectsKeysRetrieveLegacySecretKeyCall struct { } // RetrieveLegacySecretKey: Returns the secret key related to the -// specified public key. You should use the legacy secret key only if -// you are integrating with a 3rd party using the legacy reCAPTCHA -// instead of reCAPTCHA Enterprise. +// specified public key. You must use the legacy secret key only in a +// 3rd party integration with legacy reCAPTCHA. // -// - key: The public key name linked to the requested secret key , in -// the format "projects/{project}/keys/{key}". +// - key: The public key name linked to the requested secret key in the +// format "projects/{project}/keys/{key}". func (r *ProjectsKeysService) RetrieveLegacySecretKey(key string) *ProjectsKeysRetrieveLegacySecretKeyCall { c := &ProjectsKeysRetrieveLegacySecretKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.key = key @@ -2906,7 +2904,7 @@ func (c *ProjectsKeysRetrieveLegacySecretKeyCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Returns the secret key related to the specified public key. You should use the legacy secret key only if you are integrating with a 3rd party using the legacy reCAPTCHA instead of reCAPTCHA Enterprise.", + // "description": "Returns the secret key related to the specified public key. You must use the legacy secret key only in a 3rd party integration with legacy reCAPTCHA.", // "flatPath": "v1/projects/{projectsId}/keys/{keysId}:retrieveLegacySecretKey", // "httpMethod": "GET", // "id": "recaptchaenterprise.projects.keys.retrieveLegacySecretKey", @@ -2915,7 +2913,7 @@ func (c *ProjectsKeysRetrieveLegacySecretKeyCall) Do(opts ...googleapi.CallOptio // ], // "parameters": { // "key": { - // "description": "Required. The public key name linked to the requested secret key , in the format \"projects/{project}/keys/{key}\".", + // "description": "Required. The public key name linked to the requested secret key in the format \"projects/{project}/keys/{key}\".", // "location": "path", // "pattern": "^projects/[^/]+/keys/[^/]+$", // "required": true, @@ -2947,7 +2945,8 @@ type ProjectsRelatedaccountgroupmembershipsSearchCall struct { // Search: Search group memberships related to a given account. // // - project: The name of the project to search related account group -// memberships from, in the format "projects/{project}". +// memberships from. Specify the project name in the following format: +// "projects/{project}". func (r *ProjectsRelatedaccountgroupmembershipsService) Search(project string, googlecloudrecaptchaenterprisev1searchrelatedaccountgroupmembershipsrequest *GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsRequest) *ProjectsRelatedaccountgroupmembershipsSearchCall { c := &ProjectsRelatedaccountgroupmembershipsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -3058,7 +3057,7 @@ func (c *ProjectsRelatedaccountgroupmembershipsSearchCall) Do(opts ...googleapi. // ], // "parameters": { // "project": { - // "description": "Required. The name of the project to search related account group memberships from, in the format \"projects/{project}\".", + // "description": "Required. The name of the project to search related account group memberships from. Specify the project name in the following format: \"projects/{project}\".", // "location": "path", // "pattern": "^projects/[^/]+$", // "required": true, @@ -3124,9 +3123,9 @@ func (r *ProjectsRelatedaccountgroupsService) List(parent string) *ProjectsRelat } // PageSize sets the optional parameter "pageSize": The maximum number -// of groups to return. The service may return fewer than this value. If -// unspecified, at most 50 groups will be returned. The maximum value is -// 1000; values above 1000 will be coerced to 1000. +// of groups to return. The service might return fewer than this value. +// If unspecified, at most 50 groups are returned. The maximum value is +// 1000; values above 1000 are coerced to 1000. func (c *ProjectsRelatedaccountgroupsListCall) PageSize(pageSize int64) *ProjectsRelatedaccountgroupsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -3253,7 +3252,7 @@ func (c *ProjectsRelatedaccountgroupsListCall) Do(opts ...googleapi.CallOption) // ], // "parameters": { // "pageSize": { - // "description": "Optional. The maximum number of groups to return. The service may return fewer than this value. If unspecified, at most 50 groups will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "description": "Optional. The maximum number of groups to return. The service might return fewer than this value. If unspecified, at most 50 groups are returned. The maximum value is 1000; values above 1000 are coerced to 1000.", // "format": "int32", // "location": "query", // "type": "integer" @@ -3314,7 +3313,7 @@ type ProjectsRelatedaccountgroupsMembershipsListCall struct { header_ http.Header } -// List: Get the memberships in a group of related accounts. +// List: Get memberships in a group of related accounts. // // - parent: The resource name for the related account group in the // format @@ -3326,9 +3325,9 @@ func (r *ProjectsRelatedaccountgroupsMembershipsService) List(parent string) *Pr } // PageSize sets the optional parameter "pageSize": The maximum number -// of accounts to return. The service may return fewer than this value. -// If unspecified, at most 50 accounts will be returned. The maximum -// value is 1000; values above 1000 will be coerced to 1000. +// of accounts to return. The service might return fewer than this +// value. If unspecified, at most 50 accounts are returned. The maximum +// value is 1000; values above 1000 are coerced to 1000. func (c *ProjectsRelatedaccountgroupsMembershipsListCall) PageSize(pageSize int64) *ProjectsRelatedaccountgroupsMembershipsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -3446,7 +3445,7 @@ func (c *ProjectsRelatedaccountgroupsMembershipsListCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Get the memberships in a group of related accounts.", + // "description": "Get memberships in a group of related accounts.", // "flatPath": "v1/projects/{projectsId}/relatedaccountgroups/{relatedaccountgroupsId}/memberships", // "httpMethod": "GET", // "id": "recaptchaenterprise.projects.relatedaccountgroups.memberships.list", @@ -3455,7 +3454,7 @@ func (c *ProjectsRelatedaccountgroupsMembershipsListCall) Do(opts ...googleapi.C // ], // "parameters": { // "pageSize": { - // "description": "Optional. The maximum number of accounts to return. The service may return fewer than this value. If unspecified, at most 50 accounts will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "description": "Optional. The maximum number of accounts to return. The service might return fewer than this value. If unspecified, at most 50 accounts are returned. The maximum value is 1000; values above 1000 are coerced to 1000.", // "format": "int32", // "location": "query", // "type": "integer" diff --git a/retail/v2/retail-api.json b/retail/v2/retail-api.json index 2dbb3c9b0af..6c9f30a1759 100644 --- a/retail/v2/retail-api.json +++ b/retail/v2/retail-api.json @@ -168,6 +168,56 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getAttributesConfig": { + "description": "Gets an AttributesConfig.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig", + "httpMethod": "GET", + "id": "retail.projects.locations.catalogs.getAttributesConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full AttributesConfig resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudRetailV2AttributesConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getCompletionConfig": { + "description": "Gets a CompletionConfig.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", + "httpMethod": "GET", + "id": "retail.projects.locations.catalogs.getCompletionConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full CompletionConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudRetailV2CompletionConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "getDefaultBranch": { "description": "Get which branch is currently default branch set by CatalogService.SetDefaultBranch method under a specified parent catalog.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}:getDefaultBranch", @@ -290,9 +340,137 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "updateAttributesConfig": { + "description": "Updates the AttributesConfig. The catalog attributes in the request will be updated in the catalog, or inserted if they do not exist. Existing catalog attributes not included in the request will remain unchanged. Attributes that are assigned to products, but do not exist at the catalog level, are always included in the response. The product attribute is assigned default values for missing catalog attribute fields, e.g., searchable and dynamic facetable options.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig", + "httpMethod": "PATCH", + "id": "retail.projects.locations.catalogs.updateAttributesConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Immutable. The fully qualified resource name of the attribute config. Format: `projects/*/locations/*/catalogs/*/attributesConfig`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided AttributesConfig to update. The following is the only supported field: * AttributesConfig.catalog_attributes If not set, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GoogleCloudRetailV2AttributesConfig" + }, + "response": { + "$ref": "GoogleCloudRetailV2AttributesConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "updateCompletionConfig": { + "description": "Updates the CompletionConfigs.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", + "httpMethod": "PATCH", + "id": "retail.projects.locations.catalogs.updateCompletionConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Immutable. Fully qualified name `projects/*/locations/*/catalogs/*/completionConfig`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided CompletionConfig to update. The following are the only supported fields: * CompletionConfig.matching_order * CompletionConfig.max_suggestions * CompletionConfig.min_prefix_length * CompletionConfig.auto_learning If not set, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GoogleCloudRetailV2CompletionConfig" + }, + "response": { + "$ref": "GoogleCloudRetailV2CompletionConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { + "attributesConfig": { + "methods": { + "addCatalogAttribute": { + "description": "Adds the specified CatalogAttribute to the AttributesConfig. If the CatalogAttribute to add already exists, an ALREADY_EXISTS error is returned.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:addCatalogAttribute", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute", + "parameterOrder": [ + "attributesConfig" + ], + "parameters": { + "attributesConfig": { + "description": "Required. Full AttributesConfig resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+attributesConfig}:addCatalogAttribute", + "request": { + "$ref": "GoogleCloudRetailV2AddCatalogAttributeRequest" + }, + "response": { + "$ref": "GoogleCloudRetailV2AttributesConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "removeCatalogAttribute": { + "description": "Removes the specified CatalogAttribute from the AttributesConfig. If the CatalogAttribute to remove does not exist, a NOT_FOUND error is returned.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:removeCatalogAttribute", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.attributesConfig.removeCatalogAttribute", + "parameterOrder": [ + "attributesConfig" + ], + "parameters": { + "attributesConfig": { + "description": "Required. Full AttributesConfig resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+attributesConfig}:removeCatalogAttribute", + "request": { + "$ref": "GoogleCloudRetailV2RemoveCatalogAttributeRequest" + }, + "response": { + "$ref": "GoogleCloudRetailV2AttributesConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "branches": { "resources": { "operations": { @@ -1193,7 +1371,7 @@ } } }, - "revision": "20220722", + "revision": "20220729", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -1346,6 +1524,17 @@ }, "type": "object" }, + "GoogleCloudRetailV2AddCatalogAttributeRequest": { + "description": "Request for CatalogService.AddCatalogAttribute method.", + "id": "GoogleCloudRetailV2AddCatalogAttributeRequest", + "properties": { + "catalogAttribute": { + "$ref": "GoogleCloudRetailV2CatalogAttribute", + "description": "Required. The CatalogAttribute to add." + } + }, + "type": "object" + }, "GoogleCloudRetailV2AddFulfillmentPlacesMetadata": { "description": "Metadata related to the progress of the AddFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddFulfillmentPlaces method.", "id": "GoogleCloudRetailV2AddFulfillmentPlacesMetadata", @@ -1425,6 +1614,39 @@ "properties": {}, "type": "object" }, + "GoogleCloudRetailV2AttributesConfig": { + "description": "Catalog level attribute config.", + "id": "GoogleCloudRetailV2AttributesConfig", + "properties": { + "attributeConfigLevel": { + "description": "Output only. The AttributeConfigLevel used for this catalog.", + "enum": [ + "ATTRIBUTE_CONFIG_LEVEL_UNSPECIFIED", + "PRODUCT_LEVEL_ATTRIBUTE_CONFIG", + "CATALOG_LEVEL_ATTRIBUTE_CONFIG" + ], + "enumDescriptions": [ + "Value used when unset. Defaults to CATALOG_LEVEL_ATTRIBUTE_CONFIG.", + "At this level, we honor the attribute configurations set in Product.attributes.", + "At this level, we honor the attribute configurations set in CatalogConfig.attribute_configs." + ], + "readOnly": true, + "type": "string" + }, + "catalogAttributes": { + "additionalProperties": { + "$ref": "GoogleCloudRetailV2CatalogAttribute" + }, + "description": "Enable attribute(s) config at catalog level. For example, indexable, dynamic_facetable, or searchable for each attribute. The key is catalog attribute's name. For example: `color`, `brands`, `attributes.custom_attribute`, such as `attributes.xyz`. The maximum number of catalog attributes allowed in a request is 1000.", + "type": "object" + }, + "name": { + "description": "Required. Immutable. The fully qualified resource name of the attribute config. Format: `projects/*/locations/*/catalogs/*/attributesConfig`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2Audience": { "description": "An intended audience of the Product for whom it's sold.", "id": "GoogleCloudRetailV2Audience", @@ -1451,7 +1673,7 @@ "id": "GoogleCloudRetailV2BigQuerySource", "properties": { "dataSchema": { - "description": "The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: The schema is available here: https://support.google.com/analytics/answer/3437719. * `user_event_ga4`: This feature is in private preview. Please contact the support team for importing Google Analytics 4 events. The schema is available here: https://support.google.com/analytics/answer/7029846. Supported values for auto-completion imports: * `suggestions` (default): One JSON completion suggestion per line. * `denylist`: One JSON deny suggestion per line. * `allowlist`: One JSON allow suggestion per line.", + "description": "The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: The schema is available here: https://support.google.com/analytics/answer/3437719. * `user_event_ga4`: The schema is available here: https://support.google.com/analytics/answer/7029846. Supported values for auto-completion imports: * `suggestions` (default): One JSON completion suggestion per line. * `denylist`: One JSON deny suggestion per line. * `allowlist`: One JSON allow suggestion per line.", "type": "string" }, "datasetId": { @@ -1464,7 +1686,7 @@ }, "partitionDate": { "$ref": "GoogleTypeDate", - "description": "BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. Only supported when ImportProductsRequest.reconciliation_mode is set to `FULL`." + "description": "BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. Only supported in ImportProductsRequest." }, "projectId": { "description": "The project ID (can be project # or ID) that the BigQuery source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", @@ -1496,6 +1718,79 @@ }, "type": "object" }, + "GoogleCloudRetailV2CatalogAttribute": { + "description": "Catalog level attribute config for an attribute. For example, if customers want to enable/disable facet for a specific attribute.", + "id": "GoogleCloudRetailV2CatalogAttribute", + "properties": { + "dynamicFacetableOption": { + "description": "If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if CatalogAttribute.indexable_option is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned.", + "enum": [ + "DYNAMIC_FACETABLE_OPTION_UNSPECIFIED", + "DYNAMIC_FACETABLE_ENABLED", + "DYNAMIC_FACETABLE_DISABLED" + ], + "enumDescriptions": [ + "Value used when unset. Defaults to DYNAMIC_FACETABLE_ENABLED.", + "Dynamic facetable option enabled for an attribute.", + "Dynamic facetable option disabled for an attribute." + ], + "type": "string" + }, + "inUse": { + "description": "Output only. Indicates whether this attribute has been used by any products. `True` if at least one Product is using this attribute in Product.attributes. Otherwise, this field is `False`. CatalogAttribute can be pre-loaded by using CatalogService.AddCatalogAttribute, CatalogService.ImportCatalogAttributes, or CatalogService.UpdateAttributesConfig APIs. This field is `False` for pre-loaded CatalogAttributes. Only pre-loaded CatalogAttributes that are neither in use by products nor predefined can be deleted. CatalogAttributes that are either in use by products or are predefined cannot be deleted; however, their configuration properties will reset to default values upon removal request. After catalog changes, it takes about 10 minutes for this field to update.", + "readOnly": true, + "type": "boolean" + }, + "indexableOption": { + "description": "When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values are indexed so that it can be filtered, faceted, or boosted in SearchService.Search.", + "enum": [ + "INDEXABLE_OPTION_UNSPECIFIED", + "INDEXABLE_ENABLED", + "INDEXABLE_DISABLED" + ], + "enumDescriptions": [ + "Value used when unset. Defaults to INDEXABLE_ENABLED.", + "Indexable option enabled for an attribute.", + "Indexable option disabled for an attribute." + ], + "type": "string" + }, + "key": { + "description": "Required. Attribute name. For example: `color`, `brands`, `attributes.custom_attribute`, such as `attributes.xyz`. To be indexable, the attribute name can contain only alpha-numeric characters and underscores. For example, an attribute named `attributes.abc_xyz` can be indexed, but an attribute named `attributes.abc-xyz` cannot be indexed.", + "type": "string" + }, + "searchableOption": { + "description": "When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values are searchable by text queries in SearchService.Search. If SEARCHABLE_ENABLED but attribute type is numerical, attribute values will not be searchable by text queries in SearchService.Search, as there are no text values associated to numerical attributes.", + "enum": [ + "SEARCHABLE_OPTION_UNSPECIFIED", + "SEARCHABLE_ENABLED", + "SEARCHABLE_DISABLED" + ], + "enumDescriptions": [ + "Value used when unset. Defaults to SEARCHABLE_DISABLED.", + "Searchable option enabled for an attribute.", + "Searchable option disabled for an attribute." + ], + "type": "string" + }, + "type": { + "description": "Output only. The type of this attribute. This is derived from the attribute in Product.attributes.", + "enum": [ + "UNKNOWN", + "TEXTUAL", + "NUMERICAL" + ], + "enumDescriptions": [ + "The type of the attribute is unknown. Used when type cannot be derived from attribute that is not in_use.", + "Textual attribute.", + "Numerical attribute." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2ColorInfo": { "description": "The color information of a Product.", "id": "GoogleCloudRetailV2ColorInfo", @@ -1571,6 +1866,65 @@ }, "type": "object" }, + "GoogleCloudRetailV2CompletionConfig": { + "description": "Catalog level autocomplete config for customers to customize autocomplete feature's settings.", + "id": "GoogleCloudRetailV2CompletionConfig", + "properties": { + "allowlistInputConfig": { + "$ref": "GoogleCloudRetailV2CompletionDataInputConfig", + "description": "Output only. The source data for the latest import of the autocomplete allowlist phrases.", + "readOnly": true + }, + "autoLearning": { + "description": "If set to true, the auto learning function is enabled. Auto learning uses user data to generate suggestions using ML techniques. Default value is false. Only after enabling auto learning can users use `cloud-retail` data in CompleteQueryRequest.", + "type": "boolean" + }, + "denylistInputConfig": { + "$ref": "GoogleCloudRetailV2CompletionDataInputConfig", + "description": "Output only. The source data for the latest import of the autocomplete denylist phrases.", + "readOnly": true + }, + "lastAllowlistImportOperation": { + "description": "Output only. Name of the LRO corresponding to the latest allowlist import. Can use GetOperation API to retrieve the latest state of the Long Running Operation.", + "readOnly": true, + "type": "string" + }, + "lastDenylistImportOperation": { + "description": "Output only. Name of the LRO corresponding to the latest denylist import. Can use GetOperation API to retrieve the latest state of the Long Running Operation.", + "readOnly": true, + "type": "string" + }, + "lastSuggestionsImportOperation": { + "description": "Output only. Name of the LRO corresponding to the latest suggestion terms list import. Can use GetOperation API to retrieve the latest state of the Long Running Operation.", + "readOnly": true, + "type": "string" + }, + "matchingOrder": { + "description": "Specifies the matching order for autocomplete suggestions, e.g., a query consisting of 'sh' with 'out-of-order' specified would suggest \"women's shoes\", whereas a query of 'red s' with 'exact-prefix' specified would suggest \"red shoes\". Currently supported values: * 'out-of-order' * 'exact-prefix' Default value: 'exact-prefix'.", + "type": "string" + }, + "maxSuggestions": { + "description": "The maximum number of autocomplete suggestions returned per term. Default value is 20. If left unset or set to 0, then will fallback to default value. Value range is 1 to 20.", + "format": "int32", + "type": "integer" + }, + "minPrefixLength": { + "description": "The minimum number of characters needed to be typed in order to get suggestions. Default value is 2. If left unset or set to 0, then will fallback to default value. Value range is 1 to 20.", + "format": "int32", + "type": "integer" + }, + "name": { + "description": "Required. Immutable. Fully qualified name `projects/*/locations/*/catalogs/*/completionConfig`", + "type": "string" + }, + "suggestionsInputConfig": { + "$ref": "GoogleCloudRetailV2CompletionDataInputConfig", + "description": "Output only. The source data for the latest import of the autocomplete suggestion phrases.", + "readOnly": true + } + }, + "type": "object" + }, "GoogleCloudRetailV2CompletionDataInputConfig": { "description": "The input config source for completion data.", "id": "GoogleCloudRetailV2CompletionDataInputConfig", @@ -1797,7 +2151,7 @@ "description": "Required. The desired input location of the data." }, "notificationPubsubTopic": { - "description": "Full Pub/Sub topic name for receiving notification. If this field is set, when the import is finished, a notification will be sent to specified Pub/Sub topic. The message data will be JSON string of a Operation. Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has to be within the same project as ImportProductsRequest.parent. Make sure that both `cloud-retail-customer-data-access@system.gserviceaccount.com` and `service-@gcp-sa-retail.iam.gserviceaccount.com` have the `pubsub.topics.publish` IAM permission on the topic. Only supported when ImportProductsRequest.reconciliation_mode is set to `FULL`.", + "description": "Full Pub/Sub topic name for receiving notification. If this field is set, when the import is finished, a notification will be sent to specified Pub/Sub topic. The message data will be JSON string of a Operation. Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has to be within the same project as ImportProductsRequest.parent. Make sure that `service-@gcp-sa-retail.iam.gserviceaccount.com` has the `pubsub.topics.publish` IAM permission on the topic.", "type": "string" }, "reconciliationMode": { @@ -1810,7 +2164,7 @@ "enumDescriptions": [ "Defaults to INCREMENTAL.", "Inserts new products or updates existing products.", - "Calculates diff and replaces the entire product dataset. Existing products may be deleted if they are not present in the source location. Can only be set while using BigQuerySource. And the BigQuery dataset must be created in the data location \"us (multiple regions in United States)\", otherwise a PERMISSION_DENIED error is thrown. Add the IAM permission \"BigQuery Data Viewer\" for cloud-retail-customer-data-access@system.gserviceaccount.com before using this feature otherwise an error is thrown." + "Calculates diff and replaces the entire product dataset. Existing products may be deleted if they are not present in the source location." ], "type": "string" }, @@ -2176,7 +2530,7 @@ "type": "array" }, "collectionMemberIds": { - "description": "The id of the collection members when type is Type.COLLECTION. Non-existent product ids are allowed. The type of the members must be either Type.PRIMARY or Type.VARIANT otherwise and INVALID_ARGUMENT error is thrown. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return.", + "description": "The id of the collection members when type is Type.COLLECTION. Non-existent product ids are allowed. The type of the members must be either Type.PRIMARY or Type.VARIANT otherwise an INVALID_ARGUMENT error is thrown. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return.", "items": { "type": "string" }, @@ -2531,6 +2885,17 @@ }, "type": "object" }, + "GoogleCloudRetailV2RemoveCatalogAttributeRequest": { + "description": "Request for CatalogService.RemoveCatalogAttribute method.", + "id": "GoogleCloudRetailV2RemoveCatalogAttributeRequest", + "properties": { + "key": { + "description": "Required. The attribute name key of the CatalogAttribute to remove.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2RemoveFulfillmentPlacesMetadata": { "description": "Metadata related to the progress of the RemoveFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.RemoveFulfillmentPlaces method.", "id": "GoogleCloudRetailV2RemoveFulfillmentPlacesMetadata", @@ -2845,6 +3210,10 @@ "type": "string" }, "type": "array" + }, + "returnMinMax": { + "description": "Returns the min and max value for each numerical facet intervals. Ignored for textual facets.", + "type": "boolean" } }, "type": "object" @@ -2862,7 +3231,7 @@ ], "enumDescriptions": [ "Default value. Defaults to Mode.AUTO.", - "Let CRS decide whether to use personalization.", + "Let CRS decide whether to use personalization based on quality of user event data.", "Disable personalization." ], "type": "string" @@ -3011,6 +3380,16 @@ "$ref": "GoogleCloudRetailV2Interval", "description": "Interval value for a facet, such as [10, 20) for facet \"price\"." }, + "maxValue": { + "description": "The maximum value in the FacetValue.interval. Only supported on numerical facets and returned if SearchRequest.FacetSpec.FacetKey.return_min_max is true.", + "format": "double", + "type": "number" + }, + "minValue": { + "description": "The minimum value in the FacetValue.interval. Only supported on numerical facets and returned if SearchRequest.FacetSpec.FacetKey.return_min_max is true.", + "format": "double", + "type": "number" + }, "value": { "description": "Text value of a facet, such as \"Black\" for facet \"colorFamilies\".", "type": "string" @@ -3055,6 +3434,13 @@ "description": "If a variant Product matches the search query, this map indicates which Product fields are matched. The key is the Product.name, the value is a field mask of the matched Product fields. If matched attributes cannot be determined, this map will be empty. For example, a key \"sku1\" with field mask \"products.color_info\" indicates there is a match between \"sku1\" ColorInfo and the query.", "type": "object" }, + "personalLabels": { + "description": "Specifies previous events related to this product for this user based on UserEvent with same SearchRequest.visitor_id or UserInfo.user_id. This is set only when SearchRequest.PersonalizationSpec.mode is SearchRequest.PersonalizationSpec.Mode.AUTO. Possible values: * `purchased`: Indicates that this product has been purchased before.", + "items": { + "type": "string" + }, + "type": "array" + }, "product": { "$ref": "GoogleCloudRetailV2Product", "description": "The product data snippet in the search response. Only Product.name is guaranteed to be populated. Product.variants contains the product variants that match the search query. If there are multiple product variants matching the query, top 5 most relevant product variants are returned and ordered by relevancy. If relevancy can be deternmined, use matching_variant_fields to look up matched product variants fields. If relevancy cannot be determined, e.g. when searching \"shoe\" all products in a shoe product can be a match, 5 product variants are returned but order is meaningless." @@ -3473,6 +3859,10 @@ "format": "int64", "type": "string" }, + "transformedUserEventsMetadata": { + "$ref": "GoogleCloudRetailV2alphaTransformedUserEventsMetadata", + "description": "Metadata related to transform user events." + }, "updateTime": { "description": "Operation last update time. If the operation is done, this is also the finish time.", "format": "google-datetime", @@ -3547,7 +3937,7 @@ "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.", + "description": "Required. The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Cloud Cosole Dashboard. UTF-8 encoded string with limit of 1024 characters.", "type": "string" }, "filteringOption": { @@ -3870,6 +4260,23 @@ "properties": {}, "type": "object" }, + "GoogleCloudRetailV2alphaTransformedUserEventsMetadata": { + "description": "Metadata related to transform user events operation.", + "id": "GoogleCloudRetailV2alphaTransformedUserEventsMetadata", + "properties": { + "sourceEventsCount": { + "description": "Count of entries in the source user events BigQuery table.", + "format": "int64", + "type": "string" + }, + "transformedEventsCount": { + "description": "Count of entries in the transformed user events BigQuery table, which could be different from the actually imported number of user events.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaTuneModelMetadata": { "description": "Metadata associated with a tune operation.", "id": "GoogleCloudRetailV2alphaTuneModelMetadata", diff --git a/retail/v2/retail-gen.go b/retail/v2/retail-gen.go index e755f5b6aa9..0834d8fa2ed 100644 --- a/retail/v2/retail-gen.go +++ b/retail/v2/retail-gen.go @@ -169,6 +169,7 @@ type ProjectsLocationsService struct { func NewProjectsLocationsCatalogsService(s *Service) *ProjectsLocationsCatalogsService { rs := &ProjectsLocationsCatalogsService{s: s} + rs.AttributesConfig = NewProjectsLocationsCatalogsAttributesConfigService(s) rs.Branches = NewProjectsLocationsCatalogsBranchesService(s) rs.CompletionData = NewProjectsLocationsCatalogsCompletionDataService(s) rs.Operations = NewProjectsLocationsCatalogsOperationsService(s) @@ -181,6 +182,8 @@ func NewProjectsLocationsCatalogsService(s *Service) *ProjectsLocationsCatalogsS type ProjectsLocationsCatalogsService struct { s *Service + AttributesConfig *ProjectsLocationsCatalogsAttributesConfigService + Branches *ProjectsLocationsCatalogsBranchesService CompletionData *ProjectsLocationsCatalogsCompletionDataService @@ -194,6 +197,15 @@ type ProjectsLocationsCatalogsService struct { UserEvents *ProjectsLocationsCatalogsUserEventsService } +func NewProjectsLocationsCatalogsAttributesConfigService(s *Service) *ProjectsLocationsCatalogsAttributesConfigService { + rs := &ProjectsLocationsCatalogsAttributesConfigService{s: s} + return rs +} + +type ProjectsLocationsCatalogsAttributesConfigService struct { + s *Service +} + func NewProjectsLocationsCatalogsBranchesService(s *Service) *ProjectsLocationsCatalogsBranchesService { rs := &ProjectsLocationsCatalogsBranchesService{s: s} rs.Operations = NewProjectsLocationsCatalogsBranchesOperationsService(s) @@ -582,6 +594,36 @@ func (s *GoogleCloudRetailLoggingSourceLocation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2AddCatalogAttributeRequest: Request for +// CatalogService.AddCatalogAttribute method. +type GoogleCloudRetailV2AddCatalogAttributeRequest struct { + // CatalogAttribute: Required. The CatalogAttribute to add. + CatalogAttribute *GoogleCloudRetailV2CatalogAttribute `json:"catalogAttribute,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CatalogAttribute") 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. "CatalogAttribute") 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 *GoogleCloudRetailV2AddCatalogAttributeRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2AddCatalogAttributeRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2AddFulfillmentPlacesMetadata: Metadata related to // the progress of the AddFulfillmentPlaces operation. Currently empty // because there is no meaningful metadata populated from the @@ -721,6 +763,62 @@ func (s *GoogleCloudRetailV2AddLocalInventoriesRequest) MarshalJSON() ([]byte, e type GoogleCloudRetailV2AddLocalInventoriesResponse struct { } +// GoogleCloudRetailV2AttributesConfig: Catalog level attribute config. +type GoogleCloudRetailV2AttributesConfig struct { + // AttributeConfigLevel: Output only. The AttributeConfigLevel used for + // this catalog. + // + // Possible values: + // "ATTRIBUTE_CONFIG_LEVEL_UNSPECIFIED" - Value used when unset. + // Defaults to CATALOG_LEVEL_ATTRIBUTE_CONFIG. + // "PRODUCT_LEVEL_ATTRIBUTE_CONFIG" - At this level, we honor the + // attribute configurations set in Product.attributes. + // "CATALOG_LEVEL_ATTRIBUTE_CONFIG" - At this level, we honor the + // attribute configurations set in CatalogConfig.attribute_configs. + AttributeConfigLevel string `json:"attributeConfigLevel,omitempty"` + + // CatalogAttributes: Enable attribute(s) config at catalog level. For + // example, indexable, dynamic_facetable, or searchable for each + // attribute. The key is catalog attribute's name. For example: `color`, + // `brands`, `attributes.custom_attribute`, such as `attributes.xyz`. + // The maximum number of catalog attributes allowed in a request is + // 1000. + CatalogAttributes map[string]GoogleCloudRetailV2CatalogAttribute `json:"catalogAttributes,omitempty"` + + // Name: Required. Immutable. The fully qualified resource name of the + // attribute config. Format: + // `projects/*/locations/*/catalogs/*/attributesConfig` + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AttributeConfigLevel") 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. "AttributeConfigLevel") 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 *GoogleCloudRetailV2AttributesConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2AttributesConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2Audience: An intended audience of the Product for // whom it's sold. type GoogleCloudRetailV2Audience struct { @@ -782,9 +880,7 @@ type GoogleCloudRetailV2BigQuerySource struct { // Supported values for user events imports: * `user_event` (default): // One JSON UserEvent per line. * `user_event_ga360`: The schema is // available here: https://support.google.com/analytics/answer/3437719. - // * `user_event_ga4`: This feature is in private preview. Please - // contact the support team for importing Google Analytics 4 events. The - // schema is available here: + // * `user_event_ga4`: The schema is available here: // https://support.google.com/analytics/answer/7029846. Supported values // for auto-completion imports: * `suggestions` (default): One JSON // completion suggestion per line. * `denylist`: One JSON deny @@ -803,8 +899,7 @@ type GoogleCloudRetailV2BigQuerySource struct { GcsStagingDir string `json:"gcsStagingDir,omitempty"` // PartitionDate: BigQuery time partitioned table's _PARTITIONDATE in - // YYYY-MM-DD format. Only supported when - // ImportProductsRequest.reconciliation_mode is set to `FULL`. + // YYYY-MM-DD format. Only supported in ImportProductsRequest. PartitionDate *GoogleTypeDate `json:"partitionDate,omitempty"` // ProjectId: The project ID (can be project # or ID) that the BigQuery @@ -880,6 +975,109 @@ func (s *GoogleCloudRetailV2Catalog) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2CatalogAttribute: Catalog level attribute config +// for an attribute. For example, if customers want to enable/disable +// facet for a specific attribute. +type GoogleCloudRetailV2CatalogAttribute struct { + // DynamicFacetableOption: If DYNAMIC_FACETABLE_ENABLED, attribute + // values are available for dynamic facet. Could only be + // DYNAMIC_FACETABLE_DISABLED if CatalogAttribute.indexable_option is + // INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned. + // + // Possible values: + // "DYNAMIC_FACETABLE_OPTION_UNSPECIFIED" - Value used when unset. + // Defaults to DYNAMIC_FACETABLE_ENABLED. + // "DYNAMIC_FACETABLE_ENABLED" - Dynamic facetable option enabled for + // an attribute. + // "DYNAMIC_FACETABLE_DISABLED" - Dynamic facetable option disabled + // for an attribute. + DynamicFacetableOption string `json:"dynamicFacetableOption,omitempty"` + + // InUse: Output only. Indicates whether this attribute has been used by + // any products. `True` if at least one Product is using this attribute + // in Product.attributes. Otherwise, this field is `False`. + // CatalogAttribute can be pre-loaded by using + // CatalogService.AddCatalogAttribute, + // CatalogService.ImportCatalogAttributes, or + // CatalogService.UpdateAttributesConfig APIs. This field is `False` for + // pre-loaded CatalogAttributes. Only pre-loaded CatalogAttributes that + // are neither in use by products nor predefined can be deleted. + // CatalogAttributes that are either in use by products or are + // predefined cannot be deleted; however, their configuration properties + // will reset to default values upon removal request. After catalog + // changes, it takes about 10 minutes for this field to update. + InUse bool `json:"inUse,omitempty"` + + // IndexableOption: When AttributesConfig.attribute_config_level is + // CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values + // are indexed so that it can be filtered, faceted, or boosted in + // SearchService.Search. + // + // Possible values: + // "INDEXABLE_OPTION_UNSPECIFIED" - Value used when unset. Defaults to + // INDEXABLE_ENABLED. + // "INDEXABLE_ENABLED" - Indexable option enabled for an attribute. + // "INDEXABLE_DISABLED" - Indexable option disabled for an attribute. + IndexableOption string `json:"indexableOption,omitempty"` + + // Key: Required. Attribute name. For example: `color`, `brands`, + // `attributes.custom_attribute`, such as `attributes.xyz`. To be + // indexable, the attribute name can contain only alpha-numeric + // characters and underscores. For example, an attribute named + // `attributes.abc_xyz` can be indexed, but an attribute named + // `attributes.abc-xyz` cannot be indexed. + Key string `json:"key,omitempty"` + + // SearchableOption: When AttributesConfig.attribute_config_level is + // CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute + // values are searchable by text queries in SearchService.Search. If + // SEARCHABLE_ENABLED but attribute type is numerical, attribute values + // will not be searchable by text queries in SearchService.Search, as + // there are no text values associated to numerical attributes. + // + // Possible values: + // "SEARCHABLE_OPTION_UNSPECIFIED" - Value used when unset. Defaults + // to SEARCHABLE_DISABLED. + // "SEARCHABLE_ENABLED" - Searchable option enabled for an attribute. + // "SEARCHABLE_DISABLED" - Searchable option disabled for an + // attribute. + SearchableOption string `json:"searchableOption,omitempty"` + + // Type: Output only. The type of this attribute. This is derived from + // the attribute in Product.attributes. + // + // Possible values: + // "UNKNOWN" - The type of the attribute is unknown. Used when type + // cannot be derived from attribute that is not in_use. + // "TEXTUAL" - Textual attribute. + // "NUMERICAL" - Numerical attribute. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DynamicFacetableOption") 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. "DynamicFacetableOption") + // 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 *GoogleCloudRetailV2CatalogAttribute) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2CatalogAttribute + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2ColorInfo: The color information of a Product. type GoogleCloudRetailV2ColorInfo struct { // ColorFamilies: The standard color families. Strongly recommended to @@ -1047,6 +1245,94 @@ func (s *GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult) MarshalJSON return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2CompletionConfig: Catalog level autocomplete +// config for customers to customize autocomplete feature's settings. +type GoogleCloudRetailV2CompletionConfig struct { + // AllowlistInputConfig: Output only. The source data for the latest + // import of the autocomplete allowlist phrases. + AllowlistInputConfig *GoogleCloudRetailV2CompletionDataInputConfig `json:"allowlistInputConfig,omitempty"` + + // AutoLearning: If set to true, the auto learning function is enabled. + // Auto learning uses user data to generate suggestions using ML + // techniques. Default value is false. Only after enabling auto learning + // can users use `cloud-retail` data in CompleteQueryRequest. + AutoLearning bool `json:"autoLearning,omitempty"` + + // DenylistInputConfig: Output only. The source data for the latest + // import of the autocomplete denylist phrases. + DenylistInputConfig *GoogleCloudRetailV2CompletionDataInputConfig `json:"denylistInputConfig,omitempty"` + + // LastAllowlistImportOperation: Output only. Name of the LRO + // corresponding to the latest allowlist import. Can use GetOperation + // API to retrieve the latest state of the Long Running Operation. + LastAllowlistImportOperation string `json:"lastAllowlistImportOperation,omitempty"` + + // LastDenylistImportOperation: Output only. Name of the LRO + // corresponding to the latest denylist import. Can use GetOperation API + // to retrieve the latest state of the Long Running Operation. + LastDenylistImportOperation string `json:"lastDenylistImportOperation,omitempty"` + + // LastSuggestionsImportOperation: Output only. Name of the LRO + // corresponding to the latest suggestion terms list import. Can use + // GetOperation API to retrieve the latest state of the Long Running + // Operation. + LastSuggestionsImportOperation string `json:"lastSuggestionsImportOperation,omitempty"` + + // MatchingOrder: Specifies the matching order for autocomplete + // suggestions, e.g., a query consisting of 'sh' with 'out-of-order' + // specified would suggest "women's shoes", whereas a query of 'red s' + // with 'exact-prefix' specified would suggest "red shoes". Currently + // supported values: * 'out-of-order' * 'exact-prefix' Default value: + // 'exact-prefix'. + MatchingOrder string `json:"matchingOrder,omitempty"` + + // MaxSuggestions: The maximum number of autocomplete suggestions + // returned per term. Default value is 20. If left unset or set to 0, + // then will fallback to default value. Value range is 1 to 20. + MaxSuggestions int64 `json:"maxSuggestions,omitempty"` + + // MinPrefixLength: The minimum number of characters needed to be typed + // in order to get suggestions. Default value is 2. If left unset or set + // to 0, then will fallback to default value. Value range is 1 to 20. + MinPrefixLength int64 `json:"minPrefixLength,omitempty"` + + // Name: Required. Immutable. Fully qualified name + // `projects/*/locations/*/catalogs/*/completionConfig` + Name string `json:"name,omitempty"` + + // SuggestionsInputConfig: Output only. The source data for the latest + // import of the autocomplete suggestion phrases. + SuggestionsInputConfig *GoogleCloudRetailV2CompletionDataInputConfig `json:"suggestionsInputConfig,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AllowlistInputConfig") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllowlistInputConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2CompletionConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2CompletionConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2CompletionDataInputConfig: The input config source // for completion data. type GoogleCloudRetailV2CompletionDataInputConfig struct { @@ -1528,11 +1814,9 @@ type GoogleCloudRetailV2ImportProductsRequest struct { // notification will be sent to specified Pub/Sub topic. The message // data will be JSON string of a Operation. Format of the Pub/Sub topic // is `projects/{project}/topics/{topic}`. It has to be within the same - // project as ImportProductsRequest.parent. Make sure that both - // `cloud-retail-customer-data-access@system.gserviceaccount.com` and - // `service-@gcp-sa-retail.iam.gserviceaccount.com` have the - // `pubsub.topics.publish` IAM permission on the topic. Only supported - // when ImportProductsRequest.reconciliation_mode is set to `FULL`. + // project as ImportProductsRequest.parent. Make sure that + // `service-@gcp-sa-retail.iam.gserviceaccount.com` has the + // `pubsub.topics.publish` IAM permission on the topic. NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"` // ReconciliationMode: The mode of reconciliation between existing @@ -1544,12 +1828,7 @@ type GoogleCloudRetailV2ImportProductsRequest struct { // "INCREMENTAL" - Inserts new products or updates existing products. // "FULL" - Calculates diff and replaces the entire product dataset. // Existing products may be deleted if they are not present in the - // source location. Can only be set while using BigQuerySource. And the - // BigQuery dataset must be created in the data location "us (multiple - // regions in United States)", otherwise a PERMISSION_DENIED error is - // thrown. Add the IAM permission "BigQuery Data Viewer" for - // cloud-retail-customer-data-access@system.gserviceaccount.com before - // using this feature otherwise an error is thrown. + // source location. ReconciliationMode string `json:"reconciliationMode,omitempty"` // RequestId: Deprecated. This field has no effect. @@ -2294,7 +2573,7 @@ type GoogleCloudRetailV2Product struct { // CollectionMemberIds: The id of the collection members when type is // Type.COLLECTION. Non-existent product ids are allowed. The type of - // the members must be either Type.PRIMARY or Type.VARIANT otherwise and + // the members must be either Type.PRIMARY or Type.VARIANT otherwise an // INVALID_ARGUMENT error is thrown. Should not set it for other types. // A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT // error is return. @@ -3047,6 +3326,36 @@ func (s *GoogleCloudRetailV2RejoinUserEventsResponse) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2RemoveCatalogAttributeRequest: Request for +// CatalogService.RemoveCatalogAttribute method. +type GoogleCloudRetailV2RemoveCatalogAttributeRequest struct { + // Key: Required. The attribute name key of the CatalogAttribute to + // remove. + Key string `json:"key,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") 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 *GoogleCloudRetailV2RemoveCatalogAttributeRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2RemoveCatalogAttributeRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2RemoveFulfillmentPlacesMetadata: Metadata related // to the progress of the RemoveFulfillmentPlaces operation. Currently // empty because there is no meaningful metadata populated from the @@ -3679,6 +3988,10 @@ type GoogleCloudRetailV2SearchRequestFacetSpecFacetKey struct { // customFulfillment5 RestrictedValues []string `json:"restrictedValues,omitempty"` + // ReturnMinMax: Returns the min and max value for each numerical facet + // intervals. Ignored for textual facets. + ReturnMinMax bool `json:"returnMinMax,omitempty"` + // ForceSendFields is a list of field names (e.g. "CaseInsensitive") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -3710,7 +4023,8 @@ type GoogleCloudRetailV2SearchRequestPersonalizationSpec struct { // // Possible values: // "MODE_UNSPECIFIED" - Default value. Defaults to Mode.AUTO. - // "AUTO" - Let CRS decide whether to use personalization. + // "AUTO" - Let CRS decide whether to use personalization based on + // quality of user event data. // "DISABLED" - Disable personalization. Mode string `json:"mode,omitempty"` @@ -3940,6 +4254,16 @@ type GoogleCloudRetailV2SearchResponseFacetFacetValue struct { // "price". Interval *GoogleCloudRetailV2Interval `json:"interval,omitempty"` + // MaxValue: The maximum value in the FacetValue.interval. Only + // supported on numerical facets and returned if + // SearchRequest.FacetSpec.FacetKey.return_min_max is true. + MaxValue float64 `json:"maxValue,omitempty"` + + // MinValue: The minimum value in the FacetValue.interval. Only + // supported on numerical facets and returned if + // SearchRequest.FacetSpec.FacetKey.return_min_max is true. + MinValue float64 `json:"minValue,omitempty"` + // Value: Text value of a facet, such as "Black" for facet // "colorFamilies". Value string `json:"value,omitempty"` @@ -3967,6 +4291,22 @@ func (s *GoogleCloudRetailV2SearchResponseFacetFacetValue) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudRetailV2SearchResponseFacetFacetValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudRetailV2SearchResponseFacetFacetValue + var s1 struct { + MaxValue gensupport.JSONFloat64 `json:"maxValue"` + MinValue gensupport.JSONFloat64 `json:"minValue"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.MaxValue = float64(s1.MaxValue) + s.MinValue = float64(s1.MinValue) + return nil +} + // GoogleCloudRetailV2SearchResponseQueryExpansionInfo: Information // describing query expansion including whether expansion has occurred. type GoogleCloudRetailV2SearchResponseQueryExpansionInfo struct { @@ -4020,6 +4360,14 @@ type GoogleCloudRetailV2SearchResponseSearchResult struct { // ColorInfo and the query. MatchingVariantFields map[string]string `json:"matchingVariantFields,omitempty"` + // PersonalLabels: Specifies previous events related to this product for + // this user based on UserEvent with same SearchRequest.visitor_id or + // UserInfo.user_id. This is set only when + // SearchRequest.PersonalizationSpec.mode is + // SearchRequest.PersonalizationSpec.Mode.AUTO. Possible values: * + // `purchased`: Indicates that this product has been purchased before. + PersonalLabels []string `json:"personalLabels,omitempty"` + // Product: The product data snippet in the search response. Only // Product.name is guaranteed to be populated. Product.variants contains // the product variants that match the search query. If there are @@ -4898,6 +5246,10 @@ type GoogleCloudRetailV2alphaImportMetadata struct { // SuccessCount: Count of entries that were processed successfully. SuccessCount int64 `json:"successCount,omitempty,string"` + // TransformedUserEventsMetadata: Metadata related to transform user + // events. + TransformedUserEventsMetadata *GoogleCloudRetailV2alphaTransformedUserEventsMetadata `json:"transformedUserEventsMetadata,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, // this is also the finish time. UpdateTime string `json:"updateTime,omitempty"` @@ -5026,9 +5378,8 @@ type GoogleCloudRetailV2alphaModel struct { 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. + // readable, used to display Recommendation Models in the Retail Cloud + // Cosole Dashboard. UTF-8 encoded string with limit of 1024 characters. DisplayName string `json:"displayName,omitempty"` // FilteringOption: Optional. If RECOMMENDATIONS_FILTERING_ENABLED, @@ -5586,6 +5937,42 @@ type GoogleCloudRetailV2alphaSetInventoryMetadata struct { type GoogleCloudRetailV2alphaSetInventoryResponse struct { } +// GoogleCloudRetailV2alphaTransformedUserEventsMetadata: Metadata +// related to transform user events operation. +type GoogleCloudRetailV2alphaTransformedUserEventsMetadata struct { + // SourceEventsCount: Count of entries in the source user events + // BigQuery table. + SourceEventsCount int64 `json:"sourceEventsCount,omitempty,string"` + + // TransformedEventsCount: Count of entries in the transformed user + // events BigQuery table, which could be different from the actually + // imported number of user events. + TransformedEventsCount int64 `json:"transformedEventsCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "SourceEventsCount") + // 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. "SourceEventsCount") 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 *GoogleCloudRetailV2alphaTransformedUserEventsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaTransformedUserEventsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaTuneModelMetadata: Metadata associated with a // tune operation. type GoogleCloudRetailV2alphaTuneModelMetadata struct { @@ -6695,33 +7082,32 @@ func (c *ProjectsLocationsCatalogsCompleteQueryCall) Do(opts ...googleapi.CallOp } -// method id "retail.projects.locations.catalogs.getDefaultBranch": +// method id "retail.projects.locations.catalogs.getAttributesConfig": -type ProjectsLocationsCatalogsGetDefaultBranchCall struct { +type ProjectsLocationsCatalogsGetAttributesConfigCall struct { s *Service - catalog string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetDefaultBranch: Get which branch is currently default branch set by -// CatalogService.SetDefaultBranch method under a specified parent -// catalog. +// GetAttributesConfig: Gets an AttributesConfig. // -// - catalog: The parent catalog resource name, such as -// `projects/*/locations/global/catalogs/default_catalog`. -func (r *ProjectsLocationsCatalogsService) GetDefaultBranch(catalog string) *ProjectsLocationsCatalogsGetDefaultBranchCall { - c := &ProjectsLocationsCatalogsGetDefaultBranchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.catalog = catalog +// - name: Full AttributesConfig resource name. Format: +// `projects/{project_number}/locations/{location_id}/catalogs/{catalog +// _id}/attributesConfig`. +func (r *ProjectsLocationsCatalogsService) GetAttributesConfig(name string) *ProjectsLocationsCatalogsGetAttributesConfigCall { + c := &ProjectsLocationsCatalogsGetAttributesConfigCall{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 *ProjectsLocationsCatalogsGetDefaultBranchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsGetDefaultBranchCall { +func (c *ProjectsLocationsCatalogsGetAttributesConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsGetAttributesConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6731,7 +7117,7 @@ func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) Fields(s ...googleapi.Fi // 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 *ProjectsLocationsCatalogsGetDefaultBranchCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsGetDefaultBranchCall { +func (c *ProjectsLocationsCatalogsGetAttributesConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsGetAttributesConfigCall { c.ifNoneMatch_ = entityTag return c } @@ -6739,21 +7125,21 @@ func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) IfNoneMatch(entityTag st // 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 *ProjectsLocationsCatalogsGetDefaultBranchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsGetDefaultBranchCall { +func (c *ProjectsLocationsCatalogsGetAttributesConfigCall) Context(ctx context.Context) *ProjectsLocationsCatalogsGetAttributesConfigCall { 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 *ProjectsLocationsCatalogsGetDefaultBranchCall) Header() http.Header { +func (c *ProjectsLocationsCatalogsGetAttributesConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCatalogsGetAttributesConfigCall) 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_ { @@ -6766,7 +7152,7 @@ func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) doRequest(alt string) (* var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+catalog}:getDefaultBranch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -6774,21 +7160,20 @@ func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) doRequest(alt string) (* } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "catalog": c.catalog, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "retail.projects.locations.catalogs.getDefaultBranch" call. -// Exactly one of *GoogleCloudRetailV2GetDefaultBranchResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudRetailV2GetDefaultBranchResponse.ServerResponse.Header or +// Do executes the "retail.projects.locations.catalogs.getAttributesConfig" call. +// Exactly one of *GoogleCloudRetailV2AttributesConfig or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudRetailV2AttributesConfig.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 *ProjectsLocationsCatalogsGetDefaultBranchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2GetDefaultBranchResponse, error) { +func (c *ProjectsLocationsCatalogsGetAttributesConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2AttributesConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6807,7 +7192,7 @@ func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudRetailV2GetDefaultBranchResponse{ + ret := &GoogleCloudRetailV2AttributesConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6819,25 +7204,25 @@ func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Get which branch is currently default branch set by CatalogService.SetDefaultBranch method under a specified parent catalog.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}:getDefaultBranch", + // "description": "Gets an AttributesConfig.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig", // "httpMethod": "GET", - // "id": "retail.projects.locations.catalogs.getDefaultBranch", + // "id": "retail.projects.locations.catalogs.getAttributesConfig", // "parameterOrder": [ - // "catalog" + // "name" // ], // "parameters": { - // "catalog": { - // "description": "The parent catalog resource name, such as `projects/*/locations/global/catalogs/default_catalog`.", + // "name": { + // "description": "Required. Full AttributesConfig resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+catalog}:getDefaultBranch", + // "path": "v2/{+name}", // "response": { - // "$ref": "GoogleCloudRetailV2GetDefaultBranchResponse" + // "$ref": "GoogleCloudRetailV2AttributesConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6846,119 +7231,1089 @@ func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) Do(opts ...googleapi.Cal } -// method id "retail.projects.locations.catalogs.list": +// method id "retail.projects.locations.catalogs.getCompletionConfig": -type ProjectsLocationsCatalogsListCall struct { +type ProjectsLocationsCatalogsGetCompletionConfigCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all the Catalogs associated with the project. +// GetCompletionConfig: Gets a CompletionConfig. // -// - parent: The account resource name with an associated location. If -// the caller does not have permission to list Catalogs under this -// location, regardless of whether or not this location exists, a -// PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsCatalogsService) List(parent string) *ProjectsLocationsCatalogsListCall { - c := &ProjectsLocationsCatalogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: Full CompletionConfig resource name. Format: +// projects/{project_number}/locations/{location_id}/catalogs/{catalog_ +// id}/completionConfig. +func (r *ProjectsLocationsCatalogsService) GetCompletionConfig(name string) *ProjectsLocationsCatalogsGetCompletionConfigCall { + c := &ProjectsLocationsCatalogsGetCompletionConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// PageSize sets the optional parameter "pageSize": Maximum number of -// Catalogs to return. If unspecified, defaults to 50. The maximum -// allowed value is 1000. Values above 1000 will be coerced to 1000. If -// this field is negative, an INVALID_ARGUMENT is returned. -func (c *ProjectsLocationsCatalogsListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsGetCompletionConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// PageToken sets the optional parameter "pageToken": A page token -// ListCatalogsResponse.next_page_token, received from a previous -// CatalogService.ListCatalogs call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// CatalogService.ListCatalogs must match the call that provided the -// page token. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCatalogsListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsListCall { - c.urlParams_.Set("pageToken", pageToken) +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsGetCompletionConfigCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) Context(ctx context.Context) *ProjectsLocationsCatalogsGetCompletionConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.getCompletionConfig" call. +// Exactly one of *GoogleCloudRetailV2CompletionConfig or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudRetailV2CompletionConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2CompletionConfig, 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 := &GoogleCloudRetailV2CompletionConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a CompletionConfig.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", + // "httpMethod": "GET", + // "id": "retail.projects.locations.catalogs.getCompletionConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Full CompletionConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "GoogleCloudRetailV2CompletionConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "retail.projects.locations.catalogs.getDefaultBranch": + +type ProjectsLocationsCatalogsGetDefaultBranchCall struct { + s *Service + catalog string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetDefaultBranch: Get which branch is currently default branch set by +// CatalogService.SetDefaultBranch method under a specified parent +// catalog. +// +// - catalog: The parent catalog resource name, such as +// `projects/*/locations/global/catalogs/default_catalog`. +func (r *ProjectsLocationsCatalogsService) GetDefaultBranch(catalog string) *ProjectsLocationsCatalogsGetDefaultBranchCall { + c := &ProjectsLocationsCatalogsGetDefaultBranchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.catalog = catalog + 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 *ProjectsLocationsCatalogsGetDefaultBranchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsGetDefaultBranchCall { + 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 *ProjectsLocationsCatalogsGetDefaultBranchCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsGetDefaultBranchCall { + 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 *ProjectsLocationsCatalogsGetDefaultBranchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsGetDefaultBranchCall { + 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 *ProjectsLocationsCatalogsGetDefaultBranchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) 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, "v2/{+catalog}:getDefaultBranch") + 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{ + "catalog": c.catalog, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.getDefaultBranch" call. +// Exactly one of *GoogleCloudRetailV2GetDefaultBranchResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRetailV2GetDefaultBranchResponse.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 *ProjectsLocationsCatalogsGetDefaultBranchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2GetDefaultBranchResponse, 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 := &GoogleCloudRetailV2GetDefaultBranchResponse{ + 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": "Get which branch is currently default branch set by CatalogService.SetDefaultBranch method under a specified parent catalog.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}:getDefaultBranch", + // "httpMethod": "GET", + // "id": "retail.projects.locations.catalogs.getDefaultBranch", + // "parameterOrder": [ + // "catalog" + // ], + // "parameters": { + // "catalog": { + // "description": "The parent catalog resource name, such as `projects/*/locations/global/catalogs/default_catalog`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+catalog}:getDefaultBranch", + // "response": { + // "$ref": "GoogleCloudRetailV2GetDefaultBranchResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "retail.projects.locations.catalogs.list": + +type ProjectsLocationsCatalogsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the Catalogs associated with the project. +// +// - parent: The account resource name with an associated location. If +// the caller does not have permission to list Catalogs under this +// location, regardless of whether or not this location exists, a +// PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsCatalogsService) List(parent string) *ProjectsLocationsCatalogsListCall { + c := &ProjectsLocationsCatalogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// Catalogs to return. If unspecified, defaults to 50. The maximum +// allowed value is 1000. Values above 1000 will be coerced to 1000. If +// this field is negative, an INVALID_ARGUMENT is returned. +func (c *ProjectsLocationsCatalogsListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListCatalogsResponse.next_page_token, received from a previous +// CatalogService.ListCatalogs call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// CatalogService.ListCatalogs must match the call that provided the +// page token. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCatalogsListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsListCall { + 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 *ProjectsLocationsCatalogsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsListCall { + 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 *ProjectsLocationsCatalogsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsListCall { + 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 *ProjectsLocationsCatalogsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsListCall { + 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 *ProjectsLocationsCatalogsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsListCall) 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, "v2/{+parent}/catalogs") + 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.list" call. +// Exactly one of *GoogleCloudRetailV2ListCatalogsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudRetailV2ListCatalogsResponse.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 *ProjectsLocationsCatalogsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2ListCatalogsResponse, 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 := &GoogleCloudRetailV2ListCatalogsResponse{ + 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 Catalogs associated with the project.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs", + // "httpMethod": "GET", + // "id": "retail.projects.locations.catalogs.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of Catalogs to return. If unspecified, defaults to 50. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT is returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token ListCatalogsResponse.next_page_token, received from a previous CatalogService.ListCatalogs call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to CatalogService.ListCatalogs must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The account resource name with an associated location. If the caller does not have permission to list Catalogs under this location, regardless of whether or not this location exists, a PERMISSION_DENIED error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/catalogs", + // "response": { + // "$ref": "GoogleCloudRetailV2ListCatalogsResponse" + // }, + // "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 *ProjectsLocationsCatalogsListCall) Pages(ctx context.Context, f func(*GoogleCloudRetailV2ListCatalogsResponse) 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.patch": + +type ProjectsLocationsCatalogsPatchCall struct { + s *Service + name string + googlecloudretailv2catalog *GoogleCloudRetailV2Catalog + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the Catalogs. +// +// - name: Immutable. The fully qualified resource name of the catalog. +func (r *ProjectsLocationsCatalogsService) Patch(name string, googlecloudretailv2catalog *GoogleCloudRetailV2Catalog) *ProjectsLocationsCatalogsPatchCall { + c := &ProjectsLocationsCatalogsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudretailv2catalog = googlecloudretailv2catalog + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided Catalog to update. If an unsupported or +// unknown field is provided, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCatalogsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsPatchCall { + 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 *ProjectsLocationsCatalogsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsPatchCall { + 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 *ProjectsLocationsCatalogsPatchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsPatchCall { + 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 *ProjectsLocationsCatalogsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsPatchCall) 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.googlecloudretailv2catalog) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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.patch" call. +// Exactly one of *GoogleCloudRetailV2Catalog or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudRetailV2Catalog.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 *ProjectsLocationsCatalogsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2Catalog, 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 := &GoogleCloudRetailV2Catalog{ + 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": "Updates the Catalogs.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}", + // "httpMethod": "PATCH", + // "id": "retail.projects.locations.catalogs.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Immutable. The fully qualified resource name of the catalog.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided Catalog to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "request": { + // "$ref": "GoogleCloudRetailV2Catalog" + // }, + // "response": { + // "$ref": "GoogleCloudRetailV2Catalog" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "retail.projects.locations.catalogs.setDefaultBranch": + +type ProjectsLocationsCatalogsSetDefaultBranchCall struct { + s *Service + catalog string + googlecloudretailv2setdefaultbranchrequest *GoogleCloudRetailV2SetDefaultBranchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetDefaultBranch: Set a specified branch id as default branch. API +// methods such as SearchService.Search, ProductService.GetProduct, +// ProductService.ListProducts will treat requests using +// "default_branch" to the actual branch id set as default. For example, +// if `projects/*/locations/*/catalogs/*/branches/1` is set as default, +// setting SearchRequest.branch to +// `projects/*/locations/*/catalogs/*/branches/default_branch` is +// equivalent to setting SearchRequest.branch to +// `projects/*/locations/*/catalogs/*/branches/1`. Using multiple +// branches can be useful when developers would like to have a staging +// branch to test and verify for future usage. When it becomes ready, +// developers switch on the staging branch using this API while keeping +// using `projects/*/locations/*/catalogs/*/branches/default_branch` as +// SearchRequest.branch to route the traffic to this staging branch. +// CAUTION: If you have live predict/search traffic, switching the +// default branch could potentially cause outages if the ID space of the +// new branch is very different from the old one. More specifically: * +// PredictionService will only return product IDs from branch +// {newBranch}. * SearchService will only return product IDs from branch +// {newBranch} (if branch is not explicitly set). * UserEventService +// will only join events with products from branch {newBranch}. +// +// - catalog: Full resource name of the catalog, such as +// `projects/*/locations/global/catalogs/default_catalog`. +func (r *ProjectsLocationsCatalogsService) SetDefaultBranch(catalog string, googlecloudretailv2setdefaultbranchrequest *GoogleCloudRetailV2SetDefaultBranchRequest) *ProjectsLocationsCatalogsSetDefaultBranchCall { + c := &ProjectsLocationsCatalogsSetDefaultBranchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.catalog = catalog + c.googlecloudretailv2setdefaultbranchrequest = googlecloudretailv2setdefaultbranchrequest + 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 *ProjectsLocationsCatalogsSetDefaultBranchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsSetDefaultBranchCall { + 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 *ProjectsLocationsCatalogsSetDefaultBranchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsSetDefaultBranchCall { + 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 *ProjectsLocationsCatalogsSetDefaultBranchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsSetDefaultBranchCall) 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.googlecloudretailv2setdefaultbranchrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+catalog}:setDefaultBranch") + 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{ + "catalog": c.catalog, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.setDefaultBranch" 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 *ProjectsLocationsCatalogsSetDefaultBranchCall) 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": "Set a specified branch id as default branch. API methods such as SearchService.Search, ProductService.GetProduct, ProductService.ListProducts will treat requests using \"default_branch\" to the actual branch id set as default. For example, if `projects/*/locations/*/catalogs/*/branches/1` is set as default, setting SearchRequest.branch to `projects/*/locations/*/catalogs/*/branches/default_branch` is equivalent to setting SearchRequest.branch to `projects/*/locations/*/catalogs/*/branches/1`. Using multiple branches can be useful when developers would like to have a staging branch to test and verify for future usage. When it becomes ready, developers switch on the staging branch using this API while keeping using `projects/*/locations/*/catalogs/*/branches/default_branch` as SearchRequest.branch to route the traffic to this staging branch. CAUTION: If you have live predict/search traffic, switching the default branch could potentially cause outages if the ID space of the new branch is very different from the old one. More specifically: * PredictionService will only return product IDs from branch {newBranch}. * SearchService will only return product IDs from branch {newBranch} (if branch is not explicitly set). * UserEventService will only join events with products from branch {newBranch}.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}:setDefaultBranch", + // "httpMethod": "POST", + // "id": "retail.projects.locations.catalogs.setDefaultBranch", + // "parameterOrder": [ + // "catalog" + // ], + // "parameters": { + // "catalog": { + // "description": "Full resource name of the catalog, such as `projects/*/locations/global/catalogs/default_catalog`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+catalog}:setDefaultBranch", + // "request": { + // "$ref": "GoogleCloudRetailV2SetDefaultBranchRequest" + // }, + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "retail.projects.locations.catalogs.updateAttributesConfig": + +type ProjectsLocationsCatalogsUpdateAttributesConfigCall struct { + s *Service + name string + googlecloudretailv2attributesconfig *GoogleCloudRetailV2AttributesConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateAttributesConfig: Updates the AttributesConfig. The catalog +// attributes in the request will be updated in the catalog, or inserted +// if they do not exist. Existing catalog attributes not included in the +// request will remain unchanged. Attributes that are assigned to +// products, but do not exist at the catalog level, are always included +// in the response. The product attribute is assigned default values for +// missing catalog attribute fields, e.g., searchable and dynamic +// facetable options. +// +// - name: Immutable. The fully qualified resource name of the attribute +// config. Format: +// `projects/*/locations/*/catalogs/*/attributesConfig`. +func (r *ProjectsLocationsCatalogsService) UpdateAttributesConfig(name string, googlecloudretailv2attributesconfig *GoogleCloudRetailV2AttributesConfig) *ProjectsLocationsCatalogsUpdateAttributesConfigCall { + c := &ProjectsLocationsCatalogsUpdateAttributesConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudretailv2attributesconfig = googlecloudretailv2attributesconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided AttributesConfig to update. The following is +// the only supported field: * AttributesConfig.catalog_attributes If +// not set, all supported fields are updated. +func (c *ProjectsLocationsCatalogsUpdateAttributesConfigCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsUpdateAttributesConfigCall { + 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 *ProjectsLocationsCatalogsUpdateAttributesConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsUpdateAttributesConfigCall { + 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 *ProjectsLocationsCatalogsUpdateAttributesConfigCall) Context(ctx context.Context) *ProjectsLocationsCatalogsUpdateAttributesConfigCall { + 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 *ProjectsLocationsCatalogsUpdateAttributesConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsUpdateAttributesConfigCall) 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.googlecloudretailv2attributesconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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.updateAttributesConfig" call. +// Exactly one of *GoogleCloudRetailV2AttributesConfig or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudRetailV2AttributesConfig.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 *ProjectsLocationsCatalogsUpdateAttributesConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2AttributesConfig, 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 := &GoogleCloudRetailV2AttributesConfig{ + 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": "Updates the AttributesConfig. The catalog attributes in the request will be updated in the catalog, or inserted if they do not exist. Existing catalog attributes not included in the request will remain unchanged. Attributes that are assigned to products, but do not exist at the catalog level, are always included in the response. The product attribute is assigned default values for missing catalog attribute fields, e.g., searchable and dynamic facetable options.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig", + // "httpMethod": "PATCH", + // "id": "retail.projects.locations.catalogs.updateAttributesConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Immutable. The fully qualified resource name of the attribute config. Format: `projects/*/locations/*/catalogs/*/attributesConfig`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided AttributesConfig to update. The following is the only supported field: * AttributesConfig.catalog_attributes If not set, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "request": { + // "$ref": "GoogleCloudRetailV2AttributesConfig" + // }, + // "response": { + // "$ref": "GoogleCloudRetailV2AttributesConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "retail.projects.locations.catalogs.updateCompletionConfig": + +type ProjectsLocationsCatalogsUpdateCompletionConfigCall struct { + s *Service + name string + googlecloudretailv2completionconfig *GoogleCloudRetailV2CompletionConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateCompletionConfig: Updates the CompletionConfigs. +// +// - name: Immutable. Fully qualified name +// `projects/*/locations/*/catalogs/*/completionConfig`. +func (r *ProjectsLocationsCatalogsService) UpdateCompletionConfig(name string, googlecloudretailv2completionconfig *GoogleCloudRetailV2CompletionConfig) *ProjectsLocationsCatalogsUpdateCompletionConfigCall { + c := &ProjectsLocationsCatalogsUpdateCompletionConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudretailv2completionconfig = googlecloudretailv2completionconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided CompletionConfig to update. The following are +// the only supported fields: * CompletionConfig.matching_order * +// CompletionConfig.max_suggestions * CompletionConfig.min_prefix_length +// * CompletionConfig.auto_learning If not set, all supported fields are +// updated. +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsUpdateCompletionConfigCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCatalogsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsListCall { +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsUpdateCompletionConfigCall { 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 *ProjectsLocationsCatalogsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsListCall { - 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 *ProjectsLocationsCatalogsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsListCall { +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Context(ctx context.Context) *ProjectsLocationsCatalogsUpdateCompletionConfigCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCatalogsListCall) Header() http.Header { +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCatalogsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2completionconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/catalogs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "retail.projects.locations.catalogs.list" call. -// Exactly one of *GoogleCloudRetailV2ListCatalogsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudRetailV2ListCatalogsResponse.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 *ProjectsLocationsCatalogsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2ListCatalogsResponse, error) { +// Do executes the "retail.projects.locations.catalogs.updateCompletionConfig" call. +// Exactly one of *GoogleCloudRetailV2CompletionConfig or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudRetailV2CompletionConfig.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 *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2CompletionConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6977,7 +8332,7 @@ func (c *ProjectsLocationsCatalogsListCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudRetailV2ListCatalogsResponse{ + ret := &GoogleCloudRetailV2CompletionConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6989,36 +8344,34 @@ func (c *ProjectsLocationsCatalogsListCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Lists all the Catalogs associated with the project.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs", - // "httpMethod": "GET", - // "id": "retail.projects.locations.catalogs.list", + // "description": "Updates the CompletionConfigs.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", + // "httpMethod": "PATCH", + // "id": "retail.projects.locations.catalogs.updateCompletionConfig", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "Maximum number of Catalogs to return. If unspecified, defaults to 50. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT is returned.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token ListCatalogsResponse.next_page_token, received from a previous CatalogService.ListCatalogs call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to CatalogService.ListCatalogs must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The account resource name with an associated location. If the caller does not have permission to list Catalogs under this location, regardless of whether or not this location exists, a PERMISSION_DENIED error is returned.", + // "name": { + // "description": "Required. Immutable. Fully qualified name `projects/*/locations/*/catalogs/*/completionConfig`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided CompletionConfig to update. The following are the only supported fields: * CompletionConfig.matching_order * CompletionConfig.max_suggestions * CompletionConfig.min_prefix_length * CompletionConfig.auto_learning If not set, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v2/{+parent}/catalogs", + // "path": "v2/{+name}", + // "request": { + // "$ref": "GoogleCloudRetailV2CompletionConfig" + // }, // "response": { - // "$ref": "GoogleCloudRetailV2ListCatalogsResponse" + // "$ref": "GoogleCloudRetailV2CompletionConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7027,60 +8380,35 @@ func (c *ProjectsLocationsCatalogsListCall) Do(opts ...googleapi.CallOption) (*G } -// 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 *ProjectsLocationsCatalogsListCall) Pages(ctx context.Context, f func(*GoogleCloudRetailV2ListCatalogsResponse) 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.patch": +// method id "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute": -type ProjectsLocationsCatalogsPatchCall struct { - s *Service - name string - googlecloudretailv2catalog *GoogleCloudRetailV2Catalog - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall struct { + s *Service + attributesConfig string + googlecloudretailv2addcatalogattributerequest *GoogleCloudRetailV2AddCatalogAttributeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the Catalogs. +// AddCatalogAttribute: Adds the specified CatalogAttribute to the +// AttributesConfig. If the CatalogAttribute to add already exists, an +// ALREADY_EXISTS error is returned. // -// - name: Immutable. The fully qualified resource name of the catalog. -func (r *ProjectsLocationsCatalogsService) Patch(name string, googlecloudretailv2catalog *GoogleCloudRetailV2Catalog) *ProjectsLocationsCatalogsPatchCall { - c := &ProjectsLocationsCatalogsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudretailv2catalog = googlecloudretailv2catalog - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided Catalog to update. If an unsupported or -// unknown field is provided, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCatalogsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - attributesConfig: Full AttributesConfig resource name. Format: +// `projects/{project_number}/locations/{location_id}/catalogs/{catalog +// _id}/attributesConfig`. +func (r *ProjectsLocationsCatalogsAttributesConfigService) AddCatalogAttribute(attributesConfig string, googlecloudretailv2addcatalogattributerequest *GoogleCloudRetailV2AddCatalogAttributeRequest) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { + c := &ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.attributesConfig = attributesConfig + c.googlecloudretailv2addcatalogattributerequest = googlecloudretailv2addcatalogattributerequest 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 *ProjectsLocationsCatalogsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsPatchCall { +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7088,21 +8416,21 @@ func (c *ProjectsLocationsCatalogsPatchCall) Fields(s ...googleapi.Field) *Proje // 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 *ProjectsLocationsCatalogsPatchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsPatchCall { +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCatalogsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCatalogsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -7110,34 +8438,35 @@ func (c *ProjectsLocationsCatalogsPatchCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2catalog) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2addcatalogattributerequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+attributesConfig}:addCatalogAttribute") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + 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, + "attributesConfig": c.attributesConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "retail.projects.locations.catalogs.patch" call. -// Exactly one of *GoogleCloudRetailV2Catalog or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudRetailV2Catalog.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 *ProjectsLocationsCatalogsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2Catalog, error) { +// Do executes the "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute" call. +// Exactly one of *GoogleCloudRetailV2AttributesConfig or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudRetailV2AttributesConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2AttributesConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7156,7 +8485,7 @@ func (c *ProjectsLocationsCatalogsPatchCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudRetailV2Catalog{ + ret := &GoogleCloudRetailV2AttributesConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7168,34 +8497,28 @@ func (c *ProjectsLocationsCatalogsPatchCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Updates the Catalogs.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}", - // "httpMethod": "PATCH", - // "id": "retail.projects.locations.catalogs.patch", + // "description": "Adds the specified CatalogAttribute to the AttributesConfig. If the CatalogAttribute to add already exists, an ALREADY_EXISTS error is returned.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:addCatalogAttribute", + // "httpMethod": "POST", + // "id": "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute", // "parameterOrder": [ - // "name" + // "attributesConfig" // ], // "parameters": { - // "name": { - // "description": "Required. Immutable. The fully qualified resource name of the catalog.", + // "attributesConfig": { + // "description": "Required. Full AttributesConfig resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Indicates which fields in the provided Catalog to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v2/{+name}", + // "path": "v2/{+attributesConfig}:addCatalogAttribute", // "request": { - // "$ref": "GoogleCloudRetailV2Catalog" + // "$ref": "GoogleCloudRetailV2AddCatalogAttributeRequest" // }, // "response": { - // "$ref": "GoogleCloudRetailV2Catalog" + // "$ref": "GoogleCloudRetailV2AttributesConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7204,52 +8527,35 @@ func (c *ProjectsLocationsCatalogsPatchCall) Do(opts ...googleapi.CallOption) (* } -// method id "retail.projects.locations.catalogs.setDefaultBranch": +// method id "retail.projects.locations.catalogs.attributesConfig.removeCatalogAttribute": -type ProjectsLocationsCatalogsSetDefaultBranchCall struct { - s *Service - catalog string - googlecloudretailv2setdefaultbranchrequest *GoogleCloudRetailV2SetDefaultBranchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall struct { + s *Service + attributesConfig string + googlecloudretailv2removecatalogattributerequest *GoogleCloudRetailV2RemoveCatalogAttributeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetDefaultBranch: Set a specified branch id as default branch. API -// methods such as SearchService.Search, ProductService.GetProduct, -// ProductService.ListProducts will treat requests using -// "default_branch" to the actual branch id set as default. For example, -// if `projects/*/locations/*/catalogs/*/branches/1` is set as default, -// setting SearchRequest.branch to -// `projects/*/locations/*/catalogs/*/branches/default_branch` is -// equivalent to setting SearchRequest.branch to -// `projects/*/locations/*/catalogs/*/branches/1`. Using multiple -// branches can be useful when developers would like to have a staging -// branch to test and verify for future usage. When it becomes ready, -// developers switch on the staging branch using this API while keeping -// using `projects/*/locations/*/catalogs/*/branches/default_branch` as -// SearchRequest.branch to route the traffic to this staging branch. -// CAUTION: If you have live predict/search traffic, switching the -// default branch could potentially cause outages if the ID space of the -// new branch is very different from the old one. More specifically: * -// PredictionService will only return product IDs from branch -// {newBranch}. * SearchService will only return product IDs from branch -// {newBranch} (if branch is not explicitly set). * UserEventService -// will only join events with products from branch {newBranch}. +// RemoveCatalogAttribute: Removes the specified CatalogAttribute from +// the AttributesConfig. If the CatalogAttribute to remove does not +// exist, a NOT_FOUND error is returned. // -// - catalog: Full resource name of the catalog, such as -// `projects/*/locations/global/catalogs/default_catalog`. -func (r *ProjectsLocationsCatalogsService) SetDefaultBranch(catalog string, googlecloudretailv2setdefaultbranchrequest *GoogleCloudRetailV2SetDefaultBranchRequest) *ProjectsLocationsCatalogsSetDefaultBranchCall { - c := &ProjectsLocationsCatalogsSetDefaultBranchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.catalog = catalog - c.googlecloudretailv2setdefaultbranchrequest = googlecloudretailv2setdefaultbranchrequest +// - attributesConfig: Full AttributesConfig resource name. Format: +// `projects/{project_number}/locations/{location_id}/catalogs/{catalog +// _id}/attributesConfig`. +func (r *ProjectsLocationsCatalogsAttributesConfigService) RemoveCatalogAttribute(attributesConfig string, googlecloudretailv2removecatalogattributerequest *GoogleCloudRetailV2RemoveCatalogAttributeRequest) *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall { + c := &ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.attributesConfig = attributesConfig + c.googlecloudretailv2removecatalogattributerequest = googlecloudretailv2removecatalogattributerequest 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 *ProjectsLocationsCatalogsSetDefaultBranchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsSetDefaultBranchCall { +func (c *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7257,21 +8563,21 @@ func (c *ProjectsLocationsCatalogsSetDefaultBranchCall) Fields(s ...googleapi.Fi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCatalogsSetDefaultBranchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsSetDefaultBranchCall { +func (c *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCatalogsSetDefaultBranchCall) Header() http.Header { +func (c *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCatalogsSetDefaultBranchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall) 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_ { @@ -7279,14 +8585,14 @@ func (c *ProjectsLocationsCatalogsSetDefaultBranchCall) doRequest(alt string) (* } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2setdefaultbranchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2removecatalogattributerequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+catalog}:setDefaultBranch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+attributesConfig}:removeCatalogAttribute") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -7294,19 +8600,20 @@ func (c *ProjectsLocationsCatalogsSetDefaultBranchCall) doRequest(alt string) (* } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "catalog": c.catalog, + "attributesConfig": c.attributesConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "retail.projects.locations.catalogs.setDefaultBranch" 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 *ProjectsLocationsCatalogsSetDefaultBranchCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "retail.projects.locations.catalogs.attributesConfig.removeCatalogAttribute" call. +// Exactly one of *GoogleCloudRetailV2AttributesConfig or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudRetailV2AttributesConfig.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 *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2AttributesConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7325,7 +8632,7 @@ func (c *ProjectsLocationsCatalogsSetDefaultBranchCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudRetailV2AttributesConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7337,28 +8644,28 @@ func (c *ProjectsLocationsCatalogsSetDefaultBranchCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Set a specified branch id as default branch. API methods such as SearchService.Search, ProductService.GetProduct, ProductService.ListProducts will treat requests using \"default_branch\" to the actual branch id set as default. For example, if `projects/*/locations/*/catalogs/*/branches/1` is set as default, setting SearchRequest.branch to `projects/*/locations/*/catalogs/*/branches/default_branch` is equivalent to setting SearchRequest.branch to `projects/*/locations/*/catalogs/*/branches/1`. Using multiple branches can be useful when developers would like to have a staging branch to test and verify for future usage. When it becomes ready, developers switch on the staging branch using this API while keeping using `projects/*/locations/*/catalogs/*/branches/default_branch` as SearchRequest.branch to route the traffic to this staging branch. CAUTION: If you have live predict/search traffic, switching the default branch could potentially cause outages if the ID space of the new branch is very different from the old one. More specifically: * PredictionService will only return product IDs from branch {newBranch}. * SearchService will only return product IDs from branch {newBranch} (if branch is not explicitly set). * UserEventService will only join events with products from branch {newBranch}.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}:setDefaultBranch", + // "description": "Removes the specified CatalogAttribute from the AttributesConfig. If the CatalogAttribute to remove does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:removeCatalogAttribute", // "httpMethod": "POST", - // "id": "retail.projects.locations.catalogs.setDefaultBranch", + // "id": "retail.projects.locations.catalogs.attributesConfig.removeCatalogAttribute", // "parameterOrder": [ - // "catalog" + // "attributesConfig" // ], // "parameters": { - // "catalog": { - // "description": "Full resource name of the catalog, such as `projects/*/locations/global/catalogs/default_catalog`.", + // "attributesConfig": { + // "description": "Required. Full AttributesConfig resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+catalog}:setDefaultBranch", + // "path": "v2/{+attributesConfig}:removeCatalogAttribute", // "request": { - // "$ref": "GoogleCloudRetailV2SetDefaultBranchRequest" + // "$ref": "GoogleCloudRetailV2RemoveCatalogAttributeRequest" // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleCloudRetailV2AttributesConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index 122610e1d39..0053e04a4dd 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -441,6 +441,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "batchRemoveCatalogAttributes": { + "description": "Removes all specified CatalogAttributes from the AttributesConfig.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:batchRemoveCatalogAttributes", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.attributesConfig.batchRemoveCatalogAttributes", + "parameterOrder": [ + "attributesConfig" + ], + "parameters": { + "attributesConfig": { + "description": "Required. The attributes config resource shared by all catalog attributes being deleted. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+attributesConfig}:batchRemoveCatalogAttributes", + "request": { + "$ref": "GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesRequest" + }, + "response": { + "$ref": "GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "removeCatalogAttribute": { "description": "Removes the specified CatalogAttribute from the AttributesConfig. If the CatalogAttribute to remove does not exist, a NOT_FOUND error is returned.", "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:removeCatalogAttribute", @@ -2019,7 +2047,7 @@ } } }, - "revision": "20220722", + "revision": "20220729", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2540,6 +2568,41 @@ }, "type": "object" }, + "GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesRequest": { + "description": "Request for CatalogService.BatchRemoveCatalogAttributes method.", + "id": "GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesRequest", + "properties": { + "attributeKeys": { + "description": "Required. The attribute name keys of the CatalogAttributes to delete. A maximum of 1000 catalog attributes can be deleted in a batch.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesResponse": { + "description": "Response of the CatalogService.BatchRemoveCatalogAttributes.", + "id": "GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesResponse", + "properties": { + "deletedCatalogAttributes": { + "description": "Catalog attributes that were deleted. Only attributes that are not in use by products can be deleted.", + "items": { + "type": "string" + }, + "type": "array" + }, + "resetCatalogAttributes": { + "description": "Catalog attributes that were reset. Attributes that are in use by products cannot be deleted, however their configuration properties will reset to default values upon removal request.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaBigQueryOutputResult": { "description": "A BigQuery output result.", "id": "GoogleCloudRetailV2alphaBigQueryOutputResult", @@ -2560,7 +2623,7 @@ "id": "GoogleCloudRetailV2alphaBigQuerySource", "properties": { "dataSchema": { - "description": "The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: The schema is available here: https://support.google.com/analytics/answer/3437719. * `user_event_ga4`: This feature is in private preview. Please contact the support team for importing Google Analytics 4 events. The schema is available here: https://support.google.com/analytics/answer/7029846. Supported values for auto-completion imports: * `suggestions` (default): One JSON completion suggestion per line. * `denylist`: One JSON deny suggestion per line. * `allowlist`: One JSON allow suggestion per line.", + "description": "The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: The schema is available here: https://support.google.com/analytics/answer/3437719. * `user_event_ga4`: The schema is available here: https://support.google.com/analytics/answer/7029846. Supported values for auto-completion imports: * `suggestions` (default): One JSON completion suggestion per line. * `denylist`: One JSON deny suggestion per line. * `allowlist`: One JSON allow suggestion per line.", "type": "string" }, "datasetId": { @@ -2573,7 +2636,7 @@ }, "partitionDate": { "$ref": "GoogleTypeDate", - "description": "BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. Only supported when ImportProductsRequest.reconciliation_mode is set to `FULL`." + "description": "BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. Only supported in ImportProductsRequest." }, "projectId": { "description": "The project ID (can be project # or ID) that the BigQuery source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", @@ -2627,6 +2690,20 @@ ], "type": "string" }, + "exactSearchableOption": { + "description": "If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable. This property only applies to textual custom attributes and requires indexable set to enabled to enable exact-searchable.", + "enum": [ + "EXACT_SEARCHABLE_OPTION_UNSPECIFIED", + "EXACT_SEARCHABLE_ENABLED", + "EXACT_SEARCHABLE_DISABLED" + ], + "enumDescriptions": [ + "Value used when unset. Defaults to EXACT_SEARCHABLE_DISABLED.", + "Exact searchable option enabled for an attribute.", + "Exact searchable option disabled for an attribute." + ], + "type": "string" + }, "inUse": { "description": "Output only. Indicates whether this attribute has been used by any products. `True` if at least one Product is using this attribute in Product.attributes. Otherwise, this field is `False`. CatalogAttribute can be pre-loaded by using CatalogService.AddCatalogAttribute, CatalogService.ImportCatalogAttributes, or CatalogService.UpdateAttributesConfig APIs. This field is `False` for pre-loaded CatalogAttributes. Only pre-loaded CatalogAttributes that are neither in use by products nor predefined can be deleted. CatalogAttributes that are either in use by products or are predefined cannot be deleted; however, their configuration properties will reset to default values upon removal request. After catalog changes, it takes about 10 minutes for this field to update.", "readOnly": true, @@ -2809,12 +2886,12 @@ "type": "string" }, "maxSuggestions": { - "description": "The maximum number of autocomplete suggestions returned per term. The maximum allowed max suggestions is 20. Default value is 20. If left unset or set to 0, then will fallback to default value.", + "description": "The maximum number of autocomplete suggestions returned per term. Default value is 20. If left unset or set to 0, then will fallback to default value. Value range is 1 to 20.", "format": "int32", "type": "integer" }, "minPrefixLength": { - "description": "The minimum number of characters needed to be typed in order to get suggestions. Default value is 2. If left unset or set to 0, then will fallback to default value.", + "description": "The minimum number of characters needed to be typed in order to get suggestions. Default value is 2. If left unset or set to 0, then will fallback to default value. Value range is 1 to 20.", "format": "int32", "type": "integer" }, @@ -3219,6 +3296,10 @@ "format": "int64", "type": "string" }, + "transformedUserEventsMetadata": { + "$ref": "GoogleCloudRetailV2alphaTransformedUserEventsMetadata", + "description": "Metadata related to transform user events." + }, "updateTime": { "description": "Operation last update time. If the operation is done, this is also the finish time.", "format": "google-datetime", @@ -3240,7 +3321,7 @@ "description": "Required. The desired input location of the data." }, "notificationPubsubTopic": { - "description": "Full Pub/Sub topic name for receiving notification. If this field is set, when the import is finished, a notification will be sent to specified Pub/Sub topic. The message data will be JSON string of a Operation. Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has to be within the same project as ImportProductsRequest.parent. Make sure that both `cloud-retail-customer-data-access@system.gserviceaccount.com` and `service-@gcp-sa-retail.iam.gserviceaccount.com` have the `pubsub.topics.publish` IAM permission on the topic. Only supported when ImportProductsRequest.reconciliation_mode is set to `FULL`.", + "description": "Full Pub/Sub topic name for receiving notification. If this field is set, when the import is finished, a notification will be sent to specified Pub/Sub topic. The message data will be JSON string of a Operation. Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has to be within the same project as ImportProductsRequest.parent. Make sure that `service-@gcp-sa-retail.iam.gserviceaccount.com` has the `pubsub.topics.publish` IAM permission on the topic.", "type": "string" }, "reconciliationMode": { @@ -3253,7 +3334,7 @@ "enumDescriptions": [ "Defaults to INCREMENTAL.", "Inserts new products or updates existing products.", - "Calculates diff and replaces the entire product dataset. Existing products may be deleted if they are not present in the source location. Can only be set while using BigQuerySource. And the BigQuery dataset must be created in the data location \"us (multiple regions in United States)\", otherwise a PERMISSION_DENIED error is thrown. Add the IAM permission \"BigQuery Data Viewer\" for cloud-retail-customer-data-access@system.gserviceaccount.com before using this feature otherwise an error is thrown." + "Calculates diff and replaces the entire product dataset. Existing products may be deleted if they are not present in the source location." ], "type": "string" }, @@ -3550,7 +3631,7 @@ "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.", + "description": "Required. The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Cloud Cosole Dashboard. UTF-8 encoded string with limit of 1024 characters.", "type": "string" }, "filteringOption": { @@ -3964,7 +4045,7 @@ "type": "array" }, "collectionMemberIds": { - "description": "The id of the collection members when type is Type.COLLECTION. Non-existent product ids are allowed. The type of the members must be either Type.PRIMARY or Type.VARIANT otherwise and INVALID_ARGUMENT error is thrown. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return.", + "description": "The id of the collection members when type is Type.COLLECTION. Non-existent product ids are allowed. The type of the members must be either Type.PRIMARY or Type.VARIANT otherwise an INVALID_ARGUMENT error is thrown. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return.", "items": { "type": "string" }, @@ -4943,6 +5024,10 @@ "type": "string" }, "type": "array" + }, + "returnMinMax": { + "description": "Returns the min and max value for each numerical facet intervals. Ignored for textual facets.", + "type": "boolean" } }, "type": "object" @@ -4960,7 +5045,7 @@ ], "enumDescriptions": [ "Default value. Defaults to Mode.AUTO.", - "Let CRS decide whether to use personalization.", + "Let CRS decide whether to use personalization based on quality of user event data.", "Disable personalization." ], "type": "string" @@ -5109,6 +5194,16 @@ "$ref": "GoogleCloudRetailV2alphaInterval", "description": "Interval value for a facet, such as [10, 20) for facet \"price\"." }, + "maxValue": { + "description": "The maximum value in the FacetValue.interval. Only supported on numerical facets and returned if SearchRequest.FacetSpec.FacetKey.return_min_max is true.", + "format": "double", + "type": "number" + }, + "minValue": { + "description": "The minimum value in the FacetValue.interval. Only supported on numerical facets and returned if SearchRequest.FacetSpec.FacetKey.return_min_max is true.", + "format": "double", + "type": "number" + }, "value": { "description": "Text value of a facet, such as \"Black\" for facet \"colorFamilies\".", "type": "string" @@ -5153,6 +5248,13 @@ "description": "If a variant Product matches the search query, this map indicates which Product fields are matched. The key is the Product.name, the value is a field mask of the matched Product fields. If matched attributes cannot be determined, this map will be empty. For example, a key \"sku1\" with field mask \"products.color_info\" indicates there is a match between \"sku1\" ColorInfo and the query.", "type": "object" }, + "personalLabels": { + "description": "Specifies previous events related to this product for this user based on UserEvent with same SearchRequest.visitor_id or UserInfo.user_id. This is set only when SearchRequest.PersonalizationSpec.mode is SearchRequest.PersonalizationSpec.Mode.AUTO. Possible values: * `purchased`: Indicates that this product has been purchased before.", + "items": { + "type": "string" + }, + "type": "array" + }, "product": { "$ref": "GoogleCloudRetailV2alphaProduct", "description": "The product data snippet in the search response. Only Product.name is guaranteed to be populated. Product.variants contains the product variants that match the search query. If there are multiple product variants matching the query, top 5 most relevant product variants are returned and ordered by relevancy. If relevancy can be deternmined, use matching_variant_fields to look up matched product variants fields. If relevancy cannot be determined, e.g. when searching \"shoe\" all products in a shoe product can be a match, 5 product variants are returned but order is meaningless." @@ -5338,6 +5440,23 @@ "properties": {}, "type": "object" }, + "GoogleCloudRetailV2alphaTransformedUserEventsMetadata": { + "description": "Metadata related to transform user events operation.", + "id": "GoogleCloudRetailV2alphaTransformedUserEventsMetadata", + "properties": { + "sourceEventsCount": { + "description": "Count of entries in the source user events BigQuery table.", + "format": "int64", + "type": "string" + }, + "transformedEventsCount": { + "description": "Count of entries in the transformed user events BigQuery table, which could be different from the actually imported number of user events.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaTuneModelMetadata": { "description": "Metadata associated with a tune operation.", "id": "GoogleCloudRetailV2alphaTuneModelMetadata", diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index 7453c74a2c4..f8bf6193e1e 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -1299,6 +1299,79 @@ func (s *GoogleCloudRetailV2alphaAudience) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesRequest: Request +// for CatalogService.BatchRemoveCatalogAttributes method. +type GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesRequest struct { + // AttributeKeys: Required. The attribute name keys of the + // CatalogAttributes to delete. A maximum of 1000 catalog attributes can + // be deleted in a batch. + AttributeKeys []string `json:"attributeKeys,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AttributeKeys") 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. "AttributeKeys") 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 *GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesResponse: +// Response of the CatalogService.BatchRemoveCatalogAttributes. +type GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesResponse struct { + // DeletedCatalogAttributes: Catalog attributes that were deleted. Only + // attributes that are not in use by products can be deleted. + DeletedCatalogAttributes []string `json:"deletedCatalogAttributes,omitempty"` + + // ResetCatalogAttributes: Catalog attributes that were reset. + // Attributes that are in use by products cannot be deleted, however + // their configuration properties will reset to default values upon + // removal request. + ResetCatalogAttributes []string `json:"resetCatalogAttributes,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "DeletedCatalogAttributes") 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. "DeletedCatalogAttributes") + // 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 *GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaBigQueryOutputResult: A BigQuery output // result. type GoogleCloudRetailV2alphaBigQueryOutputResult struct { @@ -1343,9 +1416,7 @@ type GoogleCloudRetailV2alphaBigQuerySource struct { // Supported values for user events imports: * `user_event` (default): // One JSON UserEvent per line. * `user_event_ga360`: The schema is // available here: https://support.google.com/analytics/answer/3437719. - // * `user_event_ga4`: This feature is in private preview. Please - // contact the support team for importing Google Analytics 4 events. The - // schema is available here: + // * `user_event_ga4`: The schema is available here: // https://support.google.com/analytics/answer/7029846. Supported values // for auto-completion imports: * `suggestions` (default): One JSON // completion suggestion per line. * `denylist`: One JSON deny @@ -1364,8 +1435,7 @@ type GoogleCloudRetailV2alphaBigQuerySource struct { GcsStagingDir string `json:"gcsStagingDir,omitempty"` // PartitionDate: BigQuery time partitioned table's _PARTITIONDATE in - // YYYY-MM-DD format. Only supported when - // ImportProductsRequest.reconciliation_mode is set to `FULL`. + // YYYY-MM-DD format. Only supported in ImportProductsRequest. PartitionDate *GoogleTypeDate `json:"partitionDate,omitempty"` // ProjectId: The project ID (can be project # or ID) that the BigQuery @@ -1466,6 +1536,20 @@ type GoogleCloudRetailV2alphaCatalogAttribute struct { // for an attribute. DynamicFacetableOption string `json:"dynamicFacetableOption,omitempty"` + // ExactSearchableOption: If EXACT_SEARCHABLE_ENABLED, attribute values + // will be exact searchable. This property only applies to textual + // custom attributes and requires indexable set to enabled to enable + // exact-searchable. + // + // Possible values: + // "EXACT_SEARCHABLE_OPTION_UNSPECIFIED" - Value used when unset. + // Defaults to EXACT_SEARCHABLE_DISABLED. + // "EXACT_SEARCHABLE_ENABLED" - Exact searchable option enabled for an + // attribute. + // "EXACT_SEARCHABLE_DISABLED" - Exact searchable option disabled for + // an attribute. + ExactSearchableOption string `json:"exactSearchableOption,omitempty"` + // InUse: Output only. Indicates whether this attribute has been used by // any products. `True` if at least one Product is using this attribute // in Product.attributes. Otherwise, this field is `False`. @@ -1777,14 +1861,13 @@ type GoogleCloudRetailV2alphaCompletionConfig struct { MatchingOrder string `json:"matchingOrder,omitempty"` // MaxSuggestions: The maximum number of autocomplete suggestions - // returned per term. The maximum allowed max suggestions is 20. Default - // value is 20. If left unset or set to 0, then will fallback to default - // value. + // returned per term. Default value is 20. If left unset or set to 0, + // then will fallback to default value. Value range is 1 to 20. MaxSuggestions int64 `json:"maxSuggestions,omitempty"` // MinPrefixLength: The minimum number of characters needed to be typed // in order to get suggestions. Default value is 2. If left unset or set - // to 0, then will fallback to default value. + // to 0, then will fallback to default value. Value range is 1 to 20. MinPrefixLength int64 `json:"minPrefixLength,omitempty"` // Name: Required. Immutable. Fully qualified name @@ -2621,6 +2704,10 @@ type GoogleCloudRetailV2alphaImportMetadata struct { // SuccessCount: Count of entries that were processed successfully. SuccessCount int64 `json:"successCount,omitempty,string"` + // TransformedUserEventsMetadata: Metadata related to transform user + // events. + TransformedUserEventsMetadata *GoogleCloudRetailV2alphaTransformedUserEventsMetadata `json:"transformedUserEventsMetadata,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, // this is also the finish time. UpdateTime string `json:"updateTime,omitempty"` @@ -2663,11 +2750,9 @@ type GoogleCloudRetailV2alphaImportProductsRequest struct { // notification will be sent to specified Pub/Sub topic. The message // data will be JSON string of a Operation. Format of the Pub/Sub topic // is `projects/{project}/topics/{topic}`. It has to be within the same - // project as ImportProductsRequest.parent. Make sure that both - // `cloud-retail-customer-data-access@system.gserviceaccount.com` and - // `service-@gcp-sa-retail.iam.gserviceaccount.com` have the - // `pubsub.topics.publish` IAM permission on the topic. Only supported - // when ImportProductsRequest.reconciliation_mode is set to `FULL`. + // project as ImportProductsRequest.parent. Make sure that + // `service-@gcp-sa-retail.iam.gserviceaccount.com` has the + // `pubsub.topics.publish` IAM permission on the topic. NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"` // ReconciliationMode: The mode of reconciliation between existing @@ -2679,12 +2764,7 @@ type GoogleCloudRetailV2alphaImportProductsRequest struct { // "INCREMENTAL" - Inserts new products or updates existing products. // "FULL" - Calculates diff and replaces the entire product dataset. // Existing products may be deleted if they are not present in the - // source location. Can only be set while using BigQuerySource. And the - // BigQuery dataset must be created in the data location "us (multiple - // regions in United States)", otherwise a PERMISSION_DENIED error is - // thrown. Add the IAM permission "BigQuery Data Viewer" for - // cloud-retail-customer-data-access@system.gserviceaccount.com before - // using this feature otherwise an error is thrown. + // source location. ReconciliationMode string `json:"reconciliationMode,omitempty"` // RequestId: Deprecated. This field has no effect. @@ -3264,9 +3344,8 @@ type GoogleCloudRetailV2alphaModel struct { 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. + // readable, used to display Recommendation Models in the Retail Cloud + // Cosole Dashboard. UTF-8 encoded string with limit of 1024 characters. DisplayName string `json:"displayName,omitempty"` // FilteringOption: Optional. If RECOMMENDATIONS_FILTERING_ENABLED, @@ -4048,7 +4127,7 @@ type GoogleCloudRetailV2alphaProduct struct { // CollectionMemberIds: The id of the collection members when type is // Type.COLLECTION. Non-existent product ids are allowed. The type of - // the members must be either Type.PRIMARY or Type.VARIANT otherwise and + // the members must be either Type.PRIMARY or Type.VARIANT otherwise an // INVALID_ARGUMENT error is thrown. Should not set it for other types. // A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT // error is return. @@ -6052,6 +6131,10 @@ type GoogleCloudRetailV2alphaSearchRequestFacetSpecFacetKey struct { // customFulfillment5 RestrictedValues []string `json:"restrictedValues,omitempty"` + // ReturnMinMax: Returns the min and max value for each numerical facet + // intervals. Ignored for textual facets. + ReturnMinMax bool `json:"returnMinMax,omitempty"` + // ForceSendFields is a list of field names (e.g. "CaseInsensitive") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -6083,7 +6166,8 @@ type GoogleCloudRetailV2alphaSearchRequestPersonalizationSpec struct { // // Possible values: // "MODE_UNSPECIFIED" - Default value. Defaults to Mode.AUTO. - // "AUTO" - Let CRS decide whether to use personalization. + // "AUTO" - Let CRS decide whether to use personalization based on + // quality of user event data. // "DISABLED" - Disable personalization. Mode string `json:"mode,omitempty"` @@ -6314,6 +6398,16 @@ type GoogleCloudRetailV2alphaSearchResponseFacetFacetValue struct { // "price". Interval *GoogleCloudRetailV2alphaInterval `json:"interval,omitempty"` + // MaxValue: The maximum value in the FacetValue.interval. Only + // supported on numerical facets and returned if + // SearchRequest.FacetSpec.FacetKey.return_min_max is true. + MaxValue float64 `json:"maxValue,omitempty"` + + // MinValue: The minimum value in the FacetValue.interval. Only + // supported on numerical facets and returned if + // SearchRequest.FacetSpec.FacetKey.return_min_max is true. + MinValue float64 `json:"minValue,omitempty"` + // Value: Text value of a facet, such as "Black" for facet // "colorFamilies". Value string `json:"value,omitempty"` @@ -6341,6 +6435,22 @@ func (s *GoogleCloudRetailV2alphaSearchResponseFacetFacetValue) MarshalJSON() ([ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudRetailV2alphaSearchResponseFacetFacetValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudRetailV2alphaSearchResponseFacetFacetValue + var s1 struct { + MaxValue gensupport.JSONFloat64 `json:"maxValue"` + MinValue gensupport.JSONFloat64 `json:"minValue"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.MaxValue = float64(s1.MaxValue) + s.MinValue = float64(s1.MinValue) + return nil +} + // GoogleCloudRetailV2alphaSearchResponseQueryExpansionInfo: Information // describing query expansion including whether expansion has occurred. type GoogleCloudRetailV2alphaSearchResponseQueryExpansionInfo struct { @@ -6394,6 +6504,14 @@ type GoogleCloudRetailV2alphaSearchResponseSearchResult struct { // ColorInfo and the query. MatchingVariantFields map[string]string `json:"matchingVariantFields,omitempty"` + // PersonalLabels: Specifies previous events related to this product for + // this user based on UserEvent with same SearchRequest.visitor_id or + // UserInfo.user_id. This is set only when + // SearchRequest.PersonalizationSpec.mode is + // SearchRequest.PersonalizationSpec.Mode.AUTO. Possible values: * + // `purchased`: Indicates that this product has been purchased before. + PersonalLabels []string `json:"personalLabels,omitempty"` + // Product: The product data snippet in the search response. Only // Product.name is guaranteed to be populated. Product.variants contains // the product variants that match the search query. If there are @@ -6743,6 +6861,42 @@ func (s *GoogleCloudRetailV2alphaSetInventoryRequest) MarshalJSON() ([]byte, err type GoogleCloudRetailV2alphaSetInventoryResponse struct { } +// GoogleCloudRetailV2alphaTransformedUserEventsMetadata: Metadata +// related to transform user events operation. +type GoogleCloudRetailV2alphaTransformedUserEventsMetadata struct { + // SourceEventsCount: Count of entries in the source user events + // BigQuery table. + SourceEventsCount int64 `json:"sourceEventsCount,omitempty,string"` + + // TransformedEventsCount: Count of entries in the transformed user + // events BigQuery table, which could be different from the actually + // imported number of user events. + TransformedEventsCount int64 `json:"transformedEventsCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "SourceEventsCount") + // 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. "SourceEventsCount") 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 *GoogleCloudRetailV2alphaTransformedUserEventsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaTransformedUserEventsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaTuneModelMetadata: Metadata associated with a // tune operation. type GoogleCloudRetailV2alphaTuneModelMetadata struct { @@ -9641,6 +9795,155 @@ func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(op } +// method id "retail.projects.locations.catalogs.attributesConfig.batchRemoveCatalogAttributes": + +type ProjectsLocationsCatalogsAttributesConfigBatchRemoveCatalogAttributesCall struct { + s *Service + attributesConfig string + googlecloudretailv2alphabatchremovecatalogattributesrequest *GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchRemoveCatalogAttributes: Removes all specified CatalogAttributes +// from the AttributesConfig. +// +// - attributesConfig: The attributes config resource shared by all +// catalog attributes being deleted. Format: +// `projects/{project_number}/locations/{location_id}/catalogs/{catalog +// _id}/attributesConfig`. +func (r *ProjectsLocationsCatalogsAttributesConfigService) BatchRemoveCatalogAttributes(attributesConfig string, googlecloudretailv2alphabatchremovecatalogattributesrequest *GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesRequest) *ProjectsLocationsCatalogsAttributesConfigBatchRemoveCatalogAttributesCall { + c := &ProjectsLocationsCatalogsAttributesConfigBatchRemoveCatalogAttributesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.attributesConfig = attributesConfig + c.googlecloudretailv2alphabatchremovecatalogattributesrequest = googlecloudretailv2alphabatchremovecatalogattributesrequest + 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 *ProjectsLocationsCatalogsAttributesConfigBatchRemoveCatalogAttributesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsAttributesConfigBatchRemoveCatalogAttributesCall { + 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 *ProjectsLocationsCatalogsAttributesConfigBatchRemoveCatalogAttributesCall) Context(ctx context.Context) *ProjectsLocationsCatalogsAttributesConfigBatchRemoveCatalogAttributesCall { + 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 *ProjectsLocationsCatalogsAttributesConfigBatchRemoveCatalogAttributesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsAttributesConfigBatchRemoveCatalogAttributesCall) 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.googlecloudretailv2alphabatchremovecatalogattributesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+attributesConfig}:batchRemoveCatalogAttributes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "attributesConfig": c.attributesConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.attributesConfig.batchRemoveCatalogAttributes" call. +// Exactly one of +// *GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesResponse.ServerRe +// sponse.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 *ProjectsLocationsCatalogsAttributesConfigBatchRemoveCatalogAttributesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesResponse, 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 := &GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesResponse{ + 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": "Removes all specified CatalogAttributes from the AttributesConfig.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:batchRemoveCatalogAttributes", + // "httpMethod": "POST", + // "id": "retail.projects.locations.catalogs.attributesConfig.batchRemoveCatalogAttributes", + // "parameterOrder": [ + // "attributesConfig" + // ], + // "parameters": { + // "attributesConfig": { + // "description": "Required. The attributes config resource shared by all catalog attributes being deleted. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+attributesConfig}:batchRemoveCatalogAttributes", + // "request": { + // "$ref": "GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesRequest" + // }, + // "response": { + // "$ref": "GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "retail.projects.locations.catalogs.attributesConfig.removeCatalogAttribute": type ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall struct { diff --git a/retail/v2beta/retail-api.json b/retail/v2beta/retail-api.json index b7b6aa45b8f..66f98e8cf4c 100644 --- a/retail/v2beta/retail-api.json +++ b/retail/v2beta/retail-api.json @@ -441,6 +441,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "batchRemoveCatalogAttributes": { + "description": "Removes all specified CatalogAttributes from the AttributesConfig.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:batchRemoveCatalogAttributes", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.attributesConfig.batchRemoveCatalogAttributes", + "parameterOrder": [ + "attributesConfig" + ], + "parameters": { + "attributesConfig": { + "description": "Required. The attributes config resource shared by all catalog attributes being deleted. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+attributesConfig}:batchRemoveCatalogAttributes", + "request": { + "$ref": "GoogleCloudRetailV2betaBatchRemoveCatalogAttributesRequest" + }, + "response": { + "$ref": "GoogleCloudRetailV2betaBatchRemoveCatalogAttributesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "removeCatalogAttribute": { "description": "Removes the specified CatalogAttribute from the AttributesConfig. If the CatalogAttribute to remove does not exist, a NOT_FOUND error is returned.", "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:removeCatalogAttribute", @@ -1770,7 +1798,7 @@ } } }, - "revision": "20220722", + "revision": "20220729", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2310,6 +2338,10 @@ "format": "int64", "type": "string" }, + "transformedUserEventsMetadata": { + "$ref": "GoogleCloudRetailV2alphaTransformedUserEventsMetadata", + "description": "Metadata related to transform user events." + }, "updateTime": { "description": "Operation last update time. If the operation is done, this is also the finish time.", "format": "google-datetime", @@ -2384,7 +2416,7 @@ "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.", + "description": "Required. The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Cloud Cosole Dashboard. UTF-8 encoded string with limit of 1024 characters.", "type": "string" }, "filteringOption": { @@ -2707,6 +2739,23 @@ "properties": {}, "type": "object" }, + "GoogleCloudRetailV2alphaTransformedUserEventsMetadata": { + "description": "Metadata related to transform user events operation.", + "id": "GoogleCloudRetailV2alphaTransformedUserEventsMetadata", + "properties": { + "sourceEventsCount": { + "description": "Count of entries in the source user events BigQuery table.", + "format": "int64", + "type": "string" + }, + "transformedEventsCount": { + "description": "Count of entries in the transformed user events BigQuery table, which could be different from the actually imported number of user events.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaTuneModelMetadata": { "description": "Metadata associated with a tune operation.", "id": "GoogleCloudRetailV2alphaTuneModelMetadata", @@ -2896,6 +2945,41 @@ }, "type": "object" }, + "GoogleCloudRetailV2betaBatchRemoveCatalogAttributesRequest": { + "description": "Request for CatalogService.BatchRemoveCatalogAttributes method.", + "id": "GoogleCloudRetailV2betaBatchRemoveCatalogAttributesRequest", + "properties": { + "attributeKeys": { + "description": "Required. The attribute name keys of the CatalogAttributes to delete. A maximum of 1000 catalog attributes can be deleted in a batch.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2betaBatchRemoveCatalogAttributesResponse": { + "description": "Response of the CatalogService.BatchRemoveCatalogAttributes.", + "id": "GoogleCloudRetailV2betaBatchRemoveCatalogAttributesResponse", + "properties": { + "deletedCatalogAttributes": { + "description": "Catalog attributes that were deleted. Only attributes that are not in use by products can be deleted.", + "items": { + "type": "string" + }, + "type": "array" + }, + "resetCatalogAttributes": { + "description": "Catalog attributes that were reset. Attributes that are in use by products cannot be deleted, however their configuration properties will reset to default values upon removal request.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaBigQueryOutputResult": { "description": "A BigQuery output result.", "id": "GoogleCloudRetailV2betaBigQueryOutputResult", @@ -2916,7 +3000,7 @@ "id": "GoogleCloudRetailV2betaBigQuerySource", "properties": { "dataSchema": { - "description": "The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: The schema is available here: https://support.google.com/analytics/answer/3437719. * `user_event_ga4`: This feature is in private preview. Please contact the support team for importing Google Analytics 4 events. The schema is available here: https://support.google.com/analytics/answer/7029846. Supported values for auto-completion imports: * `suggestions` (default): One JSON completion suggestion per line. * `denylist`: One JSON deny suggestion per line. * `allowlist`: One JSON allow suggestion per line.", + "description": "The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: The schema is available here: https://support.google.com/analytics/answer/3437719. * `user_event_ga4`: The schema is available here: https://support.google.com/analytics/answer/7029846. Supported values for auto-completion imports: * `suggestions` (default): One JSON completion suggestion per line. * `denylist`: One JSON deny suggestion per line. * `allowlist`: One JSON allow suggestion per line.", "type": "string" }, "datasetId": { @@ -2929,7 +3013,7 @@ }, "partitionDate": { "$ref": "GoogleTypeDate", - "description": "BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. Only supported when ImportProductsRequest.reconciliation_mode is set to `FULL`." + "description": "BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. Only supported in ImportProductsRequest." }, "projectId": { "description": "The project ID (can be project # or ID) that the BigQuery source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", @@ -2983,6 +3067,20 @@ ], "type": "string" }, + "exactSearchableOption": { + "description": "If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable. This property only applies to textual custom attributes and requires indexable set to enabled to enable exact-searchable.", + "enum": [ + "EXACT_SEARCHABLE_OPTION_UNSPECIFIED", + "EXACT_SEARCHABLE_ENABLED", + "EXACT_SEARCHABLE_DISABLED" + ], + "enumDescriptions": [ + "Value used when unset. Defaults to EXACT_SEARCHABLE_DISABLED.", + "Exact searchable option enabled for an attribute.", + "Exact searchable option disabled for an attribute." + ], + "type": "string" + }, "inUse": { "description": "Output only. Indicates whether this attribute has been used by any products. `True` if at least one Product is using this attribute in Product.attributes. Otherwise, this field is `False`. CatalogAttribute can be pre-loaded by using CatalogService.AddCatalogAttribute, CatalogService.ImportCatalogAttributes, or CatalogService.UpdateAttributesConfig APIs. This field is `False` for pre-loaded CatalogAttributes. Only pre-loaded CatalogAttributes that are neither in use by products nor predefined can be deleted. CatalogAttributes that are either in use by products or are predefined cannot be deleted; however, their configuration properties will reset to default values upon removal request. After catalog changes, it takes about 10 minutes for this field to update.", "readOnly": true, @@ -3165,12 +3263,12 @@ "type": "string" }, "maxSuggestions": { - "description": "The maximum number of autocomplete suggestions returned per term. The maximum allowed max suggestions is 20. Default value is 20. If left unset or set to 0, then will fallback to default value.", + "description": "The maximum number of autocomplete suggestions returned per term. Default value is 20. If left unset or set to 0, then will fallback to default value. Value range is 1 to 20.", "format": "int32", "type": "integer" }, "minPrefixLength": { - "description": "The minimum number of characters needed to be typed in order to get suggestions. Default value is 2. If left unset or set to 0, then will fallback to default value.", + "description": "The minimum number of characters needed to be typed in order to get suggestions. Default value is 2. If left unset or set to 0, then will fallback to default value. Value range is 1 to 20.", "format": "int32", "type": "integer" }, @@ -3585,7 +3683,7 @@ "description": "Required. The desired input location of the data." }, "notificationPubsubTopic": { - "description": "Full Pub/Sub topic name for receiving notification. If this field is set, when the import is finished, a notification will be sent to specified Pub/Sub topic. The message data will be JSON string of a Operation. Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has to be within the same project as ImportProductsRequest.parent. Make sure that both `cloud-retail-customer-data-access@system.gserviceaccount.com` and `service-@gcp-sa-retail.iam.gserviceaccount.com` have the `pubsub.topics.publish` IAM permission on the topic. Only supported when ImportProductsRequest.reconciliation_mode is set to `FULL`.", + "description": "Full Pub/Sub topic name for receiving notification. If this field is set, when the import is finished, a notification will be sent to specified Pub/Sub topic. The message data will be JSON string of a Operation. Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has to be within the same project as ImportProductsRequest.parent. Make sure that `service-@gcp-sa-retail.iam.gserviceaccount.com` has the `pubsub.topics.publish` IAM permission on the topic.", "type": "string" }, "reconciliationMode": { @@ -3598,7 +3696,7 @@ "enumDescriptions": [ "Defaults to INCREMENTAL.", "Inserts new products or updates existing products.", - "Calculates diff and replaces the entire product dataset. Existing products may be deleted if they are not present in the source location. Can only be set while using BigQuerySource. And the BigQuery dataset must be created in the data location \"us (multiple regions in United States)\", otherwise a PERMISSION_DENIED error is thrown. Add the IAM permission \"BigQuery Data Viewer\" for cloud-retail-customer-data-access@system.gserviceaccount.com before using this feature otherwise an error is thrown." + "Calculates diff and replaces the entire product dataset. Existing products may be deleted if they are not present in the source location." ], "type": "string" }, @@ -4059,7 +4157,7 @@ "type": "array" }, "collectionMemberIds": { - "description": "The id of the collection members when type is Type.COLLECTION. Non-existent product ids are allowed. The type of the members must be either Type.PRIMARY or Type.VARIANT otherwise and INVALID_ARGUMENT error is thrown. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return.", + "description": "The id of the collection members when type is Type.COLLECTION. Non-existent product ids are allowed. The type of the members must be either Type.PRIMARY or Type.VARIANT otherwise an INVALID_ARGUMENT error is thrown. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return.", "items": { "type": "string" }, @@ -4953,6 +5051,10 @@ "type": "string" }, "type": "array" + }, + "returnMinMax": { + "description": "Returns the min and max value for each numerical facet intervals. Ignored for textual facets.", + "type": "boolean" } }, "type": "object" @@ -4970,7 +5072,7 @@ ], "enumDescriptions": [ "Default value. Defaults to Mode.AUTO.", - "Let CRS decide whether to use personalization.", + "Let CRS decide whether to use personalization based on quality of user event data.", "Disable personalization." ], "type": "string" @@ -5119,6 +5221,16 @@ "$ref": "GoogleCloudRetailV2betaInterval", "description": "Interval value for a facet, such as [10, 20) for facet \"price\"." }, + "maxValue": { + "description": "The maximum value in the FacetValue.interval. Only supported on numerical facets and returned if SearchRequest.FacetSpec.FacetKey.return_min_max is true.", + "format": "double", + "type": "number" + }, + "minValue": { + "description": "The minimum value in the FacetValue.interval. Only supported on numerical facets and returned if SearchRequest.FacetSpec.FacetKey.return_min_max is true.", + "format": "double", + "type": "number" + }, "value": { "description": "Text value of a facet, such as \"Black\" for facet \"colorFamilies\".", "type": "string" @@ -5163,6 +5275,13 @@ "description": "If a variant Product matches the search query, this map indicates which Product fields are matched. The key is the Product.name, the value is a field mask of the matched Product fields. If matched attributes cannot be determined, this map will be empty. For example, a key \"sku1\" with field mask \"products.color_info\" indicates there is a match between \"sku1\" ColorInfo and the query.", "type": "object" }, + "personalLabels": { + "description": "Specifies previous events related to this product for this user based on UserEvent with same SearchRequest.visitor_id or UserInfo.user_id. This is set only when SearchRequest.PersonalizationSpec.mode is SearchRequest.PersonalizationSpec.Mode.AUTO. Possible values: * `purchased`: Indicates that this product has been purchased before.", + "items": { + "type": "string" + }, + "type": "array" + }, "product": { "$ref": "GoogleCloudRetailV2betaProduct", "description": "The product data snippet in the search response. Only Product.name is guaranteed to be populated. Product.variants contains the product variants that match the search query. If there are multiple product variants matching the query, top 5 most relevant product variants are returned and ordered by relevancy. If relevancy can be deternmined, use matching_variant_fields to look up matched product variants fields. If relevancy cannot be determined, e.g. when searching \"shoe\" all products in a shoe product can be a match, 5 product variants are returned but order is meaningless." diff --git a/retail/v2beta/retail-gen.go b/retail/v2beta/retail-gen.go index fa685ba0b64..f3746faff7d 100644 --- a/retail/v2beta/retail-gen.go +++ b/retail/v2beta/retail-gen.go @@ -1307,6 +1307,10 @@ type GoogleCloudRetailV2alphaImportMetadata struct { // SuccessCount: Count of entries that were processed successfully. SuccessCount int64 `json:"successCount,omitempty,string"` + // TransformedUserEventsMetadata: Metadata related to transform user + // events. + TransformedUserEventsMetadata *GoogleCloudRetailV2alphaTransformedUserEventsMetadata `json:"transformedUserEventsMetadata,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, // this is also the finish time. UpdateTime string `json:"updateTime,omitempty"` @@ -1435,9 +1439,8 @@ type GoogleCloudRetailV2alphaModel struct { 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. + // readable, used to display Recommendation Models in the Retail Cloud + // Cosole Dashboard. UTF-8 encoded string with limit of 1024 characters. DisplayName string `json:"displayName,omitempty"` // FilteringOption: Optional. If RECOMMENDATIONS_FILTERING_ENABLED, @@ -1995,6 +1998,42 @@ type GoogleCloudRetailV2alphaSetInventoryMetadata struct { type GoogleCloudRetailV2alphaSetInventoryResponse struct { } +// GoogleCloudRetailV2alphaTransformedUserEventsMetadata: Metadata +// related to transform user events operation. +type GoogleCloudRetailV2alphaTransformedUserEventsMetadata struct { + // SourceEventsCount: Count of entries in the source user events + // BigQuery table. + SourceEventsCount int64 `json:"sourceEventsCount,omitempty,string"` + + // TransformedEventsCount: Count of entries in the transformed user + // events BigQuery table, which could be different from the actually + // imported number of user events. + TransformedEventsCount int64 `json:"transformedEventsCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "SourceEventsCount") + // 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. "SourceEventsCount") 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 *GoogleCloudRetailV2alphaTransformedUserEventsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaTransformedUserEventsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaTuneModelMetadata: Metadata associated with a // tune operation. type GoogleCloudRetailV2alphaTuneModelMetadata struct { @@ -2375,6 +2414,79 @@ func (s *GoogleCloudRetailV2betaAudience) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2betaBatchRemoveCatalogAttributesRequest: Request +// for CatalogService.BatchRemoveCatalogAttributes method. +type GoogleCloudRetailV2betaBatchRemoveCatalogAttributesRequest struct { + // AttributeKeys: Required. The attribute name keys of the + // CatalogAttributes to delete. A maximum of 1000 catalog attributes can + // be deleted in a batch. + AttributeKeys []string `json:"attributeKeys,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AttributeKeys") 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. "AttributeKeys") 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 *GoogleCloudRetailV2betaBatchRemoveCatalogAttributesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaBatchRemoveCatalogAttributesRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2betaBatchRemoveCatalogAttributesResponse: Response +// of the CatalogService.BatchRemoveCatalogAttributes. +type GoogleCloudRetailV2betaBatchRemoveCatalogAttributesResponse struct { + // DeletedCatalogAttributes: Catalog attributes that were deleted. Only + // attributes that are not in use by products can be deleted. + DeletedCatalogAttributes []string `json:"deletedCatalogAttributes,omitempty"` + + // ResetCatalogAttributes: Catalog attributes that were reset. + // Attributes that are in use by products cannot be deleted, however + // their configuration properties will reset to default values upon + // removal request. + ResetCatalogAttributes []string `json:"resetCatalogAttributes,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "DeletedCatalogAttributes") 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. "DeletedCatalogAttributes") + // 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 *GoogleCloudRetailV2betaBatchRemoveCatalogAttributesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaBatchRemoveCatalogAttributesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaBigQueryOutputResult: A BigQuery output // result. type GoogleCloudRetailV2betaBigQueryOutputResult struct { @@ -2419,9 +2531,7 @@ type GoogleCloudRetailV2betaBigQuerySource struct { // Supported values for user events imports: * `user_event` (default): // One JSON UserEvent per line. * `user_event_ga360`: The schema is // available here: https://support.google.com/analytics/answer/3437719. - // * `user_event_ga4`: This feature is in private preview. Please - // contact the support team for importing Google Analytics 4 events. The - // schema is available here: + // * `user_event_ga4`: The schema is available here: // https://support.google.com/analytics/answer/7029846. Supported values // for auto-completion imports: * `suggestions` (default): One JSON // completion suggestion per line. * `denylist`: One JSON deny @@ -2440,8 +2550,7 @@ type GoogleCloudRetailV2betaBigQuerySource struct { GcsStagingDir string `json:"gcsStagingDir,omitempty"` // PartitionDate: BigQuery time partitioned table's _PARTITIONDATE in - // YYYY-MM-DD format. Only supported when - // ImportProductsRequest.reconciliation_mode is set to `FULL`. + // YYYY-MM-DD format. Only supported in ImportProductsRequest. PartitionDate *GoogleTypeDate `json:"partitionDate,omitempty"` // ProjectId: The project ID (can be project # or ID) that the BigQuery @@ -2542,6 +2651,20 @@ type GoogleCloudRetailV2betaCatalogAttribute struct { // for an attribute. DynamicFacetableOption string `json:"dynamicFacetableOption,omitempty"` + // ExactSearchableOption: If EXACT_SEARCHABLE_ENABLED, attribute values + // will be exact searchable. This property only applies to textual + // custom attributes and requires indexable set to enabled to enable + // exact-searchable. + // + // Possible values: + // "EXACT_SEARCHABLE_OPTION_UNSPECIFIED" - Value used when unset. + // Defaults to EXACT_SEARCHABLE_DISABLED. + // "EXACT_SEARCHABLE_ENABLED" - Exact searchable option enabled for an + // attribute. + // "EXACT_SEARCHABLE_DISABLED" - Exact searchable option disabled for + // an attribute. + ExactSearchableOption string `json:"exactSearchableOption,omitempty"` + // InUse: Output only. Indicates whether this attribute has been used by // any products. `True` if at least one Product is using this attribute // in Product.attributes. Otherwise, this field is `False`. @@ -2852,14 +2975,13 @@ type GoogleCloudRetailV2betaCompletionConfig struct { MatchingOrder string `json:"matchingOrder,omitempty"` // MaxSuggestions: The maximum number of autocomplete suggestions - // returned per term. The maximum allowed max suggestions is 20. Default - // value is 20. If left unset or set to 0, then will fallback to default - // value. + // returned per term. Default value is 20. If left unset or set to 0, + // then will fallback to default value. Value range is 1 to 20. MaxSuggestions int64 `json:"maxSuggestions,omitempty"` // MinPrefixLength: The minimum number of characters needed to be typed // in order to get suggestions. Default value is 2. If left unset or set - // to 0, then will fallback to default value. + // to 0, then will fallback to default value. Value range is 1 to 20. MinPrefixLength int64 `json:"minPrefixLength,omitempty"` // Name: Required. Immutable. Fully qualified name @@ -3706,11 +3828,9 @@ type GoogleCloudRetailV2betaImportProductsRequest struct { // notification will be sent to specified Pub/Sub topic. The message // data will be JSON string of a Operation. Format of the Pub/Sub topic // is `projects/{project}/topics/{topic}`. It has to be within the same - // project as ImportProductsRequest.parent. Make sure that both - // `cloud-retail-customer-data-access@system.gserviceaccount.com` and - // `service-@gcp-sa-retail.iam.gserviceaccount.com` have the - // `pubsub.topics.publish` IAM permission on the topic. Only supported - // when ImportProductsRequest.reconciliation_mode is set to `FULL`. + // project as ImportProductsRequest.parent. Make sure that + // `service-@gcp-sa-retail.iam.gserviceaccount.com` has the + // `pubsub.topics.publish` IAM permission on the topic. NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"` // ReconciliationMode: The mode of reconciliation between existing @@ -3722,12 +3842,7 @@ type GoogleCloudRetailV2betaImportProductsRequest struct { // "INCREMENTAL" - Inserts new products or updates existing products. // "FULL" - Calculates diff and replaces the entire product dataset. // Existing products may be deleted if they are not present in the - // source location. Can only be set while using BigQuerySource. And the - // BigQuery dataset must be created in the data location "us (multiple - // regions in United States)", otherwise a PERMISSION_DENIED error is - // thrown. Add the IAM permission "BigQuery Data Viewer" for - // cloud-retail-customer-data-access@system.gserviceaccount.com before - // using this feature otherwise an error is thrown. + // source location. ReconciliationMode string `json:"reconciliationMode,omitempty"` // RequestId: Deprecated. This field has no effect. @@ -4670,7 +4785,7 @@ type GoogleCloudRetailV2betaProduct struct { // CollectionMemberIds: The id of the collection members when type is // Type.COLLECTION. Non-existent product ids are allowed. The type of - // the members must be either Type.PRIMARY or Type.VARIANT otherwise and + // the members must be either Type.PRIMARY or Type.VARIANT otherwise an // INVALID_ARGUMENT error is thrown. Should not set it for other types. // A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT // error is return. @@ -6526,6 +6641,10 @@ type GoogleCloudRetailV2betaSearchRequestFacetSpecFacetKey struct { // customFulfillment5 RestrictedValues []string `json:"restrictedValues,omitempty"` + // ReturnMinMax: Returns the min and max value for each numerical facet + // intervals. Ignored for textual facets. + ReturnMinMax bool `json:"returnMinMax,omitempty"` + // ForceSendFields is a list of field names (e.g. "CaseInsensitive") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -6557,7 +6676,8 @@ type GoogleCloudRetailV2betaSearchRequestPersonalizationSpec struct { // // Possible values: // "MODE_UNSPECIFIED" - Default value. Defaults to Mode.AUTO. - // "AUTO" - Let CRS decide whether to use personalization. + // "AUTO" - Let CRS decide whether to use personalization based on + // quality of user event data. // "DISABLED" - Disable personalization. Mode string `json:"mode,omitempty"` @@ -6787,6 +6907,16 @@ type GoogleCloudRetailV2betaSearchResponseFacetFacetValue struct { // "price". Interval *GoogleCloudRetailV2betaInterval `json:"interval,omitempty"` + // MaxValue: The maximum value in the FacetValue.interval. Only + // supported on numerical facets and returned if + // SearchRequest.FacetSpec.FacetKey.return_min_max is true. + MaxValue float64 `json:"maxValue,omitempty"` + + // MinValue: The minimum value in the FacetValue.interval. Only + // supported on numerical facets and returned if + // SearchRequest.FacetSpec.FacetKey.return_min_max is true. + MinValue float64 `json:"minValue,omitempty"` + // Value: Text value of a facet, such as "Black" for facet // "colorFamilies". Value string `json:"value,omitempty"` @@ -6814,6 +6944,22 @@ func (s *GoogleCloudRetailV2betaSearchResponseFacetFacetValue) MarshalJSON() ([] return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudRetailV2betaSearchResponseFacetFacetValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudRetailV2betaSearchResponseFacetFacetValue + var s1 struct { + MaxValue gensupport.JSONFloat64 `json:"maxValue"` + MinValue gensupport.JSONFloat64 `json:"minValue"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.MaxValue = float64(s1.MaxValue) + s.MinValue = float64(s1.MinValue) + return nil +} + // GoogleCloudRetailV2betaSearchResponseQueryExpansionInfo: Information // describing query expansion including whether expansion has occurred. type GoogleCloudRetailV2betaSearchResponseQueryExpansionInfo struct { @@ -6867,6 +7013,14 @@ type GoogleCloudRetailV2betaSearchResponseSearchResult struct { // ColorInfo and the query. MatchingVariantFields map[string]string `json:"matchingVariantFields,omitempty"` + // PersonalLabels: Specifies previous events related to this product for + // this user based on UserEvent with same SearchRequest.visitor_id or + // UserInfo.user_id. This is set only when + // SearchRequest.PersonalizationSpec.mode is + // SearchRequest.PersonalizationSpec.Mode.AUTO. Possible values: * + // `purchased`: Indicates that this product has been purchased before. + PersonalLabels []string `json:"personalLabels,omitempty"` + // Product: The product data snippet in the search response. Only // Product.name is guaranteed to be populated. Product.variants contains // the product variants that match the search query. If there are @@ -9485,6 +9639,155 @@ func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(op } +// method id "retail.projects.locations.catalogs.attributesConfig.batchRemoveCatalogAttributes": + +type ProjectsLocationsCatalogsAttributesConfigBatchRemoveCatalogAttributesCall struct { + s *Service + attributesConfig string + googlecloudretailv2betabatchremovecatalogattributesrequest *GoogleCloudRetailV2betaBatchRemoveCatalogAttributesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchRemoveCatalogAttributes: Removes all specified CatalogAttributes +// from the AttributesConfig. +// +// - attributesConfig: The attributes config resource shared by all +// catalog attributes being deleted. Format: +// `projects/{project_number}/locations/{location_id}/catalogs/{catalog +// _id}/attributesConfig`. +func (r *ProjectsLocationsCatalogsAttributesConfigService) BatchRemoveCatalogAttributes(attributesConfig string, googlecloudretailv2betabatchremovecatalogattributesrequest *GoogleCloudRetailV2betaBatchRemoveCatalogAttributesRequest) *ProjectsLocationsCatalogsAttributesConfigBatchRemoveCatalogAttributesCall { + c := &ProjectsLocationsCatalogsAttributesConfigBatchRemoveCatalogAttributesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.attributesConfig = attributesConfig + c.googlecloudretailv2betabatchremovecatalogattributesrequest = googlecloudretailv2betabatchremovecatalogattributesrequest + 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 *ProjectsLocationsCatalogsAttributesConfigBatchRemoveCatalogAttributesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsAttributesConfigBatchRemoveCatalogAttributesCall { + 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 *ProjectsLocationsCatalogsAttributesConfigBatchRemoveCatalogAttributesCall) Context(ctx context.Context) *ProjectsLocationsCatalogsAttributesConfigBatchRemoveCatalogAttributesCall { + 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 *ProjectsLocationsCatalogsAttributesConfigBatchRemoveCatalogAttributesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsAttributesConfigBatchRemoveCatalogAttributesCall) 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.googlecloudretailv2betabatchremovecatalogattributesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+attributesConfig}:batchRemoveCatalogAttributes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "attributesConfig": c.attributesConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.attributesConfig.batchRemoveCatalogAttributes" call. +// Exactly one of +// *GoogleCloudRetailV2betaBatchRemoveCatalogAttributesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRetailV2betaBatchRemoveCatalogAttributesResponse.ServerRes +// ponse.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 *ProjectsLocationsCatalogsAttributesConfigBatchRemoveCatalogAttributesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2betaBatchRemoveCatalogAttributesResponse, 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 := &GoogleCloudRetailV2betaBatchRemoveCatalogAttributesResponse{ + 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": "Removes all specified CatalogAttributes from the AttributesConfig.", + // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:batchRemoveCatalogAttributes", + // "httpMethod": "POST", + // "id": "retail.projects.locations.catalogs.attributesConfig.batchRemoveCatalogAttributes", + // "parameterOrder": [ + // "attributesConfig" + // ], + // "parameters": { + // "attributesConfig": { + // "description": "Required. The attributes config resource shared by all catalog attributes being deleted. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+attributesConfig}:batchRemoveCatalogAttributes", + // "request": { + // "$ref": "GoogleCloudRetailV2betaBatchRemoveCatalogAttributesRequest" + // }, + // "response": { + // "$ref": "GoogleCloudRetailV2betaBatchRemoveCatalogAttributesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "retail.projects.locations.catalogs.attributesConfig.removeCatalogAttribute": type ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall struct { diff --git a/securitycenter/v1/securitycenter-api.json b/securitycenter/v1/securitycenter-api.json index ed04cad30b1..9120b167c95 100644 --- a/securitycenter/v1/securitycenter-api.json +++ b/securitycenter/v1/securitycenter-api.json @@ -3058,7 +3058,7 @@ } } }, - "revision": "20220720", + "revision": "20220728", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -3078,7 +3078,22 @@ "type": "string" }, "principalEmail": { - "description": "Associated email, such as \"foo@google.com\".", + "description": "Associated email, such as \"foo@google.com\". The email address of the authenticated user (or service account on behalf of third party principal) making the request. For third party identity callers, the `principal_subject` field is populated instead of this field. For privacy reasons, the principal email address is sometimes redacted. For more information, see [Caller identities in audit logs](https://cloud.google.com/logging/docs/audit#user-id).", + "type": "string" + }, + "principalSubject": { + "description": "A string representing the principal_subject associated with the identity. As compared to `principal_email`, supports principals that aren't associated with email addresses, such as third party principals. For most identities, the format will be `principal://iam.googleapis.com/{identity pool name}/subject/{subject)` except for some GKE identities (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy format `serviceAccount:{identity pool name}[{subject}]`", + "type": "string" + }, + "serviceAccountDelegationInfo": { + "description": "Identity delegation history of an authenticated service account that makes the request. It contains information on the real authorities that try to access GCP resources by delegating on a service account. When multiple authorities are present, they are guaranteed to be sorted based on the original ordering of the identity delegation events.", + "items": { + "$ref": "ServiceAccountDelegationInfo" + }, + "type": "array" + }, + "serviceAccountKeyName": { + "description": "The name of the service account key used to create or exchange credentials for authenticating the service account making the request. This is a scheme-less URI full resource name. For example: \"//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}\" ", "type": "string" }, "serviceName": { @@ -5024,7 +5039,8 @@ "DATA_DESTRUCTION", "DOMAIN_POLICY_MODIFICATION", "IMPAIR_DEFENSES", - "NETWORK_SERVICE_DISCOVERY" + "NETWORK_SERVICE_DISCOVERY", + "ACCESS_TOKEN_MANIPULATION" ], "enumDescriptions": [ "Unspecified value.", @@ -5059,7 +5075,8 @@ "T1485", "T1484", "T1562", - "T1046" + "T1046", + "T1134" ], "type": "string" }, @@ -5139,7 +5156,8 @@ "DATA_DESTRUCTION", "DOMAIN_POLICY_MODIFICATION", "IMPAIR_DEFENSES", - "NETWORK_SERVICE_DISCOVERY" + "NETWORK_SERVICE_DISCOVERY", + "ACCESS_TOKEN_MANIPULATION" ], "enumDescriptions": [ "Unspecified value.", @@ -5174,7 +5192,8 @@ "T1485", "T1484", "T1562", - "T1046" + "T1046", + "T1134" ], "type": "string" }, @@ -5594,6 +5613,21 @@ }, "type": "object" }, + "ServiceAccountDelegationInfo": { + "description": "Identity delegation history of an authenticated service account.", + "id": "ServiceAccountDelegationInfo", + "properties": { + "principalEmail": { + "description": "The email address of a Google account. .", + "type": "string" + }, + "principalSubject": { + "description": "A string representing the principal_subject associated with the identity. As compared to `principal_email`, supports principals that aren't associated with email addresses, such as third party principals. For most identities, the format will be `principal://iam.googleapis.com/{identity pool name}/subject/{subject)` except for some GKE identities (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy format `serviceAccount:{identity pool name}[{subject}]`", + "type": "string" + } + }, + "type": "object" + }, "SetFindingStateRequest": { "description": "Request message for updating a finding's state.", "id": "SetFindingStateRequest", diff --git a/securitycenter/v1/securitycenter-gen.go b/securitycenter/v1/securitycenter-gen.go index 18555f41e5d..fcbfb063e38 100644 --- a/securitycenter/v1/securitycenter-gen.go +++ b/securitycenter/v1/securitycenter-gen.go @@ -459,9 +459,41 @@ type Access struct { // "SetIamPolicy". MethodName string `json:"methodName,omitempty"` - // PrincipalEmail: Associated email, such as "foo@google.com". + // PrincipalEmail: Associated email, such as "foo@google.com". The email + // address of the authenticated user (or service account on behalf of + // third party principal) making the request. For third party identity + // callers, the `principal_subject` field is populated instead of this + // field. For privacy reasons, the principal email address is sometimes + // redacted. For more information, see Caller identities in audit logs + // (https://cloud.google.com/logging/docs/audit#user-id). PrincipalEmail string `json:"principalEmail,omitempty"` + // PrincipalSubject: A string representing the principal_subject + // associated with the identity. As compared to `principal_email`, + // supports principals that aren't associated with email addresses, such + // as third party principals. For most identities, the format will be + // `principal://iam.googleapis.com/{identity pool + // name}/subject/{subject)` except for some GKE identities + // (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the + // legacy format `serviceAccount:{identity pool name}[{subject}]` + PrincipalSubject string `json:"principalSubject,omitempty"` + + // ServiceAccountDelegationInfo: Identity delegation history of an + // authenticated service account that makes the request. It contains + // information on the real authorities that try to access GCP resources + // by delegating on a service account. When multiple authorities are + // present, they are guaranteed to be sorted based on the original + // ordering of the identity delegation events. + ServiceAccountDelegationInfo []*ServiceAccountDelegationInfo `json:"serviceAccountDelegationInfo,omitempty"` + + // ServiceAccountKeyName: The name of the service account key used to + // create or exchange credentials for authenticating the service account + // making the request. This is a scheme-less URI full resource name. For + // example: + // "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/ + // keys/{key}" + ServiceAccountKeyName string `json:"serviceAccountKeyName,omitempty"` + // ServiceName: This is the API service that the service account made a // call to, e.g. "iam.googleapis.com" ServiceName string `json:"serviceName,omitempty"` @@ -3666,6 +3698,7 @@ type MitreAttack struct { // "DOMAIN_POLICY_MODIFICATION" - T1484 // "IMPAIR_DEFENSES" - T1562 // "NETWORK_SERVICE_DISCOVERY" - T1046 + // "ACCESS_TOKEN_MANIPULATION" - T1134 AdditionalTechniques []string `json:"additionalTechniques,omitempty"` // PrimaryTactic: The MITRE ATT&CK tactic most closely represented by @@ -3731,6 +3764,7 @@ type MitreAttack struct { // "DOMAIN_POLICY_MODIFICATION" - T1484 // "IMPAIR_DEFENSES" - T1562 // "NETWORK_SERVICE_DISCOVERY" - T1046 + // "ACCESS_TOKEN_MANIPULATION" - T1134 PrimaryTechniques []string `json:"primaryTechniques,omitempty"` // Version: The MITRE ATT&CK version referenced by the above fields. @@ -4485,6 +4519,46 @@ func (s *SecurityMarks) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ServiceAccountDelegationInfo: Identity delegation history of an +// authenticated service account. +type ServiceAccountDelegationInfo struct { + // PrincipalEmail: The email address of a Google account. . + PrincipalEmail string `json:"principalEmail,omitempty"` + + // PrincipalSubject: A string representing the principal_subject + // associated with the identity. As compared to `principal_email`, + // supports principals that aren't associated with email addresses, such + // as third party principals. For most identities, the format will be + // `principal://iam.googleapis.com/{identity pool + // name}/subject/{subject)` except for some GKE identities + // (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the + // legacy format `serviceAccount:{identity pool name}[{subject}]` + PrincipalSubject string `json:"principalSubject,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PrincipalEmail") 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. "PrincipalEmail") 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 *ServiceAccountDelegationInfo) MarshalJSON() ([]byte, error) { + type NoMethod ServiceAccountDelegationInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SetFindingStateRequest: Request message for updating a finding's // state. type SetFindingStateRequest struct { diff --git a/securitycenter/v1beta1/securitycenter-api.json b/securitycenter/v1beta1/securitycenter-api.json index 683a171a9ec..4fd02b351e7 100644 --- a/securitycenter/v1beta1/securitycenter-api.json +++ b/securitycenter/v1beta1/securitycenter-api.json @@ -896,7 +896,7 @@ } } }, - "revision": "20220720", + "revision": "20220728", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -916,7 +916,22 @@ "type": "string" }, "principalEmail": { - "description": "Associated email, such as \"foo@google.com\".", + "description": "Associated email, such as \"foo@google.com\". The email address of the authenticated user (or service account on behalf of third party principal) making the request. For third party identity callers, the `principal_subject` field is populated instead of this field. For privacy reasons, the principal email address is sometimes redacted. For more information, see [Caller identities in audit logs](https://cloud.google.com/logging/docs/audit#user-id).", + "type": "string" + }, + "principalSubject": { + "description": "A string representing the principal_subject associated with the identity. As compared to `principal_email`, supports principals that aren't associated with email addresses, such as third party principals. For most identities, the format will be `principal://iam.googleapis.com/{identity pool name}/subject/{subject)` except for some GKE identities (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy format `serviceAccount:{identity pool name}[{subject}]`", + "type": "string" + }, + "serviceAccountDelegationInfo": { + "description": "Identity delegation history of an authenticated service account that makes the request. It contains information on the real authorities that try to access GCP resources by delegating on a service account. When multiple authorities are present, they are guaranteed to be sorted based on the original ordering of the identity delegation events.", + "items": { + "$ref": "ServiceAccountDelegationInfo" + }, + "type": "array" + }, + "serviceAccountKeyName": { + "description": "The name of the service account key used to create or exchange credentials for authenticating the service account making the request. This is a scheme-less URI full resource name. For example: \"//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}\" ", "type": "string" }, "serviceName": { @@ -2807,7 +2822,8 @@ "DATA_DESTRUCTION", "DOMAIN_POLICY_MODIFICATION", "IMPAIR_DEFENSES", - "NETWORK_SERVICE_DISCOVERY" + "NETWORK_SERVICE_DISCOVERY", + "ACCESS_TOKEN_MANIPULATION" ], "enumDescriptions": [ "Unspecified value.", @@ -2842,7 +2858,8 @@ "T1485", "T1484", "T1562", - "T1046" + "T1046", + "T1134" ], "type": "string" }, @@ -2922,7 +2939,8 @@ "DATA_DESTRUCTION", "DOMAIN_POLICY_MODIFICATION", "IMPAIR_DEFENSES", - "NETWORK_SERVICE_DISCOVERY" + "NETWORK_SERVICE_DISCOVERY", + "ACCESS_TOKEN_MANIPULATION" ], "enumDescriptions": [ "Unspecified value.", @@ -2957,7 +2975,8 @@ "T1485", "T1484", "T1562", - "T1046" + "T1046", + "T1134" ], "type": "string" }, @@ -3288,6 +3307,21 @@ }, "type": "object" }, + "ServiceAccountDelegationInfo": { + "description": "Identity delegation history of an authenticated service account.", + "id": "ServiceAccountDelegationInfo", + "properties": { + "principalEmail": { + "description": "The email address of a Google account. .", + "type": "string" + }, + "principalSubject": { + "description": "A string representing the principal_subject associated with the identity. As compared to `principal_email`, supports principals that aren't associated with email addresses, such as third party principals. For most identities, the format will be `principal://iam.googleapis.com/{identity pool name}/subject/{subject)` except for some GKE identities (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy format `serviceAccount:{identity pool name}[{subject}]`", + "type": "string" + } + }, + "type": "object" + }, "SetFindingStateRequest": { "description": "Request message for updating a finding's state.", "id": "SetFindingStateRequest", diff --git a/securitycenter/v1beta1/securitycenter-gen.go b/securitycenter/v1beta1/securitycenter-gen.go index 45a0e501f7e..441449620d6 100644 --- a/securitycenter/v1beta1/securitycenter-gen.go +++ b/securitycenter/v1beta1/securitycenter-gen.go @@ -207,9 +207,41 @@ type Access struct { // "SetIamPolicy". MethodName string `json:"methodName,omitempty"` - // PrincipalEmail: Associated email, such as "foo@google.com". + // PrincipalEmail: Associated email, such as "foo@google.com". The email + // address of the authenticated user (or service account on behalf of + // third party principal) making the request. For third party identity + // callers, the `principal_subject` field is populated instead of this + // field. For privacy reasons, the principal email address is sometimes + // redacted. For more information, see Caller identities in audit logs + // (https://cloud.google.com/logging/docs/audit#user-id). PrincipalEmail string `json:"principalEmail,omitempty"` + // PrincipalSubject: A string representing the principal_subject + // associated with the identity. As compared to `principal_email`, + // supports principals that aren't associated with email addresses, such + // as third party principals. For most identities, the format will be + // `principal://iam.googleapis.com/{identity pool + // name}/subject/{subject)` except for some GKE identities + // (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the + // legacy format `serviceAccount:{identity pool name}[{subject}]` + PrincipalSubject string `json:"principalSubject,omitempty"` + + // ServiceAccountDelegationInfo: Identity delegation history of an + // authenticated service account that makes the request. It contains + // information on the real authorities that try to access GCP resources + // by delegating on a service account. When multiple authorities are + // present, they are guaranteed to be sorted based on the original + // ordering of the identity delegation events. + ServiceAccountDelegationInfo []*ServiceAccountDelegationInfo `json:"serviceAccountDelegationInfo,omitempty"` + + // ServiceAccountKeyName: The name of the service account key used to + // create or exchange credentials for authenticating the service account + // making the request. This is a scheme-less URI full resource name. For + // example: + // "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/ + // keys/{key}" + ServiceAccountKeyName string `json:"serviceAccountKeyName,omitempty"` + // ServiceName: This is the API service that the service account made a // call to, e.g. "iam.googleapis.com" ServiceName string `json:"serviceName,omitempty"` @@ -3220,6 +3252,7 @@ type MitreAttack struct { // "DOMAIN_POLICY_MODIFICATION" - T1484 // "IMPAIR_DEFENSES" - T1562 // "NETWORK_SERVICE_DISCOVERY" - T1046 + // "ACCESS_TOKEN_MANIPULATION" - T1134 AdditionalTechniques []string `json:"additionalTechniques,omitempty"` // PrimaryTactic: The MITRE ATT&CK tactic most closely represented by @@ -3285,6 +3318,7 @@ type MitreAttack struct { // "DOMAIN_POLICY_MODIFICATION" - T1484 // "IMPAIR_DEFENSES" - T1562 // "NETWORK_SERVICE_DISCOVERY" - T1046 + // "ACCESS_TOKEN_MANIPULATION" - T1134 PrimaryTechniques []string `json:"primaryTechniques,omitempty"` // Version: The MITRE ATT&CK version referenced by the above fields. @@ -3910,6 +3944,46 @@ func (s *SecurityMarks) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ServiceAccountDelegationInfo: Identity delegation history of an +// authenticated service account. +type ServiceAccountDelegationInfo struct { + // PrincipalEmail: The email address of a Google account. . + PrincipalEmail string `json:"principalEmail,omitempty"` + + // PrincipalSubject: A string representing the principal_subject + // associated with the identity. As compared to `principal_email`, + // supports principals that aren't associated with email addresses, such + // as third party principals. For most identities, the format will be + // `principal://iam.googleapis.com/{identity pool + // name}/subject/{subject)` except for some GKE identities + // (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the + // legacy format `serviceAccount:{identity pool name}[{subject}]` + PrincipalSubject string `json:"principalSubject,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PrincipalEmail") 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. "PrincipalEmail") 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 *ServiceAccountDelegationInfo) MarshalJSON() ([]byte, error) { + type NoMethod ServiceAccountDelegationInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SetFindingStateRequest: Request message for updating a finding's // state. type SetFindingStateRequest struct { diff --git a/securitycenter/v1beta2/securitycenter-api.json b/securitycenter/v1beta2/securitycenter-api.json index 360ed1a51a1..83e595cc453 100644 --- a/securitycenter/v1beta2/securitycenter-api.json +++ b/securitycenter/v1beta2/securitycenter-api.json @@ -1981,7 +1981,7 @@ } } }, - "revision": "20220720", + "revision": "20220728", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -2001,7 +2001,22 @@ "type": "string" }, "principalEmail": { - "description": "Associated email, such as \"foo@google.com\".", + "description": "Associated email, such as \"foo@google.com\". The email address of the authenticated user (or service account on behalf of third party principal) making the request. For third party identity callers, the `principal_subject` field is populated instead of this field. For privacy reasons, the principal email address is sometimes redacted. For more information, see [Caller identities in audit logs](https://cloud.google.com/logging/docs/audit#user-id).", + "type": "string" + }, + "principalSubject": { + "description": "A string representing the principal_subject associated with the identity. As compared to `principal_email`, supports principals that aren't associated with email addresses, such as third party principals. For most identities, the format will be `principal://iam.googleapis.com/{identity pool name}/subject/{subject)` except for some GKE identities (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy format `serviceAccount:{identity pool name}[{subject}]`", + "type": "string" + }, + "serviceAccountDelegationInfo": { + "description": "Identity delegation history of an authenticated service account that makes the request. It contains information on the real authorities that try to access GCP resources by delegating on a service account. When multiple authorities are present, they are guaranteed to be sorted based on the original ordering of the identity delegation events.", + "items": { + "$ref": "ServiceAccountDelegationInfo" + }, + "type": "array" + }, + "serviceAccountKeyName": { + "description": "The name of the service account key used to create or exchange credentials for authenticating the service account making the request. This is a scheme-less URI full resource name. For example: \"//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}\" ", "type": "string" }, "serviceName": { @@ -3521,7 +3536,8 @@ "DATA_DESTRUCTION", "DOMAIN_POLICY_MODIFICATION", "IMPAIR_DEFENSES", - "NETWORK_SERVICE_DISCOVERY" + "NETWORK_SERVICE_DISCOVERY", + "ACCESS_TOKEN_MANIPULATION" ], "enumDescriptions": [ "Unspecified value.", @@ -3556,7 +3572,8 @@ "T1485", "T1484", "T1562", - "T1046" + "T1046", + "T1134" ], "type": "string" }, @@ -3636,7 +3653,8 @@ "DATA_DESTRUCTION", "DOMAIN_POLICY_MODIFICATION", "IMPAIR_DEFENSES", - "NETWORK_SERVICE_DISCOVERY" + "NETWORK_SERVICE_DISCOVERY", + "ACCESS_TOKEN_MANIPULATION" ], "enumDescriptions": [ "Unspecified value.", @@ -3671,7 +3689,8 @@ "T1485", "T1484", "T1562", - "T1046" + "T1046", + "T1134" ], "type": "string" }, @@ -4017,6 +4036,21 @@ }, "type": "object" }, + "ServiceAccountDelegationInfo": { + "description": "Identity delegation history of an authenticated service account.", + "id": "ServiceAccountDelegationInfo", + "properties": { + "principalEmail": { + "description": "The email address of a Google account. .", + "type": "string" + }, + "principalSubject": { + "description": "A string representing the principal_subject associated with the identity. As compared to `principal_email`, supports principals that aren't associated with email addresses, such as third party principals. For most identities, the format will be `principal://iam.googleapis.com/{identity pool name}/subject/{subject)` except for some GKE identities (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy format `serviceAccount:{identity pool name}[{subject}]`", + "type": "string" + } + }, + "type": "object" + }, "Subject": { "description": "Represents a Kubernetes Subject.", "id": "Subject", diff --git a/securitycenter/v1beta2/securitycenter-gen.go b/securitycenter/v1beta2/securitycenter-gen.go index 9a70963760c..aa70840d468 100644 --- a/securitycenter/v1beta2/securitycenter-gen.go +++ b/securitycenter/v1beta2/securitycenter-gen.go @@ -435,9 +435,41 @@ type Access struct { // "SetIamPolicy". MethodName string `json:"methodName,omitempty"` - // PrincipalEmail: Associated email, such as "foo@google.com". + // PrincipalEmail: Associated email, such as "foo@google.com". The email + // address of the authenticated user (or service account on behalf of + // third party principal) making the request. For third party identity + // callers, the `principal_subject` field is populated instead of this + // field. For privacy reasons, the principal email address is sometimes + // redacted. For more information, see Caller identities in audit logs + // (https://cloud.google.com/logging/docs/audit#user-id). PrincipalEmail string `json:"principalEmail,omitempty"` + // PrincipalSubject: A string representing the principal_subject + // associated with the identity. As compared to `principal_email`, + // supports principals that aren't associated with email addresses, such + // as third party principals. For most identities, the format will be + // `principal://iam.googleapis.com/{identity pool + // name}/subject/{subject)` except for some GKE identities + // (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the + // legacy format `serviceAccount:{identity pool name}[{subject}]` + PrincipalSubject string `json:"principalSubject,omitempty"` + + // ServiceAccountDelegationInfo: Identity delegation history of an + // authenticated service account that makes the request. It contains + // information on the real authorities that try to access GCP resources + // by delegating on a service account. When multiple authorities are + // present, they are guaranteed to be sorted based on the original + // ordering of the identity delegation events. + ServiceAccountDelegationInfo []*ServiceAccountDelegationInfo `json:"serviceAccountDelegationInfo,omitempty"` + + // ServiceAccountKeyName: The name of the service account key used to + // create or exchange credentials for authenticating the service account + // making the request. This is a scheme-less URI full resource name. For + // example: + // "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/ + // keys/{key}" + ServiceAccountKeyName string `json:"serviceAccountKeyName,omitempty"` + // ServiceName: This is the API service that the service account made a // call to, e.g. "iam.googleapis.com" ServiceName string `json:"serviceName,omitempty"` @@ -2626,6 +2658,7 @@ type MitreAttack struct { // "DOMAIN_POLICY_MODIFICATION" - T1484 // "IMPAIR_DEFENSES" - T1562 // "NETWORK_SERVICE_DISCOVERY" - T1046 + // "ACCESS_TOKEN_MANIPULATION" - T1134 AdditionalTechniques []string `json:"additionalTechniques,omitempty"` // PrimaryTactic: The MITRE ATT&CK tactic most closely represented by @@ -2691,6 +2724,7 @@ type MitreAttack struct { // "DOMAIN_POLICY_MODIFICATION" - T1484 // "IMPAIR_DEFENSES" - T1562 // "NETWORK_SERVICE_DISCOVERY" - T1046 + // "ACCESS_TOKEN_MANIPULATION" - T1134 PrimaryTechniques []string `json:"primaryTechniques,omitempty"` // Version: The MITRE ATT&CK version referenced by the above fields. @@ -3261,6 +3295,46 @@ func (s *SecurityMarks) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ServiceAccountDelegationInfo: Identity delegation history of an +// authenticated service account. +type ServiceAccountDelegationInfo struct { + // PrincipalEmail: The email address of a Google account. . + PrincipalEmail string `json:"principalEmail,omitempty"` + + // PrincipalSubject: A string representing the principal_subject + // associated with the identity. As compared to `principal_email`, + // supports principals that aren't associated with email addresses, such + // as third party principals. For most identities, the format will be + // `principal://iam.googleapis.com/{identity pool + // name}/subject/{subject)` except for some GKE identities + // (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the + // legacy format `serviceAccount:{identity pool name}[{subject}]` + PrincipalSubject string `json:"principalSubject,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PrincipalEmail") 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. "PrincipalEmail") 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 *ServiceAccountDelegationInfo) MarshalJSON() ([]byte, error) { + type NoMethod ServiceAccountDelegationInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Subject: Represents a Kubernetes Subject. type Subject struct { // Kind: Authentication type for subject. diff --git a/trafficdirector/v2/trafficdirector-api.json b/trafficdirector/v2/trafficdirector-api.json index c96bba22799..0bd0e9add41 100644 --- a/trafficdirector/v2/trafficdirector-api.json +++ b/trafficdirector/v2/trafficdirector-api.json @@ -128,7 +128,7 @@ } } }, - "revision": "20210809", + "revision": "20220723", "rootUrl": "https://trafficdirector.googleapis.com/", "schemas": { "Address": { @@ -427,7 +427,7 @@ "type": "object" }, "GoogleRE2": { - "description": "Google's `RE2 `_ regex engine. The regex string must adhere to the documented `syntax `_. The engine is designed to complete execution in linear time as well as limit the amount of memory used. Envoy supports program size checking via runtime. The runtime keys `re2.max_program_size.error_level` and `re2.max_program_size.warn_level` can be set to integers as the maximum program size or complexity that a compiled regex can have before an exception is thrown or a warning is logged, respectively. `re2.max_program_size.error_level` defaults to 100, and `re2.max_program_size.warn_level` has no default if unset (will not check/log a warning). Envoy emits two stats for tracking the program size of regexes: the histogram `re2.program_size`, which records the program size, and the counter `re2.exceeded_warn_level`, which is incremented each time the program size exceeds the warn level threshold.", + "description": "Google's `RE2 `_ regex engine. The regex string must adhere to the documented `syntax `_. The engine is designed to complete execution in linear time as well as limit the amount of memory used. Envoy supports program size checking via runtime. The runtime keys ``re2.max_program_size.error_level`` and ``re2.max_program_size.warn_level`` can be set to integers as the maximum program size or complexity that a compiled regex can have before an exception is thrown or a warning is logged, respectively. ``re2.max_program_size.error_level`` defaults to 100, and ``re2.max_program_size.warn_level`` has no default if unset (will not check/log a warning). Envoy emits two stats for tracking the program size of regexes: the histogram `re2.program_size`, which records the program size, and the counter `re2.exceeded_warn_level`, which is incremented each time the program size exceeds the warn level threshold.", "id": "GoogleRE2", "properties": { "maxProgramSize": { diff --git a/trafficdirector/v2/trafficdirector-gen.go b/trafficdirector/v2/trafficdirector-gen.go index cc31487a523..169b39a7737 100644 --- a/trafficdirector/v2/trafficdirector-gen.go +++ b/trafficdirector/v2/trafficdirector-gen.go @@ -702,12 +702,12 @@ func (s *Extension) MarshalJSON() ([]byte, error) { // adhere to the documented `syntax `_. The engine is designed to // complete execution in linear time as well as limit the amount of // memory used. Envoy supports program size checking via runtime. The -// runtime keys `re2.max_program_size.error_level` and -// `re2.max_program_size.warn_level` can be set to integers as the +// runtime keys ``re2.max_program_size.error_level`` and +// ``re2.max_program_size.warn_level`` can be set to integers as the // maximum program size or complexity that a compiled regex can have // before an exception is thrown or a warning is logged, respectively. -// `re2.max_program_size.error_level` defaults to 100, and -// `re2.max_program_size.warn_level` has no default if unset (will not +// ``re2.max_program_size.error_level`` defaults to 100, and +// ``re2.max_program_size.warn_level`` has no default if unset (will not // check/log a warning). Envoy emits two stats for tracking the program // size of regexes: the histogram `re2.program_size`, which records the // program size, and the counter `re2.exceeded_warn_level`, which is