From 5da4d6ab7fa9a3d68743a9dd6f90ab6cd9ea9277 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 6 Mar 2023 08:16:17 -0800 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#1887) --- assuredworkloads/v1/assuredworkloads-api.json | 55 +- assuredworkloads/v1/assuredworkloads-gen.go | 67 +- .../v1beta1/assuredworkloads-api.json | 53 +- .../v1beta1/assuredworkloads-gen.go | 64 + batch/v1/batch-api.json | 18 +- batch/v1/batch-gen.go | 41 +- calendar/v3/calendar-api.json | 54 +- calendar/v3/calendar-gen.go | 111 + clouddeploy/v1/clouddeploy-api.json | 119 +- clouddeploy/v1/clouddeploy-gen.go | 221 +- .../v1beta1/clouderrorreporting-api.json | 4 +- .../v1beta1/clouderrorreporting-gen.go | 6 +- dataform/v1beta1/dataform-api.json | 284 +- dataform/v1beta1/dataform-gen.go | 1333 ++- datamigration/v1/datamigration-api.json | 36 +- datamigration/v1/datamigration-gen.go | 73 +- drivelabels/v2/drivelabels-api.json | 1976 ++++- drivelabels/v2/drivelabels-gen.go | 7689 ++++++++++++++--- gkebackup/v1/gkebackup-api.json | 10 +- gkebackup/v1/gkebackup-gen.go | 27 +- gkehub/v1alpha/gkehub-api.json | 12 +- gkehub/v1alpha/gkehub-gen.go | 12 +- gkehub/v1beta/gkehub-api.json | 12 +- gkehub/v1beta/gkehub-gen.go | 12 +- healthcare/v1beta1/healthcare-api.json | 4 +- healthcare/v1beta1/healthcare-gen.go | 5 +- .../v1alpha1/managedidentities-api.json | 11 +- .../v1alpha1/managedidentities-gen.go | 58 +- .../v1beta1/managedidentities-api.json | 11 +- .../v1beta1/managedidentities-gen.go | 58 +- .../v1/workflowexecutions-api.json | 12 +- .../v1/workflowexecutions-gen.go | 31 +- 32 files changed, 11136 insertions(+), 1343 deletions(-) diff --git a/assuredworkloads/v1/assuredworkloads-api.json b/assuredworkloads/v1/assuredworkloads-api.json index e7648ea1eb6..0ce97e45409 100644 --- a/assuredworkloads/v1/assuredworkloads-api.json +++ b/assuredworkloads/v1/assuredworkloads-api.json @@ -519,7 +519,7 @@ } } }, - "revision": "20230218", + "revision": "20230302", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest": { @@ -958,6 +958,10 @@ "description": "Required. The user-assigned display name of the Workload. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, and spaces. Example: My Workload", "type": "string" }, + "ekmProvisioningResponse": { + "$ref": "GoogleCloudAssuredworkloadsV1WorkloadEkmProvisioningResponse", + "description": "Optional. Represents the Ekm Provisioning State of the given workload." + }, "enableSovereignControls": { "description": "Optional. Indicates the sovereignty status of the given workload. Currently meant to be used by Europe/Canada customers.", "type": "boolean" @@ -1054,6 +1058,53 @@ }, "type": "object" }, + "GoogleCloudAssuredworkloadsV1WorkloadEkmProvisioningResponse": { + "description": "External key management systems(EKM) Provisioning response", + "id": "GoogleCloudAssuredworkloadsV1WorkloadEkmProvisioningResponse", + "properties": { + "ekmProvisioningErrorDomain": { + "description": "Indicates Ekm provisioning error if any.", + "enum": [ + "EKM_PROVISIONING_ERROR_DOMAIN_UNSPECIFIED", + "UNSPECIFIED_ERROR", + "GOOGLE_SERVER_ERROR", + "EXTERNAL_USER_ERROR", + "EXTERNAL_PARTNER_ERROR", + "TIMEOUT_ERROR" + ], + "enumDescriptions": [ + "No error domain", + "Error but domain is unspecified.", + "Internal logic breaks within provisioning code.", + "Error occurred with the customer not granting permission/creating resource.", + "Error occurred within the partner’s provisioning cluster.", + "Resource wasn't provisioned in the required 7 day time period" + ], + "type": "string" + }, + "ekmProvisioningErrorMessage": { + "description": "Detailed error message if Ekm provisioning fails", + "type": "string" + }, + "ekmProvisioningState": { + "description": "Indicates Ekm enrollment Provisioning of a given workload.", + "enum": [ + "EKM_PROVISIONING_STATE_UNSPECIFIED", + "EKM_PROVISIONING_STATE_PENDING", + "EKM_PROVISIONING_STATE_FAILED", + "EKM_PROVISIONING_STATE_COMPLETED" + ], + "enumDescriptions": [ + "Default State for Ekm Provisioning", + "Pending State for Ekm Provisioning", + "Failed State for Ekm Provisioning", + "Completed State for Ekm Provisioning" + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAssuredworkloadsV1WorkloadKMSSettings": { "description": "Settings specific to the Key Management Service. This message is deprecated. In order to create a Keyring, callers should specify, ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field.", "id": "GoogleCloudAssuredworkloadsV1WorkloadKMSSettings", @@ -1076,7 +1127,7 @@ "id": "GoogleCloudAssuredworkloadsV1WorkloadPartnerPermissions", "properties": { "dataLogsViewer": { - "description": "Allow partner to view data and logs", + "description": "Allow the partner to view inspectability logs and monitoring violations.", "type": "boolean" }, "remediateFolderViolations": { diff --git a/assuredworkloads/v1/assuredworkloads-gen.go b/assuredworkloads/v1/assuredworkloads-gen.go index 130ed3e2b75..2544272a1b9 100644 --- a/assuredworkloads/v1/assuredworkloads-gen.go +++ b/assuredworkloads/v1/assuredworkloads-gen.go @@ -791,6 +791,10 @@ type GoogleCloudAssuredworkloadsV1Workload struct { // spaces. Example: My Workload DisplayName string `json:"displayName,omitempty"` + // EkmProvisioningResponse: Optional. Represents the Ekm Provisioning + // State of the given workload. + EkmProvisioningResponse *GoogleCloudAssuredworkloadsV1WorkloadEkmProvisioningResponse `json:"ekmProvisioningResponse,omitempty"` + // EnableSovereignControls: Optional. Indicates the sovereignty status // of the given workload. Currently meant to be used by Europe/Canada // customers. @@ -925,6 +929,66 @@ func (s *GoogleCloudAssuredworkloadsV1WorkloadComplianceStatus) MarshalJSON() ([ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAssuredworkloadsV1WorkloadEkmProvisioningResponse: +// External key management systems(EKM) Provisioning response +type GoogleCloudAssuredworkloadsV1WorkloadEkmProvisioningResponse struct { + // EkmProvisioningErrorDomain: Indicates Ekm provisioning error if any. + // + // Possible values: + // "EKM_PROVISIONING_ERROR_DOMAIN_UNSPECIFIED" - No error domain + // "UNSPECIFIED_ERROR" - Error but domain is unspecified. + // "GOOGLE_SERVER_ERROR" - Internal logic breaks within provisioning + // code. + // "EXTERNAL_USER_ERROR" - Error occurred with the customer not + // granting permission/creating resource. + // "EXTERNAL_PARTNER_ERROR" - Error occurred within the partner’s + // provisioning cluster. + // "TIMEOUT_ERROR" - Resource wasn't provisioned in the required 7 day + // time period + EkmProvisioningErrorDomain string `json:"ekmProvisioningErrorDomain,omitempty"` + + // EkmProvisioningErrorMessage: Detailed error message if Ekm + // provisioning fails + EkmProvisioningErrorMessage string `json:"ekmProvisioningErrorMessage,omitempty"` + + // EkmProvisioningState: Indicates Ekm enrollment Provisioning of a + // given workload. + // + // Possible values: + // "EKM_PROVISIONING_STATE_UNSPECIFIED" - Default State for Ekm + // Provisioning + // "EKM_PROVISIONING_STATE_PENDING" - Pending State for Ekm + // Provisioning + // "EKM_PROVISIONING_STATE_FAILED" - Failed State for Ekm Provisioning + // "EKM_PROVISIONING_STATE_COMPLETED" - Completed State for Ekm + // Provisioning + EkmProvisioningState string `json:"ekmProvisioningState,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EkmProvisioningErrorDomain") 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. + // "EkmProvisioningErrorDomain") 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 *GoogleCloudAssuredworkloadsV1WorkloadEkmProvisioningResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1WorkloadEkmProvisioningResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAssuredworkloadsV1WorkloadKMSSettings: Settings specific // to the Key Management Service. This message is deprecated. In order // to create a Keyring, callers should specify, ENCRYPTION_KEYS_PROJECT @@ -968,7 +1032,8 @@ func (s *GoogleCloudAssuredworkloadsV1WorkloadKMSSettings) MarshalJSON() ([]byte // GoogleCloudAssuredworkloadsV1WorkloadPartnerPermissions: Permissions // granted to the AW Partner SA account for the customer workload type GoogleCloudAssuredworkloadsV1WorkloadPartnerPermissions struct { - // DataLogsViewer: Allow partner to view data and logs + // DataLogsViewer: Allow the partner to view inspectability logs and + // monitoring violations. DataLogsViewer bool `json:"dataLogsViewer,omitempty"` // RemediateFolderViolations: Allow partner to monitor folder and diff --git a/assuredworkloads/v1beta1/assuredworkloads-api.json b/assuredworkloads/v1beta1/assuredworkloads-api.json index 9e93060bac1..c9cb560b2b7 100644 --- a/assuredworkloads/v1beta1/assuredworkloads-api.json +++ b/assuredworkloads/v1beta1/assuredworkloads-api.json @@ -595,7 +595,7 @@ } } }, - "revision": "20230218", + "revision": "20230302", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest": { @@ -972,6 +972,10 @@ "description": "Required. The user-assigned display name of the Workload. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, and spaces. Example: My Workload", "type": "string" }, + "ekmProvisioningResponse": { + "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadEkmProvisioningResponse", + "description": "Optional. Represents the Ekm Provisioning State of the given workload." + }, "enableSovereignControls": { "description": "Optional. Indicates the sovereignty status of the given workload. Currently meant to be used by Europe/Canada customers.", "type": "boolean" @@ -1091,6 +1095,53 @@ }, "type": "object" }, + "GoogleCloudAssuredworkloadsV1beta1WorkloadEkmProvisioningResponse": { + "description": "External key management systems(EKM) Provisioning response", + "id": "GoogleCloudAssuredworkloadsV1beta1WorkloadEkmProvisioningResponse", + "properties": { + "ekmProvisioningErrorDomain": { + "description": "Indicates Ekm provisioning error if any.", + "enum": [ + "EKM_PROVISIONING_ERROR_DOMAIN_UNSPECIFIED", + "UNSPECIFIED_ERROR", + "GOOGLE_SERVER_ERROR", + "EXTERNAL_USER_ERROR", + "EXTERNAL_PARTNER_ERROR", + "TIMEOUT_ERROR" + ], + "enumDescriptions": [ + "No error domain", + "Error but domain is unspecified.", + "Internal logic breaks within provisioning code.", + "Error occurred with the customer not granting permission/creating resource.", + "Error occurred within the partner’s provisioning cluster.", + "Resource wasn't provisioned in the required 7 day time period" + ], + "type": "string" + }, + "ekmProvisioningErrorMessage": { + "description": "Detailed error message if Ekm provisioning fails", + "type": "string" + }, + "ekmProvisioningState": { + "description": "Indicates Ekm enrollment Provisioning of a given workload.", + "enum": [ + "EKM_PROVISIONING_STATE_UNSPECIFIED", + "EKM_PROVISIONING_STATE_PENDING", + "EKM_PROVISIONING_STATE_FAILED", + "EKM_PROVISIONING_STATE_COMPLETED" + ], + "enumDescriptions": [ + "Default State for Ekm Provisioning", + "Pending State for Ekm Provisioning", + "Failed State for Ekm Provisioning", + "Completed State for Ekm Provisioning" + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampHighSettings": { "description": "Settings specific to resources needed for FedRAMP High.", "id": "GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampHighSettings", diff --git a/assuredworkloads/v1beta1/assuredworkloads-gen.go b/assuredworkloads/v1beta1/assuredworkloads-gen.go index f48057a28e7..a3ab37f5b5d 100644 --- a/assuredworkloads/v1beta1/assuredworkloads-gen.go +++ b/assuredworkloads/v1beta1/assuredworkloads-gen.go @@ -814,6 +814,10 @@ type GoogleCloudAssuredworkloadsV1beta1Workload struct { // spaces. Example: My Workload DisplayName string `json:"displayName,omitempty"` + // EkmProvisioningResponse: Optional. Represents the Ekm Provisioning + // State of the given workload. + EkmProvisioningResponse *GoogleCloudAssuredworkloadsV1beta1WorkloadEkmProvisioningResponse `json:"ekmProvisioningResponse,omitempty"` + // EnableSovereignControls: Optional. Indicates the sovereignty status // of the given workload. Currently meant to be used by Europe/Canada // customers. @@ -990,6 +994,66 @@ func (s *GoogleCloudAssuredworkloadsV1beta1WorkloadComplianceStatus) MarshalJSON return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAssuredworkloadsV1beta1WorkloadEkmProvisioningResponse: +// External key management systems(EKM) Provisioning response +type GoogleCloudAssuredworkloadsV1beta1WorkloadEkmProvisioningResponse struct { + // EkmProvisioningErrorDomain: Indicates Ekm provisioning error if any. + // + // Possible values: + // "EKM_PROVISIONING_ERROR_DOMAIN_UNSPECIFIED" - No error domain + // "UNSPECIFIED_ERROR" - Error but domain is unspecified. + // "GOOGLE_SERVER_ERROR" - Internal logic breaks within provisioning + // code. + // "EXTERNAL_USER_ERROR" - Error occurred with the customer not + // granting permission/creating resource. + // "EXTERNAL_PARTNER_ERROR" - Error occurred within the partner’s + // provisioning cluster. + // "TIMEOUT_ERROR" - Resource wasn't provisioned in the required 7 day + // time period + EkmProvisioningErrorDomain string `json:"ekmProvisioningErrorDomain,omitempty"` + + // EkmProvisioningErrorMessage: Detailed error message if Ekm + // provisioning fails + EkmProvisioningErrorMessage string `json:"ekmProvisioningErrorMessage,omitempty"` + + // EkmProvisioningState: Indicates Ekm enrollment Provisioning of a + // given workload. + // + // Possible values: + // "EKM_PROVISIONING_STATE_UNSPECIFIED" - Default State for Ekm + // Provisioning + // "EKM_PROVISIONING_STATE_PENDING" - Pending State for Ekm + // Provisioning + // "EKM_PROVISIONING_STATE_FAILED" - Failed State for Ekm Provisioning + // "EKM_PROVISIONING_STATE_COMPLETED" - Completed State for Ekm + // Provisioning + EkmProvisioningState string `json:"ekmProvisioningState,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EkmProvisioningErrorDomain") 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. + // "EkmProvisioningErrorDomain") 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 *GoogleCloudAssuredworkloadsV1beta1WorkloadEkmProvisioningResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1beta1WorkloadEkmProvisioningResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampHighSettings: // Settings specific to resources needed for FedRAMP High. type GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampHighSettings struct { diff --git a/batch/v1/batch-api.json b/batch/v1/batch-api.json index b45445dc4da..50054a2cdea 100644 --- a/batch/v1/batch-api.json +++ b/batch/v1/batch-api.json @@ -556,7 +556,7 @@ } } }, - "revision": "20230213", + "revision": "20230226", "rootUrl": "https://batch.googleapis.com/", "schemas": { "Accelerator": { @@ -862,7 +862,7 @@ "id": "Container", "properties": { "blockExternalNetwork": { - "description": "If set to true, external network access to and from container will be blocked. The container will use the default internal network 'goog-internal'.", + "description": "If set to true, external network access to and from container will be blocked, containers that are with block_external_network as true can still communicate with each other, network cannot be specified in the `container.options` field.", "type": "boolean" }, "commands": { @@ -903,7 +903,7 @@ "type": "object" }, "Disk": { - "description": "A new persistent disk or a local ssd. A VM can only have one local SSD setting but multiple local SSD partitions. https://cloud.google.com/compute/docs/disks#pdspecs. https://cloud.google.com/compute/docs/disks#localssds.", + "description": "A new persistent disk or a local ssd. A VM can only have one local SSD setting but multiple local SSD partitions. See https://cloud.google.com/compute/docs/disks#pdspecs and https://cloud.google.com/compute/docs/disks#localssds.", "id": "Disk", "properties": { "diskInterface": { @@ -911,7 +911,7 @@ "type": "string" }, "image": { - "description": "Name of a public or custom image used as the data source. For example, the following are all valid URLs: (1) Specify the image by its family name: projects/{project}/global/images/family/{image_family} (2) Specify the image version: projects/{project}/global/images/{image_version} You can also use Batch customized image in short names. The following image values are supported for a boot disk: \"batch-debian\": use Batch Debian images. \"batch-centos\": use Batch CentOS images. \"batch-cos\": use Batch Container-Optimized images.", + "description": "Name of a public or custom image used as the data source. For example, the following are all valid URLs: * Specify the image by its family name: projects/{project}/global/images/family/{image_family} * Specify the image version: projects/{project}/global/images/{image_version} You can also use Batch customized image in short names. The following image values are supported for a boot disk: * \"batch-debian\": use Batch Debian images. * \"batch-centos\": use Batch CentOS images. * \"batch-cos\": use Batch Container-Optimized images.", "type": "string" }, "sizeGb": { @@ -985,7 +985,7 @@ }, "bootDisk": { "$ref": "Disk", - "description": "Book disk to be created and attached to each VM by this InstancePolicy. Boot disk will be deleted when the VM is deleted." + "description": "Boot disk to be created and attached to each VM by this InstancePolicy. Boot disk will be deleted when the VM is deleted." }, "disks": { "description": "Non-boot disks to be attached for each VM created by this InstancePolicy. New disks will be deleted when the VM is deleted.", @@ -999,7 +999,7 @@ "type": "string" }, "minCpuPlatform": { - "description": "The minimum CPU platform. See `https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform`. Not yet implemented.", + "description": "The minimum CPU platform. See https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. Not yet implemented.", "type": "string" }, "provisioningModel": { @@ -1487,7 +1487,7 @@ "id": "NetworkInterface", "properties": { "network": { - "description": "The URL of an existing network resource. You can specify the network as a full or partial URL. For example, the following are all valid URLs: https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} projects/{project}/global/networks/{network} global/networks/{network}", + "description": "The URL of an existing network resource. You can specify the network as a full or partial URL. For example, the following are all valid URLs: * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} * projects/{project}/global/networks/{network} * global/networks/{network}", "type": "string" }, "noExternalIpAddress": { @@ -1495,7 +1495,7 @@ "type": "boolean" }, "subnetwork": { - "description": "The URL of an existing subnetwork resource in the network. You can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} projects/{project}/regions/{region}/subnetworks/{subnetwork} regions/{region}/subnetworks/{subnetwork}", + "description": "The URL of an existing subnetwork resource in the network. You can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} * projects/{project}/regions/{region}/subnetworks/{subnetwork} * regions/{region}/subnetworks/{subnetwork}", "type": "string" } }, @@ -1831,7 +1831,7 @@ "type": "boolean" }, "taskCount": { - "description": "Number of Tasks in the TaskGroup. default is 1", + "description": "Number of Tasks in the TaskGroup. Default is 1.", "format": "int64", "type": "string" }, diff --git a/batch/v1/batch-gen.go b/batch/v1/batch-gen.go index 8883f304a82..492484b9f43 100644 --- a/batch/v1/batch-gen.go +++ b/batch/v1/batch-gen.go @@ -669,8 +669,9 @@ func (s *ComputeResource) MarshalJSON() ([]byte, error) { // Container: Container runnable. type Container struct { // BlockExternalNetwork: If set to true, external network access to and - // from container will be blocked. The container will use the default - // internal network 'goog-internal'. + // from container will be blocked, containers that are with + // block_external_network as true can still communicate with each other, + // network cannot be specified in the `container.options` field. BlockExternalNetwork bool `json:"blockExternalNetwork,omitempty"` // Commands: Overrides the `CMD` specified in the container. If there is @@ -730,8 +731,8 @@ func (s *Container) MarshalJSON() ([]byte, error) { } // Disk: A new persistent disk or a local ssd. A VM can only have one -// local SSD setting but multiple local SSD partitions. -// https://cloud.google.com/compute/docs/disks#pdspecs. +// local SSD setting but multiple local SSD partitions. See +// https://cloud.google.com/compute/docs/disks#pdspecs and // https://cloud.google.com/compute/docs/disks#localssds. type Disk struct { // DiskInterface: Local SSDs are available through both "SCSI" and @@ -740,14 +741,14 @@ type Disk struct { DiskInterface string `json:"diskInterface,omitempty"` // Image: Name of a public or custom image used as the data source. For - // example, the following are all valid URLs: (1) Specify the image by - // its family name: - // projects/{project}/global/images/family/{image_family} (2) Specify - // the image version: projects/{project}/global/images/{image_version} - // You can also use Batch customized image in short names. The following - // image values are supported for a boot disk: "batch-debian": use Batch - // Debian images. "batch-centos": use Batch CentOS images. "batch-cos": - // use Batch Container-Optimized images. + // example, the following are all valid URLs: * Specify the image by its + // family name: projects/{project}/global/images/family/{image_family} * + // Specify the image version: + // projects/{project}/global/images/{image_version} You can also use + // Batch customized image in short names. The following image values are + // supported for a boot disk: * "batch-debian": use Batch Debian images. + // * "batch-centos": use Batch CentOS images. * "batch-cos": use Batch + // Container-Optimized images. Image string `json:"image,omitempty"` // SizeGb: Disk size in GB. For persistent disk, this field is ignored @@ -876,7 +877,7 @@ type InstancePolicy struct { // Accelerators: The accelerators attached to each VM instance. Accelerators []*Accelerator `json:"accelerators,omitempty"` - // BootDisk: Book disk to be created and attached to each VM by this + // BootDisk: Boot disk to be created and attached to each VM by this // InstancePolicy. Boot disk will be deleted when the VM is deleted. BootDisk *Disk `json:"bootDisk,omitempty"` @@ -888,8 +889,8 @@ type InstancePolicy struct { MachineType string `json:"machineType,omitempty"` // MinCpuPlatform: The minimum CPU platform. See - // `https://cloud.google.com/compute/docs/instances/specify-min-cpu-platf - // orm`. Not yet implemented. + // https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. + // Not yet implemented. MinCpuPlatform string `json:"minCpuPlatform,omitempty"` // ProvisioningModel: The provisioning model. @@ -1634,9 +1635,9 @@ func (s *NFS) MarshalJSON() ([]byte, error) { type NetworkInterface struct { // Network: The URL of an existing network resource. You can specify the // network as a full or partial URL. For example, the following are all - // valid URLs: + // valid URLs: * // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} - // projects/{project}/global/networks/{network} + // * projects/{project}/global/networks/{network} * // global/networks/{network} Network string `json:"network,omitempty"` @@ -1651,9 +1652,9 @@ type NetworkInterface struct { // Subnetwork: The URL of an existing subnetwork resource in the // network. You can specify the subnetwork as a full or partial URL. For - // example, the following are all valid URLs: + // example, the following are all valid URLs: * // https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} - // projects/{project}/regions/{region}/subnetworks/{subnetwork} + // * projects/{project}/regions/{region}/subnetworks/{subnetwork} * // regions/{region}/subnetworks/{subnetwork} Subnetwork string `json:"subnetwork,omitempty"` @@ -2224,7 +2225,7 @@ type TaskGroup struct { // environment variable to the path of that file. Defaults to false. RequireHostsFile bool `json:"requireHostsFile,omitempty"` - // TaskCount: Number of Tasks in the TaskGroup. default is 1 + // TaskCount: Number of Tasks in the TaskGroup. Default is 1. TaskCount int64 `json:"taskCount,omitempty,string"` // TaskCountPerNode: Max number of tasks that can be run on a VM at the diff --git a/calendar/v3/calendar-api.json b/calendar/v3/calendar-api.json index dec8b09531e..c57e7e5158b 100644 --- a/calendar/v3/calendar-api.json +++ b/calendar/v3/calendar-api.json @@ -1723,7 +1723,7 @@ } } }, - "revision": "20220722", + "revision": "20230226", "rootUrl": "https://www.googleapis.com/", "schemas": { "Acl": { @@ -2380,7 +2380,7 @@ }, "eventType": { "default": "default", - "description": "Specific type of the event. Read-only. Possible values are: \n- \"default\" - A regular event or not further specified. \n- \"outOfOffice\" - An out-of-office event. \n- \"focusTime\" - A focus-time event.", + "description": "Specific type of the event. Read-only. Possible values are: \n- \"default\" - A regular event or not further specified. \n- \"outOfOffice\" - An out-of-office event. \n- \"focusTime\" - A focus-time event. \n- \"workingLocation\" - A working location event.", "type": "string" }, "extendedProperties": { @@ -2611,6 +2611,10 @@ "default": "default", "description": "Visibility of the event. Optional. Possible values are: \n- \"default\" - Uses the default visibility for events on the calendar. This is the default value. \n- \"public\" - The event is public and event details are visible to all readers of the calendar. \n- \"private\" - The event is private and only event attendees may view event details. \n- \"confidential\" - The event is private. This value is provided for compatibility reasons.", "type": "string" + }, + "workingLocationProperties": { + "$ref": "EventWorkingLocationProperties", + "description": "Working Location event data. Read-only." } }, "type": "object" @@ -2727,6 +2731,52 @@ }, "type": "object" }, + "EventWorkingLocationProperties": { + "id": "EventWorkingLocationProperties", + "properties": { + "customLocation": { + "description": "If present, specifies that the user is working from a custom location.", + "properties": { + "label": { + "description": "An optional extra label for additional information.", + "type": "string" + } + }, + "type": "object" + }, + "homeOffice": { + "description": "If present, specifies that the user is working at home.", + "type": "any" + }, + "officeLocation": { + "description": "If present, specifies that the user is working from an office.", + "properties": { + "buildingId": { + "description": "An optional building identifier. This should reference a building ID in the organization's Resources database.", + "type": "string" + }, + "deskId": { + "description": "An optional arbitrary desk identifier.", + "type": "string" + }, + "floorId": { + "description": "An optional arbitrary floor identifier.", + "type": "string" + }, + "floorSectionId": { + "description": "An optional arbitrary floor section identifier.", + "type": "string" + }, + "label": { + "description": "An optional extra label for additional information.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "Events": { "id": "Events", "properties": { diff --git a/calendar/v3/calendar-gen.go b/calendar/v3/calendar-gen.go index bc9d00a0f95..12b5a14dba4 100644 --- a/calendar/v3/calendar-gen.go +++ b/calendar/v3/calendar-gen.go @@ -1360,6 +1360,7 @@ type Event struct { // - "default" - A regular event or not further specified. // - "outOfOffice" - An out-of-office event. // - "focusTime" - A focus-time event. + // - "workingLocation" - A working location event. EventType string `json:"eventType,omitempty"` // ExtendedProperties: Extended properties of the event. @@ -1546,6 +1547,9 @@ type Event struct { // compatibility reasons. Visibility string `json:"visibility,omitempty"` + // WorkingLocationProperties: Working Location event data. Read-only. + WorkingLocationProperties *EventWorkingLocationProperties `json:"workingLocationProperties,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -2015,6 +2019,113 @@ func (s *EventReminder) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type EventWorkingLocationProperties struct { + // CustomLocation: If present, specifies that the user is working from a + // custom location. + CustomLocation *EventWorkingLocationPropertiesCustomLocation `json:"customLocation,omitempty"` + + // HomeOffice: If present, specifies that the user is working at home. + HomeOffice interface{} `json:"homeOffice,omitempty"` + + // OfficeLocation: If present, specifies that the user is working from + // an office. + OfficeLocation *EventWorkingLocationPropertiesOfficeLocation `json:"officeLocation,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomLocation") 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. "CustomLocation") 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 *EventWorkingLocationProperties) MarshalJSON() ([]byte, error) { + type NoMethod EventWorkingLocationProperties + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// EventWorkingLocationPropertiesCustomLocation: If present, specifies +// that the user is working from a custom location. +type EventWorkingLocationPropertiesCustomLocation struct { + // Label: An optional extra label for additional information. + Label string `json:"label,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Label") 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. "Label") 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 *EventWorkingLocationPropertiesCustomLocation) MarshalJSON() ([]byte, error) { + type NoMethod EventWorkingLocationPropertiesCustomLocation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// EventWorkingLocationPropertiesOfficeLocation: If present, specifies +// that the user is working from an office. +type EventWorkingLocationPropertiesOfficeLocation struct { + // BuildingId: An optional building identifier. This should reference a + // building ID in the organization's Resources database. + BuildingId string `json:"buildingId,omitempty"` + + // DeskId: An optional arbitrary desk identifier. + DeskId string `json:"deskId,omitempty"` + + // FloorId: An optional arbitrary floor identifier. + FloorId string `json:"floorId,omitempty"` + + // FloorSectionId: An optional arbitrary floor section identifier. + FloorSectionId string `json:"floorSectionId,omitempty"` + + // Label: An optional extra label for additional information. + Label string `json:"label,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BuildingId") 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. "BuildingId") 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 *EventWorkingLocationPropertiesOfficeLocation) MarshalJSON() ([]byte, error) { + type NoMethod EventWorkingLocationPropertiesOfficeLocation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type Events struct { // AccessRole: The user's access role for this calendar. Read-only. // Possible values are: diff --git a/clouddeploy/v1/clouddeploy-api.json b/clouddeploy/v1/clouddeploy-api.json index 14c5e293e2b..cbc4214a64f 100644 --- a/clouddeploy/v1/clouddeploy-api.json +++ b/clouddeploy/v1/clouddeploy-api.json @@ -1339,7 +1339,7 @@ } } }, - "revision": "20230209", + "revision": "20230224", "rootUrl": "https://clouddeploy.googleapis.com/", "schemas": { "AbandonReleaseRequest": { @@ -1354,6 +1354,29 @@ "properties": {}, "type": "object" }, + "AdvanceChildRolloutJob": { + "description": "An advanceChildRollout Job.", + "id": "AdvanceChildRolloutJob", + "properties": {}, + "type": "object" + }, + "AdvanceChildRolloutJobRun": { + "description": "AdvanceChildRolloutJobRun contains information specific to a advanceChildRollout `JobRun`.", + "id": "AdvanceChildRolloutJobRun", + "properties": { + "rollout": { + "description": "Output only. Name of the `ChildRollout`. Format is projects/{project}/ locations/{location}/deliveryPipelines/{deliveryPipeline}/ releases/{release}/rollouts/a-z{0,62}.", + "readOnly": true, + "type": "string" + }, + "rolloutPhaseId": { + "description": "Output only. the ID of the ChildRollout's Phase.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "AnthosCluster": { "description": "Information specifying an Anthos Cluster.", "id": "AnthosCluster", @@ -1473,6 +1496,29 @@ "properties": {}, "type": "object" }, + "ChildRolloutJobs": { + "description": "ChildRollouts job composition", + "id": "ChildRolloutJobs", + "properties": { + "advanceRolloutJobs": { + "description": "Output only. List of AdvanceChildRolloutJobs", + "items": { + "$ref": "Job" + }, + "readOnly": true, + "type": "array" + }, + "createRolloutJobs": { + "description": "Output only. List of CreateChildRolloutJobs", + "items": { + "$ref": "Job" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "CloudRunLocation": { "description": "Information specifying where to deploy a Cloud Run Service.", "id": "CloudRunLocation", @@ -1531,6 +1577,29 @@ }, "type": "object" }, + "CreateChildRolloutJob": { + "description": "A createChildRollout Job.", + "id": "CreateChildRolloutJob", + "properties": {}, + "type": "object" + }, + "CreateChildRolloutJobRun": { + "description": "CreateChildRolloutJobRun contains information specific to a createChildRollout `JobRun`.", + "id": "CreateChildRolloutJobRun", + "properties": { + "rollout": { + "description": "Output only. Name of the `ChildRollout`. Format is projects/{project}/ locations/{location}/deliveryPipelines/{deliveryPipeline}/ releases/{release}/rollouts/a-z{0,62}.", + "readOnly": true, + "type": "string" + }, + "rolloutPhaseId": { + "description": "Output only. The ID of the childRollout Phase initiated by this JobRun.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "Date": { "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": "Date", @@ -1835,6 +1904,16 @@ "description": "Job represents an operation for a `Rollout`.", "id": "Job", "properties": { + "advanceChildRolloutJob": { + "$ref": "AdvanceChildRolloutJob", + "description": "Output only. An advanceChildRollout Job.", + "readOnly": true + }, + "createChildRolloutJob": { + "$ref": "CreateChildRolloutJob", + "description": "Output only. A createChildRollout Job.", + "readOnly": true + }, "deployJob": { "$ref": "DeployJob", "description": "Output only. A deploy Job.", @@ -1885,6 +1964,16 @@ "description": "A `JobRun` resource in the Google Cloud Deploy API. A `JobRun` contains information of a single `Rollout` job evaluation.", "id": "JobRun", "properties": { + "advanceChildRolloutJobRun": { + "$ref": "AdvanceChildRolloutJobRun", + "description": "Output only. Information specific to an advanceChildRollout `JobRun`", + "readOnly": true + }, + "createChildRolloutJobRun": { + "$ref": "CreateChildRolloutJobRun", + "description": "Output only. Information specific to a createChildRollout `JobRun`.", + "readOnly": true + }, "createTime": { "description": "Output only. Time at which the `JobRun` was created.", "format": "google-datetime", @@ -2209,6 +2298,20 @@ }, "type": "object" }, + "MultiTarget": { + "description": "Information specifying a multiTarget.", + "id": "MultiTarget", + "properties": { + "targetIds": { + "description": "Required. The target_ids of this multiTarget.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", @@ -2292,6 +2395,11 @@ "description": "Phase represents a collection of jobs that are logically grouped together for a `Rollout`.", "id": "Phase", "properties": { + "childRolloutJobs": { + "$ref": "ChildRolloutJobs", + "description": "Output only. ChildRollout job composition.", + "readOnly": true + }, "deploymentJobs": { "$ref": "DeploymentJobs", "description": "Output only. Deployment job composition.", @@ -2669,6 +2777,11 @@ "readOnly": true, "type": "string" }, + "controllerRollout": { + "description": "Output only. Name of the `ControllerRollout`. Format is projects/{project}/ locations/{location}/deliveryPipelines/{deliveryPipeline}/ releases/{release}/rollouts/a-z{0,62}.", + "readOnly": true, + "type": "string" + }, "createTime": { "description": "Output only. Time at which the `Rollout` was created.", "format": "google-datetime", @@ -3048,6 +3161,10 @@ "description": "Optional. Labels are attributes that can be set and used by both the user and by Google Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be \u003c= 128 bytes.", "type": "object" }, + "multiTarget": { + "$ref": "MultiTarget", + "description": "Information specifying a multiTarget." + }, "name": { "description": "Optional. Name of the `Target`. Format is projects/{project}/locations/{location}/targets/a-z{0,62}.", "type": "string" diff --git a/clouddeploy/v1/clouddeploy-gen.go b/clouddeploy/v1/clouddeploy-gen.go index cd0b2e617fa..6df82edfd2a 100644 --- a/clouddeploy/v1/clouddeploy-gen.go +++ b/clouddeploy/v1/clouddeploy-gen.go @@ -241,6 +241,45 @@ type AbandonReleaseResponse struct { googleapi.ServerResponse `json:"-"` } +// AdvanceChildRolloutJob: An advanceChildRollout Job. +type AdvanceChildRolloutJob struct { +} + +// AdvanceChildRolloutJobRun: AdvanceChildRolloutJobRun contains +// information specific to a advanceChildRollout `JobRun`. +type AdvanceChildRolloutJobRun struct { + // Rollout: Output only. Name of the `ChildRollout`. Format is + // projects/{project}/ + // locations/{location}/deliveryPipelines/{deliveryPipeline}/ + // releases/{release}/rollouts/a-z{0,62}. + Rollout string `json:"rollout,omitempty"` + + // RolloutPhaseId: Output only. the ID of the ChildRollout's Phase. + RolloutPhaseId string `json:"rolloutPhaseId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Rollout") 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. "Rollout") 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 *AdvanceChildRolloutJobRun) MarshalJSON() ([]byte, error) { + type NoMethod AdvanceChildRolloutJobRun + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AnthosCluster: Information specifying an Anthos Cluster. type AnthosCluster struct { // Membership: Membership of the GKE Hub-registered cluster to which to @@ -521,6 +560,38 @@ func (s *BuildArtifact) MarshalJSON() ([]byte, error) { type CancelOperationRequest struct { } +// ChildRolloutJobs: ChildRollouts job composition +type ChildRolloutJobs struct { + // AdvanceRolloutJobs: Output only. List of AdvanceChildRolloutJobs + AdvanceRolloutJobs []*Job `json:"advanceRolloutJobs,omitempty"` + + // CreateRolloutJobs: Output only. List of CreateChildRolloutJobs + CreateRolloutJobs []*Job `json:"createRolloutJobs,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdvanceRolloutJobs") + // 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. "AdvanceRolloutJobs") 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 *ChildRolloutJobs) MarshalJSON() ([]byte, error) { + type NoMethod ChildRolloutJobs + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CloudRunLocation: Information specifying where to deploy a Cloud Run // Service. type CloudRunLocation struct { @@ -631,6 +702,46 @@ func (s *Config) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CreateChildRolloutJob: A createChildRollout Job. +type CreateChildRolloutJob struct { +} + +// CreateChildRolloutJobRun: CreateChildRolloutJobRun contains +// information specific to a createChildRollout `JobRun`. +type CreateChildRolloutJobRun struct { + // Rollout: Output only. Name of the `ChildRollout`. Format is + // projects/{project}/ + // locations/{location}/deliveryPipelines/{deliveryPipeline}/ + // releases/{release}/rollouts/a-z{0,62}. + Rollout string `json:"rollout,omitempty"` + + // RolloutPhaseId: Output only. The ID of the childRollout Phase + // initiated by this JobRun. + RolloutPhaseId string `json:"rolloutPhaseId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Rollout") 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. "Rollout") 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 *CreateChildRolloutJobRun) MarshalJSON() ([]byte, error) { + type NoMethod CreateChildRolloutJobRun + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Date: 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 @@ -1143,6 +1254,12 @@ func (s *GkeCluster) MarshalJSON() ([]byte, error) { // Job: Job represents an operation for a `Rollout`. type Job struct { + // AdvanceChildRolloutJob: Output only. An advanceChildRollout Job. + AdvanceChildRolloutJob *AdvanceChildRolloutJob `json:"advanceChildRolloutJob,omitempty"` + + // CreateChildRolloutJob: Output only. A createChildRollout Job. + CreateChildRolloutJob *CreateChildRolloutJob `json:"createChildRolloutJob,omitempty"` + // DeployJob: Output only. A deploy Job. DeployJob *DeployJob `json:"deployJob,omitempty"` @@ -1169,20 +1286,22 @@ type Job struct { // VerifyJob: Output only. A verify Job. VerifyJob *VerifyJob `json:"verifyJob,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeployJob") 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. + // "AdvanceChildRolloutJob") 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. "DeployJob") 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. "AdvanceChildRolloutJob") + // 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:"-"` } @@ -1195,6 +1314,14 @@ func (s *Job) MarshalJSON() ([]byte, error) { // JobRun: A `JobRun` resource in the Google Cloud Deploy API. A // `JobRun` contains information of a single `Rollout` job evaluation. type JobRun struct { + // AdvanceChildRolloutJobRun: Output only. Information specific to an + // advanceChildRollout `JobRun` + AdvanceChildRolloutJobRun *AdvanceChildRolloutJobRun `json:"advanceChildRolloutJobRun,omitempty"` + + // CreateChildRolloutJobRun: Output only. Information specific to a + // createChildRollout `JobRun`. + CreateChildRolloutJobRun *CreateChildRolloutJobRun `json:"createChildRolloutJobRun,omitempty"` + // CreateTime: Output only. Time at which the `JobRun` was created. CreateTime string `json:"createTime,omitempty"` @@ -1246,20 +1373,22 @@ type JobRun struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "AdvanceChildRolloutJobRun") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "AdvanceChildRolloutJobRun") 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:"-"` } @@ -1682,6 +1811,34 @@ func (s *Metadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MultiTarget: Information specifying a multiTarget. +type MultiTarget struct { + // TargetIds: Required. The target_ids of this multiTarget. + TargetIds []string `json:"targetIds,omitempty"` + + // ForceSendFields is a list of field names (e.g. "TargetIds") 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. "TargetIds") 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 *MultiTarget) MarshalJSON() ([]byte, error) { + type NoMethod MultiTarget + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Operation: This resource represents a long-running operation that is // the result of a network API call. type Operation struct { @@ -1799,6 +1956,9 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { // Phase: Phase represents a collection of jobs that are logically // grouped together for a `Rollout`. type Phase struct { + // ChildRolloutJobs: Output only. ChildRollout job composition. + ChildRolloutJobs *ChildRolloutJobs `json:"childRolloutJobs,omitempty"` + // DeploymentJobs: Output only. Deployment job composition. DeploymentJobs *DeploymentJobs `json:"deploymentJobs,omitempty"` @@ -1817,7 +1977,7 @@ type Phase struct { // "ABORTED" - The Phase was aborted. State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeploymentJobs") to + // ForceSendFields is a list of field names (e.g. "ChildRolloutJobs") 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 @@ -1825,7 +1985,7 @@ type Phase struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DeploymentJobs") to + // NullFields is a list of field names (e.g. "ChildRolloutJobs") 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 @@ -2401,6 +2561,12 @@ type Rollout struct { // ApproveTime: Output only. Time at which the `Rollout` was approved. ApproveTime string `json:"approveTime,omitempty"` + // ControllerRollout: Output only. Name of the `ControllerRollout`. + // Format is projects/{project}/ + // locations/{location}/deliveryPipelines/{deliveryPipeline}/ + // releases/{release}/rollouts/a-z{0,62}. + ControllerRollout string `json:"controllerRollout,omitempty"` + // CreateTime: Output only. Time at which the `Rollout` was created. CreateTime string `json:"createTime,omitempty"` @@ -2931,6 +3097,9 @@ type Target struct { // keys and values are additionally constrained to be <= 128 bytes. Labels map[string]string `json:"labels,omitempty"` + // MultiTarget: Information specifying a multiTarget. + MultiTarget *MultiTarget `json:"multiTarget,omitempty"` + // Name: Optional. Name of the `Target`. Format is // projects/{project}/locations/{location}/targets/a-z{0,62}. Name string `json:"name,omitempty"` diff --git a/clouderrorreporting/v1beta1/clouderrorreporting-api.json b/clouderrorreporting/v1beta1/clouderrorreporting-api.json index 03f58b2424f..3fae39d9d1f 100644 --- a/clouderrorreporting/v1beta1/clouderrorreporting-api.json +++ b/clouderrorreporting/v1beta1/clouderrorreporting-api.json @@ -213,7 +213,7 @@ ] }, "report": { - "description": "Report an individual error event and record the event to a log. This endpoint accepts **either** an OAuth token, **or** an [API key](https://support.google.com/cloud/answer/6158862) for authentication. To use an API key, append it to the URL as the value of a `key` parameter. For example: `POST https://clouderrorreporting.googleapis.com/v1beta1/{projectName}/events:report?key=123ABC456` **Note:** [Error Reporting] (https://cloud.google.com/error-reporting) is a global service built on Cloud Logging and doesn't analyze logs stored in regional log buckets or logs routed to other Google Cloud projects. For more information, see [Using Error Reporting with regionalized logs] (https://cloud.google.com/error-reporting/docs/regionalization).", + "description": "Report an individual error event and record the event to a log. This endpoint accepts **either** an OAuth token, **or** an [API key](https://support.google.com/cloud/answer/6158862) for authentication. To use an API key, append it to the URL as the value of a `key` parameter. For example: `POST https://clouderrorreporting.googleapis.com/v1beta1/{projectName}/events:report?key=123ABC456` **Note:** [Error Reporting] (https://cloud.google.com/error-reporting) is a global service built on Cloud Logging and doesn't analyze logs stored in regional log buckets or logs routed to other Google Cloud projects.", "flatPath": "v1beta1/projects/{projectsId}/events:report", "httpMethod": "POST", "id": "clouderrorreporting.projects.events.report", @@ -430,7 +430,7 @@ } } }, - "revision": "20220511", + "revision": "20230223", "rootUrl": "https://clouderrorreporting.googleapis.com/", "schemas": { "DeleteEventsResponse": { diff --git a/clouderrorreporting/v1beta1/clouderrorreporting-gen.go b/clouderrorreporting/v1beta1/clouderrorreporting-gen.go index 2f78f2e21cc..01e1c10050f 100644 --- a/clouderrorreporting/v1beta1/clouderrorreporting-gen.go +++ b/clouderrorreporting/v1beta1/clouderrorreporting-gen.go @@ -1275,9 +1275,7 @@ type ProjectsEventsReportCall struct { // **Note:** [Error Reporting] // (https://cloud.google.com/error-reporting) is a global service built // on Cloud Logging and doesn't analyze logs stored in regional log -// buckets or logs routed to other Google Cloud projects. For more -// information, see [Using Error Reporting with regionalized logs] -// (https://cloud.google.com/error-reporting/docs/regionalization). +// buckets or logs routed to other Google Cloud projects. // // - projectName: The resource name of the Google Cloud Platform // project. Written as `projects/{projectId}`, where `{projectId}` is @@ -1382,7 +1380,7 @@ func (c *ProjectsEventsReportCall) Do(opts ...googleapi.CallOption) (*ReportErro } return ret, nil // { - // "description": "Report an individual error event and record the event to a log. This endpoint accepts **either** an OAuth token, **or** an [API key](https://support.google.com/cloud/answer/6158862) for authentication. To use an API key, append it to the URL as the value of a `key` parameter. For example: `POST https://clouderrorreporting.googleapis.com/v1beta1/{projectName}/events:report?key=123ABC456` **Note:** [Error Reporting] (https://cloud.google.com/error-reporting) is a global service built on Cloud Logging and doesn't analyze logs stored in regional log buckets or logs routed to other Google Cloud projects. For more information, see [Using Error Reporting with regionalized logs] (https://cloud.google.com/error-reporting/docs/regionalization).", + // "description": "Report an individual error event and record the event to a log. This endpoint accepts **either** an OAuth token, **or** an [API key](https://support.google.com/cloud/answer/6158862) for authentication. To use an API key, append it to the URL as the value of a `key` parameter. For example: `POST https://clouderrorreporting.googleapis.com/v1beta1/{projectName}/events:report?key=123ABC456` **Note:** [Error Reporting] (https://cloud.google.com/error-reporting) is a global service built on Cloud Logging and doesn't analyze logs stored in regional log buckets or logs routed to other Google Cloud projects.", // "flatPath": "v1beta1/projects/{projectsId}/events:report", // "httpMethod": "POST", // "id": "clouderrorreporting.projects.events.report", diff --git a/dataform/v1beta1/dataform-api.json b/dataform/v1beta1/dataform-api.json index 7003b5aeb09..09e6e493e16 100644 --- a/dataform/v1beta1/dataform-api.json +++ b/dataform/v1beta1/dataform-api.json @@ -296,6 +296,37 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}:getIamPolicy", + "httpMethod": "GET", + "id": "dataform.projects.locations.repositories.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Lists Repositories in a given project and location.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories", @@ -375,6 +406,62 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}:setIamPolicy", + "httpMethod": "POST", + "id": "dataform.projects.locations.repositories.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}:testIamPermissions", + "httpMethod": "POST", + "id": "dataform.projects.locations.repositories.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -1216,6 +1303,37 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/workspaces/{workspacesId}:getIamPolicy", + "httpMethod": "GET", + "id": "dataform.projects.locations.repositories.workspaces.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/workspaces/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "installNpmPackages": { "description": "Installs dependency NPM packages (inside a Workspace).", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/workspaces/{workspacesId}:installNpmPackages", @@ -1585,6 +1703,62 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/workspaces/{workspacesId}:setIamPolicy", + "httpMethod": "POST", + "id": "dataform.projects.locations.repositories.workspaces.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/workspaces/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/workspaces/{workspacesId}:testIamPermissions", + "httpMethod": "POST", + "id": "dataform.projects.locations.repositories.workspaces.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/workspaces/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "writeFile": { "description": "Writes to a file (inside a Workspace).", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/workspaces/{workspacesId}:writeFile", @@ -1622,7 +1796,7 @@ } } }, - "revision": "20230128", + "revision": "20230225", "rootUrl": "https://dataform.googleapis.com/", "schemas": { "Assertion": { @@ -1674,6 +1848,28 @@ }, "type": "object" }, + "Binding": { + "description": "Associates `members`, or principals, with a `role`.", + "id": "Binding", + "properties": { + "condition": { + "$ref": "Expr", + "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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `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`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `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.", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "type": "string" + } + }, + "type": "object" + }, "CancelWorkflowInvocationRequest": { "description": "`CancelWorkflowInvocation` request message.", "id": "CancelWorkflowInvocationRequest", @@ -1924,6 +2120,29 @@ "properties": {}, "type": "object" }, + "Expr": { + "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \u003c 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", + "id": "Expr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + }, "FetchFileDiffResponse": { "description": "`FetchFileDiff` response message.", "id": "FetchFileDiffResponse", @@ -2463,6 +2682,30 @@ }, "type": "object" }, + "Policy": { + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "id": "Policy", + "properties": { + "bindings": { + "description": "Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.", + "items": { + "$ref": "Binding" + }, + "type": "array" + }, + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "PullGitCommitsRequest": { "description": "`PullGitCommits` request message.", "id": "PullGitCommitsRequest", @@ -2820,6 +3063,17 @@ }, "type": "object" }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "id": "SetIamPolicyRequest", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." + } + }, + "type": "object" + }, "Status": { "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", "id": "Status", @@ -2866,6 +3120,34 @@ }, "type": "object" }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "id": "TestIamPermissionsRequest", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "id": "TestIamPermissionsResponse", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "UncommittedFileChange": { "description": "Represents the Git state of a file with uncommitted changes.", "id": "UncommittedFileChange", diff --git a/dataform/v1beta1/dataform-gen.go b/dataform/v1beta1/dataform-gen.go index 959ff534087..579485b7158 100644 --- a/dataform/v1beta1/dataform-gen.go +++ b/dataform/v1beta1/dataform-gen.go @@ -308,6 +308,84 @@ func (s *BigQueryAction) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Binding: Associates `members`, or principals, with a `role`. +type Binding struct { + // Condition: 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). + Condition *Expr `json:"condition,omitempty"` + + // Members: 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. Does + // not include identities that come from external identity providers + // (IdPs) through identity federation. * `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`. * `domain:{domain}`: The G Suite + // domain (primary) that represents all the users of that domain. For + // example, `google.com` or `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. + Members []string `json:"members,omitempty"` + + // Role: Role that is assigned to the list of `members`, or principals. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + Role string `json:"role,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Condition") 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. "Condition") 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 *Binding) MarshalJSON() ([]byte, error) { + type NoMethod Binding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CancelWorkflowInvocationRequest: `CancelWorkflowInvocation` request // message. type CancelWorkflowInvocationRequest struct { @@ -710,6 +788,66 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// Expr: Represents a textual expression in the Common Expression +// Language (CEL) syntax. CEL is a C-like expression language. The +// syntax and semantics of CEL are documented at +// https://github.com/google/cel-spec. Example (Comparison): title: +// "Summary size limit" description: "Determines if a summary is less +// than 100 chars" expression: "document.summary.size() < 100" Example +// (Equality): title: "Requestor is owner" description: "Determines if +// requestor is the document owner" expression: "document.owner == +// request.auth.claims.email" Example (Logic): title: "Public documents" +// description: "Determine whether the document should be publicly +// visible" expression: "document.type != 'private' && document.type != +// 'internal'" Example (Data Manipulation): title: "Notification string" +// description: "Create a notification string with a timestamp." +// expression: "'New message received at ' + +// string(document.create_time)" The exact variables and functions that +// may be referenced within an expression are determined by the service +// that evaluates it. See the service documentation for additional +// information. +type Expr struct { + // Description: Optional. Description of the expression. This is a + // longer text which describes the expression, e.g. when hovered over it + // in a UI. + Description string `json:"description,omitempty"` + + // Expression: Textual representation of an expression in Common + // Expression Language syntax. + Expression string `json:"expression,omitempty"` + + // Location: Optional. String indicating the location of the expression + // for error reporting, e.g. a file name and a position in the file. + Location string `json:"location,omitempty"` + + // Title: Optional. Title for the expression, i.e. a short string + // describing its purpose. This can be used e.g. in UIs which allow to + // enter the expression. + 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 *Expr) MarshalJSON() ([]byte, error) { + type NoMethod Expr + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // FetchFileDiffResponse: `FetchFileDiff` response message. type FetchFileDiffResponse struct { // FormattedDiff: The raw formatted Git diff for the file. @@ -1595,6 +1733,112 @@ func (s *Operations) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Policy: An Identity and Access Management (IAM) policy, which +// specifies access controls for Google Cloud resources. A `Policy` is a +// collection of `bindings`. A `binding` binds one or more `members`, or +// principals, to a single `role`. Principals can be user accounts, +// service accounts, Google groups, and domains (such as G Suite). A +// `role` is a named list of permissions; each `role` can be an IAM +// predefined role or a user-created custom role. For some types of +// Google Cloud resources, a `binding` can also specify a `condition`, +// which is a logical expression that allows access to a resource only +// if the expression evaluates to `true`. A condition can add +// constraints based on attributes of the request, the resource, or +// both. To learn which resources support conditions in their IAM +// policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +// **JSON example:** { "bindings": [ { "role": +// "roles/resourcemanager.organizationAdmin", "members": [ +// "user:mike@example.com", "group:admins@example.com", +// "domain:google.com", +// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { +// "role": "roles/resourcemanager.organizationViewer", "members": [ +// "user:eve@example.com" ], "condition": { "title": "expirable access", +// "description": "Does not grant access after Sep 2020", "expression": +// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], +// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - +// members: - user:mike@example.com - group:admins@example.com - +// domain:google.com - +// serviceAccount:my-project-id@appspot.gserviceaccount.com role: +// roles/resourcemanager.organizationAdmin - members: - +// user:eve@example.com role: roles/resourcemanager.organizationViewer +// condition: title: expirable access description: Does not grant access +// after Sep 2020 expression: request.time < +// timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 +// For a description of IAM and its features, see the IAM documentation +// (https://cloud.google.com/iam/docs/). +type Policy struct { + // Bindings: Associates a list of `members`, or principals, with a + // `role`. Optionally, may specify a `condition` that determines how and + // when the `bindings` are applied. Each of the `bindings` must contain + // at least one principal. The `bindings` in a `Policy` can refer to up + // to 1,500 principals; up to 250 of these principals can be Google + // groups. Each occurrence of a principal counts towards these limits. + // For example, if the `bindings` grant 50 different roles to + // `user:alice@example.com`, and not to any other principal, then you + // can add another 1,450 principals to the `bindings` in the `Policy`. + Bindings []*Binding `json:"bindings,omitempty"` + + // Etag: `etag` is used for optimistic concurrency control as a way to + // help prevent simultaneous updates of a policy from overwriting each + // other. It is strongly suggested that systems make use of the `etag` + // in the read-modify-write cycle to perform policy updates in order to + // avoid race conditions: An `etag` is returned in the response to + // `getIamPolicy`, and systems are expected to put that etag in the + // request to `setIamPolicy` to ensure that their change will be applied + // to the same version of the policy. **Important:** If you use IAM + // Conditions, you must include the `etag` field whenever you call + // `setIamPolicy`. If you omit this field, then IAM allows you to + // overwrite a version `3` policy with a version `1` policy, and all of + // the conditions in the version `3` policy are lost. + Etag string `json:"etag,omitempty"` + + // Version: Specifies the format of the policy. Valid values are `0`, + // `1`, and `3`. Requests that specify an invalid value are rejected. + // Any operation that affects conditional role bindings must specify + // version `3`. This requirement applies to the following operations: * + // Getting a policy that includes a conditional role binding * Adding a + // conditional role binding to a policy * Changing a conditional role + // binding in a policy * Removing any role binding, with or without a + // condition, from a policy that includes conditions **Important:** If + // you use IAM Conditions, you must include the `etag` field whenever + // you call `setIamPolicy`. If you omit this field, then IAM allows you + // to overwrite a version `3` policy with a version `1` policy, and all + // of the conditions in the version `3` policy are lost. If a policy + // does not include any conditions, operations on that policy may + // specify any valid version or leave the field unset. To learn which + // resources support conditions in their IAM policies, see the IAM + // documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Version int64 `json:"version,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Bindings") 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. "Bindings") 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 *Policy) MarshalJSON() ([]byte, error) { + type NoMethod Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // PullGitCommitsRequest: `PullGitCommits` request message. type PullGitCommitsRequest struct { // Author: Required. The author of any merge commit which may be created @@ -2220,6 +2464,37 @@ func (s *ScheduledReleaseRecord) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SetIamPolicyRequest: Request message for `SetIamPolicy` method. +type SetIamPolicyRequest struct { + // Policy: REQUIRED: The complete policy to be applied to the + // `resource`. The size of the policy is limited to a few 10s of KB. An + // empty policy is a valid policy but certain Google Cloud services + // (such as Projects) might reject them. + Policy *Policy `json:"policy,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Policy") 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. "Policy") 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 *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod SetIamPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Status: The `Status` type defines a logical error model that is // suitable for different programming environments, including REST APIs // and RPC APIs. It is used by gRPC (https://github.com/grpc). Each @@ -2299,6 +2574,72 @@ func (s *Target) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TestIamPermissionsRequest: Request message for `TestIamPermissions` +// method. +type TestIamPermissionsRequest struct { + // Permissions: The set of permissions to check for the `resource`. + // Permissions with wildcards (such as `*` or `storage.*`) are not + // allowed. For more information see IAM Overview + // (https://cloud.google.com/iam/docs/overview#permissions). + Permissions []string `json:"permissions,omitempty"` + + // 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 *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsResponse: Response message for `TestIamPermissions` +// method. +type TestIamPermissionsResponse struct { + // Permissions: A subset of `TestPermissionsRequest.permissions` that + // the caller is allowed. + Permissions []string `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 *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // UncommittedFileChange: Represents the Git state of a file with // uncommitted changes. type UncommittedFileChange struct { @@ -3603,6 +3944,181 @@ func (c *ProjectsLocationsRepositoriesGetCall) Do(opts ...googleapi.CallOption) } +// method id "dataform.projects.locations.repositories.getIamPolicy": + +type ProjectsLocationsRepositoriesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsRepositoriesService) GetIamPolicy(resource string) *ProjectsLocationsRepositoriesGetIamPolicyCall { + c := &ProjectsLocationsRepositoriesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsRepositoriesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesGetIamPolicyCall { + 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 *ProjectsLocationsRepositoriesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesGetIamPolicyCall { + 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 *ProjectsLocationsRepositoriesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesGetIamPolicyCall { + 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 *ProjectsLocationsRepositoriesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) 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, "v1beta1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataform.projects.locations.repositories.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "dataform.projects.locations.repositories.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "dataform.projects.locations.repositories.list": type ProjectsLocationsRepositoriesListCall struct { @@ -3983,10 +4499,307 @@ func (c *ProjectsLocationsRepositoriesPatchCall) Do(opts ...googleapi.CallOption } -// method id "dataform.projects.locations.repositories.compilationResults.create": +// method id "dataform.projects.locations.repositories.setIamPolicy": -type ProjectsLocationsRepositoriesCompilationResultsCreateCall struct { - s *Service +type ProjectsLocationsRepositoriesSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsRepositoriesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsRepositoriesSetIamPolicyCall { + c := &ProjectsLocationsRepositoriesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesSetIamPolicyCall { + 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 *ProjectsLocationsRepositoriesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesSetIamPolicyCall { + 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 *ProjectsLocationsRepositoriesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataform.projects.locations.repositories.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "dataform.projects.locations.repositories.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataform.projects.locations.repositories.testIamPermissions": + +type ProjectsLocationsRepositoriesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsRepositoriesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsRepositoriesTestIamPermissionsCall { + c := &ProjectsLocationsRepositoriesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesTestIamPermissionsCall { + 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 *ProjectsLocationsRepositoriesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesTestIamPermissionsCall { + 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 *ProjectsLocationsRepositoriesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataform.projects.locations.repositories.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "dataform.projects.locations.repositories.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataform.projects.locations.repositories.compilationResults.create": + +type ProjectsLocationsRepositoriesCompilationResultsCreateCall struct { + s *Service parent string compilationresult *CompilationResult urlParams_ gensupport.URLParams @@ -8287,62 +9100,237 @@ func (c *ProjectsLocationsRepositoriesWorkspacesGetCall) Do(opts ...googleapi.Ca } -// method id "dataform.projects.locations.repositories.workspaces.installNpmPackages": +// method id "dataform.projects.locations.repositories.workspaces.getIamPolicy": -type ProjectsLocationsRepositoriesWorkspacesInstallNpmPackagesCall struct { - s *Service - workspace string - installnpmpackagesrequest *InstallNpmPackagesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRepositoriesWorkspacesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// InstallNpmPackages: Installs dependency NPM packages (inside a -// Workspace). +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. // -// - workspace: The workspace's name. -func (r *ProjectsLocationsRepositoriesWorkspacesService) InstallNpmPackages(workspace string, installnpmpackagesrequest *InstallNpmPackagesRequest) *ProjectsLocationsRepositoriesWorkspacesInstallNpmPackagesCall { - c := &ProjectsLocationsRepositoriesWorkspacesInstallNpmPackagesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.workspace = workspace - c.installnpmpackagesrequest = installnpmpackagesrequest +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsRepositoriesWorkspacesService) GetIamPolicy(resource string) *ProjectsLocationsRepositoriesWorkspacesGetIamPolicyCall { + c := &ProjectsLocationsRepositoriesWorkspacesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsRepositoriesWorkspacesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsRepositoriesWorkspacesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsRepositoriesWorkspacesInstallNpmPackagesCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesWorkspacesInstallNpmPackagesCall { +func (c *ProjectsLocationsRepositoriesWorkspacesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesWorkspacesGetIamPolicyCall { 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 *ProjectsLocationsRepositoriesWorkspacesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesWorkspacesGetIamPolicyCall { + 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 *ProjectsLocationsRepositoriesWorkspacesInstallNpmPackagesCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesWorkspacesInstallNpmPackagesCall { +func (c *ProjectsLocationsRepositoriesWorkspacesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesWorkspacesGetIamPolicyCall { 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 *ProjectsLocationsRepositoriesWorkspacesInstallNpmPackagesCall) Header() http.Header { +func (c *ProjectsLocationsRepositoriesWorkspacesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRepositoriesWorkspacesInstallNpmPackagesCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRepositoriesWorkspacesGetIamPolicyCall) 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.installnpmpackagesrequest) + 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, "v1beta1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataform.projects.locations.repositories.workspaces.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsRepositoriesWorkspacesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/workspaces/{workspacesId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "dataform.projects.locations.repositories.workspaces.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/workspaces/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataform.projects.locations.repositories.workspaces.installNpmPackages": + +type ProjectsLocationsRepositoriesWorkspacesInstallNpmPackagesCall struct { + s *Service + workspace string + installnpmpackagesrequest *InstallNpmPackagesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// InstallNpmPackages: Installs dependency NPM packages (inside a +// Workspace). +// +// - workspace: The workspace's name. +func (r *ProjectsLocationsRepositoriesWorkspacesService) InstallNpmPackages(workspace string, installnpmpackagesrequest *InstallNpmPackagesRequest) *ProjectsLocationsRepositoriesWorkspacesInstallNpmPackagesCall { + c := &ProjectsLocationsRepositoriesWorkspacesInstallNpmPackagesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.workspace = workspace + c.installnpmpackagesrequest = installnpmpackagesrequest + 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 *ProjectsLocationsRepositoriesWorkspacesInstallNpmPackagesCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesWorkspacesInstallNpmPackagesCall { + 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 *ProjectsLocationsRepositoriesWorkspacesInstallNpmPackagesCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesWorkspacesInstallNpmPackagesCall { + 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 *ProjectsLocationsRepositoriesWorkspacesInstallNpmPackagesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesWorkspacesInstallNpmPackagesCall) 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.installnpmpackagesrequest) if err != nil { return nil, err } @@ -10161,6 +11149,303 @@ func (c *ProjectsLocationsRepositoriesWorkspacesResetCall) Do(opts ...googleapi. } +// method id "dataform.projects.locations.repositories.workspaces.setIamPolicy": + +type ProjectsLocationsRepositoriesWorkspacesSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsRepositoriesWorkspacesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsRepositoriesWorkspacesSetIamPolicyCall { + c := &ProjectsLocationsRepositoriesWorkspacesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRepositoriesWorkspacesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesWorkspacesSetIamPolicyCall { + 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 *ProjectsLocationsRepositoriesWorkspacesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesWorkspacesSetIamPolicyCall { + 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 *ProjectsLocationsRepositoriesWorkspacesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesWorkspacesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataform.projects.locations.repositories.workspaces.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsRepositoriesWorkspacesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/workspaces/{workspacesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "dataform.projects.locations.repositories.workspaces.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/workspaces/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataform.projects.locations.repositories.workspaces.testIamPermissions": + +type ProjectsLocationsRepositoriesWorkspacesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsRepositoriesWorkspacesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsRepositoriesWorkspacesTestIamPermissionsCall { + c := &ProjectsLocationsRepositoriesWorkspacesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRepositoriesWorkspacesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesWorkspacesTestIamPermissionsCall { + 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 *ProjectsLocationsRepositoriesWorkspacesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesWorkspacesTestIamPermissionsCall { + 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 *ProjectsLocationsRepositoriesWorkspacesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesWorkspacesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataform.projects.locations.repositories.workspaces.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRepositoriesWorkspacesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/workspaces/{workspacesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "dataform.projects.locations.repositories.workspaces.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/workspaces/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "dataform.projects.locations.repositories.workspaces.writeFile": type ProjectsLocationsRepositoriesWorkspacesWriteFileCall struct { diff --git a/datamigration/v1/datamigration-api.json b/datamigration/v1/datamigration-api.json index 860279b0895..7fc66930108 100644 --- a/datamigration/v1/datamigration-api.json +++ b/datamigration/v1/datamigration-api.json @@ -1831,7 +1831,7 @@ } } }, - "revision": "20230215", + "revision": "20230222", "rootUrl": "https://datamigration.googleapis.com/", "schemas": { "AlloyDbConnectionProfile": { @@ -1889,6 +1889,21 @@ }, "type": "object" }, + "ApplyJobDetails": { + "description": "Details regarding an Apply background job.", + "id": "ApplyJobDetails", + "properties": { + "connectionProfile": { + "description": "The connection profile which was used for the apply job.", + "type": "string" + }, + "filter": { + "description": "AIP-160 based filter used to specify the entities to apply", + "type": "string" + } + }, + "type": "object" + }, "AuditConfig": { "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com` from DATA_WRITE logging.", "id": "AuditConfig", @@ -1941,6 +1956,10 @@ "description": "Execution log of a background job.", "id": "BackgroundJobLogEntry", "properties": { + "applyJobDetails": { + "$ref": "ApplyJobDetails", + "description": "Apply job details." + }, "completionComment": { "description": "Job completion comment, such as how many entities were seeded, how many warnings were found during conversion, and similar information.", "type": "string" @@ -1959,6 +1978,10 @@ ], "type": "string" }, + "convertJobDetails": { + "$ref": "ConvertJobDetails", + "description": "Convert job details." + }, "finishTime": { "description": "The timestamp when the background job was finished.", "format": "google-datetime", @@ -2544,6 +2567,17 @@ }, "type": "object" }, + "ConvertJobDetails": { + "description": "Details regarding a Convert background job.", + "id": "ConvertJobDetails", + "properties": { + "filter": { + "description": "AIP-160 based filter used to specify the entities to convert", + "type": "string" + } + }, + "type": "object" + }, "DatabaseEngineInfo": { "description": "The type and version of a source or destination database.", "id": "DatabaseEngineInfo", diff --git a/datamigration/v1/datamigration-gen.go b/datamigration/v1/datamigration-gen.go index 89a430bba3c..8109677e4c3 100644 --- a/datamigration/v1/datamigration-gen.go +++ b/datamigration/v1/datamigration-gen.go @@ -342,6 +342,39 @@ func (s *ApplyConversionWorkspaceRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ApplyJobDetails: Details regarding an Apply background job. +type ApplyJobDetails struct { + // ConnectionProfile: The connection profile which was used for the + // apply job. + ConnectionProfile string `json:"connectionProfile,omitempty"` + + // Filter: AIP-160 based filter used to specify the entities to apply + Filter string `json:"filter,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConnectionProfile") + // 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. "ConnectionProfile") 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 *ApplyJobDetails) MarshalJSON() ([]byte, error) { + type NoMethod ApplyJobDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AuditConfig: Specifies the audit configuration for a service. The // configuration determines which permission types are logged, and what // identities, if any, are exempted from logging. An AuditConfig must @@ -441,6 +474,9 @@ func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { // BackgroundJobLogEntry: Execution log of a background job. type BackgroundJobLogEntry struct { + // ApplyJobDetails: Apply job details. + ApplyJobDetails *ApplyJobDetails `json:"applyJobDetails,omitempty"` + // CompletionComment: Job completion comment, such as how many entities // were seeded, how many warnings were found during conversion, and // similar information. @@ -456,6 +492,9 @@ type BackgroundJobLogEntry struct { // "FAILED" - Error. CompletionState string `json:"completionState,omitempty"` + // ConvertJobDetails: Convert job details. + ConvertJobDetails *ConvertJobDetails `json:"convertJobDetails,omitempty"` + // FinishTime: The timestamp when the background job was finished. FinishTime string `json:"finishTime,omitempty"` @@ -490,15 +529,15 @@ type BackgroundJobLogEntry struct { // StartTime: The timestamp when the background job was started. StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "CompletionComment") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ApplyJobDetails") 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. "CompletionComment") to + // NullFields is a list of field names (e.g. "ApplyJobDetails") 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 @@ -1192,6 +1231,34 @@ func (s *ConvertConversionWorkspaceRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ConvertJobDetails: Details regarding a Convert background job. +type ConvertJobDetails struct { + // Filter: AIP-160 based filter used to specify the entities to convert + Filter string `json:"filter,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Filter") 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. "Filter") 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 *ConvertJobDetails) MarshalJSON() ([]byte, error) { + type NoMethod ConvertJobDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DatabaseEngineInfo: The type and version of a source or destination // database. type DatabaseEngineInfo struct { diff --git a/drivelabels/v2/drivelabels-api.json b/drivelabels/v2/drivelabels-api.json index 8b76cdc5bfb..13d08695dbf 100644 --- a/drivelabels/v2/drivelabels-api.json +++ b/drivelabels/v2/drivelabels-api.json @@ -98,6 +98,139 @@ "resources": { "labels": { "methods": { + "create": { + "description": "Creates a new Label.", + "flatPath": "v2/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": "v2/labels", + "request": { + "$ref": "GoogleAppsDriveLabelsV2Label" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2Label" + } + }, + "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": "v2/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": "v2/{+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": "v2/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": "v2/{+name}:delta", + "request": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse" + } + }, + "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": "v2/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": "v2/{+name}:disable", + "request": { + "$ref": "GoogleAppsDriveLabelsV2DisableLabelRequest" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2Label" + } + }, + "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": "v2/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": "v2/{+name}:enable", + "request": { + "$ref": "GoogleAppsDriveLabelsV2EnableLabelRequest" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2Label" + } + }, "get": { "description": "Get a label by its resource name. Resource name may be any of: * `labels/{id}` - See `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": "v2/labels/{labelsId}", @@ -143,117 +276,1273 @@ "$ref": "GoogleAppsDriveLabelsV2Label" } }, - "list": { - "description": "List labels.", - "flatPath": "v2/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 are 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 can pin this label in shared drives they manage and add new appliers to the label.", - "Editors can make any update including deleting the label which also deletes the 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 are returned. Disabled labels are included. Returned label resource names reference the published revision (`labels/{id}/{revision_id}`). * When `false`, the current label revisions are returned, which might not be published. Returned label resource names don't 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 are 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" - } + "list": { + "description": "List labels.", + "flatPath": "v2/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 are 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 can pin this label in shared drives they manage and add new appliers to the label.", + "Editors can make any update including deleting the label which also deletes the 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 are returned. Disabled labels are included. Returned label resource names reference the published revision (`labels/{id}/{revision_id}`). * When `false`, the current label revisions are returned, which might not be published. Returned label resource names don't 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 are 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": "v2/labels", + "response": { + "$ref": "GoogleAppsDriveLabelsV2ListLabelsResponse" + } + }, + "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": "v2/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": "v2/{+name}:publish", + "request": { + "$ref": "GoogleAppsDriveLabelsV2PublishLabelRequest" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2Label" + } + }, + "updateLabelCopyMode": { + "description": "Updates a Label's `CopyMode`. Changes to this policy are not revisioned, do not require publishing, and take effect immediately.", + "flatPath": "v2/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": "v2/{+name}:updateLabelCopyMode", + "request": { + "$ref": "GoogleAppsDriveLabelsV2UpdateLabelCopyModeRequest" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2Label" + } + }, + "updatePermissions": { + "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": "v2/labels/{labelsId}/permissions", + "httpMethod": "PATCH", + "id": "drivelabels.labels.updatePermissions", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent 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" + } + }, + "path": "v2/{+parent}/permissions", + "request": { + "$ref": "GoogleAppsDriveLabelsV2LabelPermission" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2LabelPermission" + } + } + }, + "resources": { + "locks": { + "methods": { + "list": { + "description": "Lists the LabelLocks on a Label.", + "flatPath": "v2/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": "v2/{+parent}/locks", + "response": { + "$ref": "GoogleAppsDriveLabelsV2ListLabelLocksResponse" + } + } + } + }, + "permissions": { + "methods": { + "batchDelete": { + "description": "Deletes Label permissions. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + "flatPath": "v2/labels/{labelsId}/permissions:batchDelete", + "httpMethod": "POST", + "id": "drivelabels.labels.permissions.batchDelete", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent Label resource name shared by all permissions being deleted. 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": "v2/{+parent}/permissions:batchDelete", + "request": { + "$ref": "GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest" + }, + "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": "v2/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": "v2/{+parent}/permissions:batchUpdate", + "request": { + "$ref": "GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse" + } + }, + "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": "v2/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": "v2/{+parent}/permissions", + "request": { + "$ref": "GoogleAppsDriveLabelsV2LabelPermission" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2LabelPermission" + } + }, + "delete": { + "description": "Deletes a Label's permission. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + "flatPath": "v2/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": "v2/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + } + }, + "list": { + "description": "Lists a Label's permissions.", + "flatPath": "v2/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": "v2/{+parent}/permissions", + "response": { + "$ref": "GoogleAppsDriveLabelsV2ListLabelPermissionsResponse" + } + } + } + }, + "revisions": { + "methods": { + "updatePermissions": { + "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": "v2/labels/{labelsId}/revisions/{revisionsId}/permissions", + "httpMethod": "PATCH", + "id": "drivelabels.labels.revisions.updatePermissions", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent Label resource name.", + "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": "v2/{+parent}/permissions", + "request": { + "$ref": "GoogleAppsDriveLabelsV2LabelPermission" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2LabelPermission" + } + } + }, + "resources": { + "locks": { + "methods": { + "list": { + "description": "Lists the LabelLocks on a Label.", + "flatPath": "v2/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": "v2/{+parent}/locks", + "response": { + "$ref": "GoogleAppsDriveLabelsV2ListLabelLocksResponse" + } + } + } + }, + "permissions": { + "methods": { + "batchDelete": { + "description": "Deletes Label permissions. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + "flatPath": "v2/labels/{labelsId}/revisions/{revisionsId}/permissions:batchDelete", + "httpMethod": "POST", + "id": "drivelabels.labels.revisions.permissions.batchDelete", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent Label resource name shared by all permissions being deleted. 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": "v2/{+parent}/permissions:batchDelete", + "request": { + "$ref": "GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest" + }, + "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": "v2/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": "v2/{+parent}/permissions:batchUpdate", + "request": { + "$ref": "GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse" + } + }, + "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": "v2/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": "v2/{+parent}/permissions", + "request": { + "$ref": "GoogleAppsDriveLabelsV2LabelPermission" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2LabelPermission" + } + }, + "delete": { + "description": "Deletes a Label's permission. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + "flatPath": "v2/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": "v2/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + } + }, + "list": { + "description": "Lists a Label's permissions.", + "flatPath": "v2/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": "v2/{+parent}/permissions", + "response": { + "$ref": "GoogleAppsDriveLabelsV2ListLabelPermissionsResponse" + } + } + } + } + } + } + } + }, + "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": "v2/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": "v2/limits/label", + "response": { + "$ref": "GoogleAppsDriveLabelsV2LabelLimits" + } + } + } + }, + "users": { + "methods": { + "getCapabilities": { + "description": "Gets the user capabilities.", + "flatPath": "v2/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": "v2/{+name}", + "response": { + "$ref": "GoogleAppsDriveLabelsV2UserCapabilities" + } + } + } + } + }, + "revision": "20230228", + "rootUrl": "https://drivelabels.googleapis.com/", + "schemas": { + "GoogleAppsDriveLabelsV2BadgeColors": { + "description": "The color derived from BadgeConfig and changed to the closest recommended supported color.", + "id": "GoogleAppsDriveLabelsV2BadgeColors", + "properties": { + "backgroundColor": { + "$ref": "GoogleTypeColor", + "description": "Output only. Badge background that pairs with the foreground.", + "readOnly": true + }, + "foregroundColor": { + "$ref": "GoogleTypeColor", + "description": "Output only. Badge foreground that 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" + }, + "GoogleAppsDriveLabelsV2BadgeConfig": { + "description": "Badge status of the label.", + "id": "GoogleAppsDriveLabelsV2BadgeConfig", + "properties": { + "color": { + "$ref": "GoogleTypeColor", + "description": "The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color." + }, + "priorityOverride": { + "description": "Override the default global priority of this badge. When set to 0, the default priority heuristic is used.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest": { + "description": "Deletes one of more Label Permissions.", + "id": "GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest", + "properties": { + "requests": { + "description": "Required. The request message specifying the resources to update.", + "items": { + "$ref": "GoogleAppsDriveLabelsV2DeleteLabelPermissionRequest" + }, + "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" + }, + "GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest": { + "description": "Updates one or more Label Permissions.", + "id": "GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest", + "properties": { + "requests": { + "description": "Required. The request message specifying the resources to update.", + "items": { + "$ref": "GoogleAppsDriveLabelsV2UpdateLabelPermissionRequest" + }, + "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" + }, + "GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse": { + "description": "Response for updating one or more Label Permissions.", + "id": "GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse", + "properties": { + "permissions": { + "description": "Required. Permissions updated.", + "items": { + "$ref": "GoogleAppsDriveLabelsV2LabelPermission" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2DateLimits": { + "description": "Limits for date Field type.", + "id": "GoogleAppsDriveLabelsV2DateLimits", + "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" + }, + "GoogleAppsDriveLabelsV2DeleteLabelPermissionRequest": { + "description": "Deletes a Label Permission. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + "id": "GoogleAppsDriveLabelsV2DeleteLabelPermissionRequest", + "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" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest": { + "description": "The set of requests for updating aspects of a Label. If any request is not valid, no requests will be applied.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest", + "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": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestRequest" + }, + "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": "GoogleAppsDriveLabelsV2WriteControl", + "description": "Provides control over how write requests are executed." + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateFieldRequest": { + "description": "Request to create a Field within a Label.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateFieldRequest", + "properties": { + "field": { + "$ref": "GoogleAppsDriveLabelsV2Field", + "description": "Required. Field to create." + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateSelectionChoiceRequest": { + "description": "Request to create a Selection Choice.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateSelectionChoiceRequest", + "properties": { + "choice": { + "$ref": "GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice", + "description": "Required. The Choice to create." + }, + "fieldId": { + "description": "Required. The Selection Field in which a Choice will be created.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteFieldRequest": { + "description": "Request to delete the Field.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteFieldRequest", + "properties": { + "id": { + "description": "Required. ID of the Field to delete.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteSelectionChoiceRequest": { + "description": "Request to delete a Choice.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteSelectionChoiceRequest", + "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" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableFieldRequest": { + "description": "Request to disable the Field.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableFieldRequest", + "properties": { + "disabledPolicy": { + "$ref": "GoogleAppsDriveLabelsV2LifecycleDisabledPolicy", + "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" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableSelectionChoiceRequest": { + "description": "Request to disable a Choice.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableSelectionChoiceRequest", + "properties": { + "disabledPolicy": { + "$ref": "GoogleAppsDriveLabelsV2LifecycleDisabledPolicy", + "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" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableFieldRequest": { + "description": "Request to enable the Field.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableFieldRequest", + "properties": { + "id": { + "description": "Required. ID of the Field to enable.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableSelectionChoiceRequest": { + "description": "Request to enable a Choice.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableSelectionChoiceRequest", + "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" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestRequest": { + "description": "A single kind of update to apply to a Label.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestRequest", + "properties": { + "createField": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateFieldRequest", + "description": "Creates a new Field." + }, + "createSelectionChoice": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateSelectionChoiceRequest", + "description": "Creates Choice within a Selection field." + }, + "deleteField": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteFieldRequest", + "description": "Deletes a Field from the label." + }, + "deleteSelectionChoice": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteSelectionChoiceRequest", + "description": "Delete a Choice within a Selection Field." + }, + "disableField": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableFieldRequest", + "description": "Disables the Field." + }, + "disableSelectionChoice": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableSelectionChoiceRequest", + "description": "Disable a Choice within a Selection Field." + }, + "enableField": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableFieldRequest", + "description": "Enables the Field." + }, + "enableSelectionChoice": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableSelectionChoiceRequest", + "description": "Enable a Choice within a Selection Field." + }, + "updateField": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldPropertiesRequest", + "description": "Updates basic properties of a Field." + }, + "updateFieldType": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldTypeRequest", + "description": "Update Field type and/or type options." + }, + "updateLabel": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateLabelPropertiesRequest", + "description": "Updates the Label properties." + }, + "updateSelectionChoiceProperties": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateSelectionChoicePropertiesRequest", + "description": "Update a Choice properties within a Selection Field." + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldPropertiesRequest": { + "description": "Request to update Field properties.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldPropertiesRequest", + "properties": { + "id": { + "description": "Required. The Field to update.", + "type": "string" + }, + "properties": { + "$ref": "GoogleAppsDriveLabelsV2FieldProperties", + "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" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldTypeRequest": { + "description": "Request to change the type of a Field.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldTypeRequest", + "properties": { + "dateOptions": { + "$ref": "GoogleAppsDriveLabelsV2FieldDateOptions", + "description": "Update field to Date." + }, + "id": { + "description": "Required. The Field to update.", + "type": "string" + }, + "integerOptions": { + "$ref": "GoogleAppsDriveLabelsV2FieldIntegerOptions", + "description": "Update field to Integer." + }, + "longTextOptions": { + "$ref": "GoogleAppsDriveLabelsV2FieldLongTextOptions", + "description": "Update field to Long Text." + }, + "selectionOptions": { + "$ref": "GoogleAppsDriveLabelsV2FieldSelectionOptions", + "description": "Update field to Selection." + }, + "textOptions": { + "$ref": "GoogleAppsDriveLabelsV2FieldTextOptions", + "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": "GoogleAppsDriveLabelsV2FieldUserOptions", + "description": "Update field to User." + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateLabelPropertiesRequest": { + "description": "Updates basic properties of a Label.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateLabelPropertiesRequest", + "properties": { + "properties": { + "$ref": "GoogleAppsDriveLabelsV2LabelProperties", + "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" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateSelectionChoicePropertiesRequest": { + "description": "Request to update a Choice properties.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateSelectionChoicePropertiesRequest", + "properties": { + "fieldId": { + "description": "Required. The Selection Field to update.", + "type": "string" + }, + "id": { + "description": "Required. The Choice to update.", + "type": "string" + }, + "properties": { + "$ref": "GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties", + "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" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse": { + "description": "Response for Label update.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse", + "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": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseResponse" }, - "path": "v2/labels", - "response": { - "$ref": "GoogleAppsDriveLabelsV2ListLabelsResponse" - } + "type": "array" + }, + "updatedLabel": { + "$ref": "GoogleAppsDriveLabelsV2Label", + "description": "The label after updates were applied. This is only set if [BatchUpdateLabelResponse2.include_label_in_response] is `true` and there were no errors." } - } - } - }, - "revision": "20220802", - "rootUrl": "https://drivelabels.googleapis.com/", - "schemas": { - "GoogleAppsDriveLabelsV2BadgeColors": { - "description": "The color derived from BadgeConfig and changed to the closest recommended supported color.", - "id": "GoogleAppsDriveLabelsV2BadgeColors", + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseCreateFieldResponse": { + "description": "Response following Field create.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseCreateFieldResponse", "properties": { - "backgroundColor": { - "$ref": "GoogleTypeColor", - "description": "Output only. Badge background that pairs with the foreground.", - "readOnly": true + "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" }, - "foregroundColor": { - "$ref": "GoogleTypeColor", - "description": "Output only. Badge foreground that pairs with the background.", - "readOnly": true + "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" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseCreateSelectionChoiceResponse": { + "description": "Response following Selection Choice create.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseCreateSelectionChoiceResponse", + "properties": { + "fieldId": { + "description": "The server-generated id of the field.", + "type": "string" }, - "soloColor": { - "$ref": "GoogleTypeColor", - "description": "Output only. Color that can be used for text without a background.", - "readOnly": true + "id": { + "description": "The server-generated ID of the created choice within the Field", + "type": "string" } }, "type": "object" }, - "GoogleAppsDriveLabelsV2BadgeConfig": { - "description": "Badge status of the label.", - "id": "GoogleAppsDriveLabelsV2BadgeConfig", + "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDeleteFieldResponse": { + "description": "Response following Field delete.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDeleteFieldResponse", + "properties": {}, + "type": "object" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDeleteSelectionChoiceResponse": { + "description": "Response following Choice delete.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDeleteSelectionChoiceResponse", + "properties": {}, + "type": "object" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDisableFieldResponse": { + "description": "Response following Field disable.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDisableFieldResponse", + "properties": {}, + "type": "object" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDisableSelectionChoiceResponse": { + "description": "Response following Choice disable.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDisableSelectionChoiceResponse", + "properties": {}, + "type": "object" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseEnableFieldResponse": { + "description": "Response following Field enable.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseEnableFieldResponse", + "properties": {}, + "type": "object" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseEnableSelectionChoiceResponse": { + "description": "Response following Choice enable.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseEnableSelectionChoiceResponse", + "properties": {}, + "type": "object" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseResponse": { + "description": "A single response from an update.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseResponse", "properties": { - "color": { - "$ref": "GoogleTypeColor", - "description": "The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color." + "createField": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseCreateFieldResponse", + "description": "Creates a new Field." }, - "priorityOverride": { - "description": "Override the default global priority of this badge. When set to 0, the default priority heuristic is used.", - "format": "int64", + "createSelectionChoice": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseCreateSelectionChoiceResponse", + "description": "Creates a new selection list option to add to a Selection Field." + }, + "deleteField": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDeleteFieldResponse", + "description": "Deletes a Field from the label." + }, + "deleteSelectionChoice": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDeleteSelectionChoiceResponse", + "description": "Deletes a Choice from a Selection Field." + }, + "disableField": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDisableFieldResponse", + "description": "Disables Field." + }, + "disableSelectionChoice": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDisableSelectionChoiceResponse", + "description": "Disables a Choice within a Selection Field." + }, + "enableField": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseEnableFieldResponse", + "description": "Enables Field." + }, + "enableSelectionChoice": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseEnableSelectionChoiceResponse", + "description": "Enables a Choice within a Selection Field." + }, + "updateField": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateFieldPropertiesResponse", + "description": "Updates basic properties of a Field." + }, + "updateFieldType": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateFieldTypeResponse", + "description": "Update Field type and/or type options." + }, + "updateLabel": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateLabelPropertiesResponse", + "description": "Updated basic properties of a Label." + }, + "updateSelectionChoiceProperties": { + "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateSelectionChoicePropertiesResponse", + "description": "Updates a Choice within a Selection Field." + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateFieldPropertiesResponse": { + "description": "Response following update to Field properties.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateFieldPropertiesResponse", + "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" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateFieldTypeResponse": { + "description": "Response following update to Field type.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateFieldTypeResponse", + "properties": {}, + "type": "object" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateLabelPropertiesResponse": { + "description": "Response following update to Label properties.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateLabelPropertiesResponse", + "properties": {}, + "type": "object" + }, + "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateSelectionChoicePropertiesResponse": { + "description": "Response following update to Selection Choice properties.", + "id": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateSelectionChoicePropertiesResponse", + "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" + }, + "GoogleAppsDriveLabelsV2DisableLabelRequest": { + "description": "Request to deprecate a published Label.", + "id": "GoogleAppsDriveLabelsV2DisableLabelRequest", + "properties": { + "disabledPolicy": { + "$ref": "GoogleAppsDriveLabelsV2LifecycleDisabledPolicy", + "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": "GoogleAppsDriveLabelsV2WriteControl", + "description": "Provides control over how write requests are executed. Defaults to unset, which means last write wins." + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2EnableLabelRequest": { + "description": "Request to enable a label.", + "id": "GoogleAppsDriveLabelsV2EnableLabelRequest", + "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": "GoogleAppsDriveLabelsV2WriteControl", + "description": "Provides control over how write requests are executed. Defaults to unset, which means last write wins." } }, "type": "object" @@ -459,6 +1748,52 @@ }, "type": "object" }, + "GoogleAppsDriveLabelsV2FieldLimits": { + "description": "Field constants governing the structure of a Field; such as, the maximum title length, minimum and maximum field values or length, etc.", + "id": "GoogleAppsDriveLabelsV2FieldLimits", + "properties": { + "dateLimits": { + "$ref": "GoogleAppsDriveLabelsV2DateLimits", + "description": "Date Field limits." + }, + "integerLimits": { + "$ref": "GoogleAppsDriveLabelsV2IntegerLimits", + "description": "Integer Field limits." + }, + "longTextLimits": { + "$ref": "GoogleAppsDriveLabelsV2LongTextLimits", + "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": "GoogleAppsDriveLabelsV2SelectionLimits", + "description": "Selection Field limits." + }, + "textLimits": { + "$ref": "GoogleAppsDriveLabelsV2TextLimits", + "description": "The relevant limits for the specified Field.Type. Text Field limits." + }, + "userLimits": { + "$ref": "GoogleAppsDriveLabelsV2UserLimits", + "description": "User Field limits." + } + }, + "type": "object" + }, "GoogleAppsDriveLabelsV2FieldListOptions": { "description": "Options for a multi-valued variant of an associated field type.", "id": "GoogleAppsDriveLabelsV2FieldListOptions", @@ -471,6 +1806,25 @@ }, "type": "object" }, + "GoogleAppsDriveLabelsV2FieldLongTextOptions": { + "description": "Options the Long Text field type.", + "id": "GoogleAppsDriveLabelsV2FieldLongTextOptions", + "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" + }, "GoogleAppsDriveLabelsV2FieldProperties": { "description": "The basic properties of the field.", "id": "GoogleAppsDriveLabelsV2FieldProperties", @@ -742,6 +2096,23 @@ }, "type": "object" }, + "GoogleAppsDriveLabelsV2IntegerLimits": { + "description": "Limits for integer Field type.", + "id": "GoogleAppsDriveLabelsV2IntegerLimits", + "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" + }, "GoogleAppsDriveLabelsV2Label": { "description": "A label defines a taxonomy that can be applied to Drive items in order to organize and search across items. Labels can be simple strings, or can contain fields that describe additional metadata that can be further used to organize and search Drive items.", "id": "GoogleAppsDriveLabelsV2Label", @@ -933,6 +2304,159 @@ }, "type": "object" }, + "GoogleAppsDriveLabelsV2LabelLimits": { + "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": "GoogleAppsDriveLabelsV2LabelLimits", + "properties": { + "fieldLimits": { + "$ref": "GoogleAppsDriveLabelsV2FieldLimits", + "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" + }, + "GoogleAppsDriveLabelsV2LabelLock": { + "description": "A Lock that can be applied to a Label, Field, or Choice.", + "id": "GoogleAppsDriveLabelsV2LabelLock", + "properties": { + "capabilities": { + "$ref": "GoogleAppsDriveLabelsV2LabelLockCapabilities", + "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": "GoogleAppsDriveLabelsV2UserInfo", + "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" + }, + "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" + }, + "GoogleAppsDriveLabelsV2LabelLockCapabilities": { + "description": "A description of a user's capabilities on a LabelLock.", + "id": "GoogleAppsDriveLabelsV2LabelLockCapabilities", + "properties": { + "canViewPolicy": { + "description": "True if the user is authorized to view the policy.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2LabelPermission": { + "description": "The permission that applies to a principal (user, group, audience) on a label.", + "id": "GoogleAppsDriveLabelsV2LabelPermission", + "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 can pin this label in shared drives they manage and add new appliers to the label.", + "Editors can make any update including deleting the label which also deletes the associated Drive item metadata. Implies `APPLIER`." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleAppsDriveLabelsV2LabelProperties": { "description": "Basic properties of the label.", "id": "GoogleAppsDriveLabelsV2LabelProperties", @@ -1021,6 +2545,42 @@ }, "type": "object" }, + "GoogleAppsDriveLabelsV2ListLabelLocksResponse": { + "description": "The response to a ListLabelLocksRequest.", + "id": "GoogleAppsDriveLabelsV2ListLabelLocksResponse", + "properties": { + "labelLocks": { + "description": "LabelLocks.", + "items": { + "$ref": "GoogleAppsDriveLabelsV2LabelLock" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The token of the next page in the response.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2ListLabelPermissionsResponse": { + "description": "Response for listing the permissions on a Label.", + "id": "GoogleAppsDriveLabelsV2ListLabelPermissionsResponse", + "properties": { + "labelPermissions": { + "description": "Label permissions.", + "items": { + "$ref": "GoogleAppsDriveLabelsV2LabelPermission" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The token of the next page in the response.", + "type": "string" + } + }, + "type": "object" + }, "GoogleAppsDriveLabelsV2ListLabelsResponse": { "description": "Response for listing Labels.", "id": "GoogleAppsDriveLabelsV2ListLabelsResponse", @@ -1039,6 +2599,18 @@ }, "type": "object" }, + "GoogleAppsDriveLabelsV2ListLimits": { + "description": "Limits for list-variant of a Field type.", + "id": "GoogleAppsDriveLabelsV2ListLimits", + "properties": { + "maxEntries": { + "description": "Maximum number of values allowed for the Field type.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleAppsDriveLabelsV2LockStatus": { "description": "Contains information about whether a label component should be considered locked.", "id": "GoogleAppsDriveLabelsV2LockStatus", @@ -1051,6 +2623,184 @@ }, "type": "object" }, + "GoogleAppsDriveLabelsV2LongTextLimits": { + "description": "Limits for long text Field type.", + "id": "GoogleAppsDriveLabelsV2LongTextLimits", + "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" + }, + "GoogleAppsDriveLabelsV2PublishLabelRequest": { + "description": "Request to publish a label.", + "id": "GoogleAppsDriveLabelsV2PublishLabelRequest", + "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": "GoogleAppsDriveLabelsV2WriteControl", + "description": "Provides control over how write requests are executed. Defaults to unset, which means last write wins." + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2SelectionLimits": { + "description": "Limits for selection Field type.", + "id": "GoogleAppsDriveLabelsV2SelectionLimits", + "properties": { + "listLimits": { + "$ref": "GoogleAppsDriveLabelsV2ListLimits", + "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" + }, + "GoogleAppsDriveLabelsV2TextLimits": { + "description": "Limits for text Field type.", + "id": "GoogleAppsDriveLabelsV2TextLimits", + "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" + }, + "GoogleAppsDriveLabelsV2UpdateLabelCopyModeRequest": { + "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": "GoogleAppsDriveLabelsV2UpdateLabelCopyModeRequest", + "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 are not copied by default when the Drive item it's applied to is copied.", + "The applied label and field values are always copied when the Drive item it's applied to is copied. Only admins can use this mode.", + "The applied label and field values are copied 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" + }, + "GoogleAppsDriveLabelsV2UpdateLabelPermissionRequest": { + "description": "Updates a Label Permission. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + "id": "GoogleAppsDriveLabelsV2UpdateLabelPermissionRequest", + "properties": { + "labelPermission": { + "$ref": "GoogleAppsDriveLabelsV2LabelPermission", + "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" + }, + "GoogleAppsDriveLabelsV2UserCapabilities": { + "description": "The capabilities of a user.", + "id": "GoogleAppsDriveLabelsV2UserCapabilities", + "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" + }, "GoogleAppsDriveLabelsV2UserInfo": { "description": "Information about a user.", "id": "GoogleAppsDriveLabelsV2UserInfo", @@ -1062,6 +2812,34 @@ }, "type": "object" }, + "GoogleAppsDriveLabelsV2UserLimits": { + "description": "Limits for Field.Type.USER.", + "id": "GoogleAppsDriveLabelsV2UserLimits", + "properties": { + "listLimits": { + "$ref": "GoogleAppsDriveLabelsV2ListLimits", + "description": "Limits for list-variant of a Field type." + } + }, + "type": "object" + }, + "GoogleAppsDriveLabelsV2WriteControl": { + "description": "Provides control over how write requests are executed. When not specified, the last write wins.", + "id": "GoogleAppsDriveLabelsV2WriteControl", + "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", diff --git a/drivelabels/v2/drivelabels-gen.go b/drivelabels/v2/drivelabels-gen.go index 09473e8c83f..5ddff0b4348 100644 --- a/drivelabels/v2/drivelabels-gen.go +++ b/drivelabels/v2/drivelabels-gen.go @@ -107,6 +107,8 @@ func New(client *http.Client) (*Service, error) { } s := &Service{client: client, BasePath: basePath} s.Labels = NewLabelsService(s) + s.Limits = NewLimitsService(s) + s.Users = NewUsersService(s) return s, nil } @@ -116,6 +118,10 @@ type Service struct { UserAgent string // optional additional User-Agent fragment Labels *LabelsService + + Limits *LimitsService + + Users *UsersService } func (s *Service) userAgent() string { @@ -127,11 +133,89 @@ func (s *Service) userAgent() string { 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 } // GoogleAppsDriveLabelsV2BadgeColors: The color derived from @@ -208,117 +292,58 @@ func (s *GoogleAppsDriveLabelsV2BadgeConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2Field: Defines a field that 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 GoogleAppsDriveLabelsV2Field struct { - // AppliedCapabilities: Output only. The capabilities this user has on - // this field and its value when the label is applied on Drive items. - AppliedCapabilities *GoogleAppsDriveLabelsV2FieldAppliedCapabilities `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 *GoogleAppsDriveLabelsV2UserInfo `json:"creator,omitempty"` - - // DateOptions: Date field options. - DateOptions *GoogleAppsDriveLabelsV2FieldDateOptions `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 *GoogleAppsDriveLabelsV2UserInfo `json:"disabler,omitempty"` - - // DisplayHints: Output only. UI display hints for rendering a field. - DisplayHints *GoogleAppsDriveLabelsV2FieldDisplayHints `json:"displayHints,omitempty"` - - // Id: Output only. The key of a field, unique within a label or - // library. This value is autogenerated. Matches the regex: - // `([a-zA-Z0-9])+` - Id string `json:"id,omitempty"` - - // IntegerOptions: Integer field options. - IntegerOptions *GoogleAppsDriveLabelsV2FieldIntegerOptions `json:"integerOptions,omitempty"` - - // Lifecycle: Output only. The lifecycle of this field. - Lifecycle *GoogleAppsDriveLabelsV2Lifecycle `json:"lifecycle,omitempty"` - - // LockStatus: Output only. The LockStatus of this field. - LockStatus *GoogleAppsDriveLabelsV2LockStatus `json:"lockStatus,omitempty"` - - // Properties: The basic properties of the field. - Properties *GoogleAppsDriveLabelsV2FieldProperties `json:"properties,omitempty"` - - // Publisher: Output only. The user who published this field. This value - // has no meaning when the field is not published. - Publisher *GoogleAppsDriveLabelsV2UserInfo `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 *GoogleAppsDriveLabelsV2FieldSchemaCapabilities `json:"schemaCapabilities,omitempty"` - - // SelectionOptions: Selection field options. - SelectionOptions *GoogleAppsDriveLabelsV2FieldSelectionOptions `json:"selectionOptions,omitempty"` - - // TextOptions: Text field options. - TextOptions *GoogleAppsDriveLabelsV2FieldTextOptions `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 *GoogleAppsDriveLabelsV2UserInfo `json:"updater,omitempty"` - - // UserOptions: User field options. - UserOptions *GoogleAppsDriveLabelsV2FieldUserOptions `json:"userOptions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AppliedCapabilities") - // to unconditionally include in API requests. By default, fields with +// GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest: Deletes +// one of more Label Permissions. +type GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest struct { + // Requests: Required. The request message specifying the resources to + // update. + Requests []*GoogleAppsDriveLabelsV2DeleteLabelPermissionRequest `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. "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 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 *GoogleAppsDriveLabelsV2Field) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2Field +func (s *GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2FieldAppliedCapabilities: The capabilities -// related to this field on applied metadata. -type GoogleAppsDriveLabelsV2FieldAppliedCapabilities 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 +// GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest: Updates +// one or more Label Permissions. +type GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest struct { + // Requests: Required. The request message specifying the resources to + // update. + Requests []*GoogleAppsDriveLabelsV2UpdateLabelPermissionRequest `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 @@ -326,7 +351,7 @@ type GoogleAppsDriveLabelsV2FieldAppliedCapabilities struct { // 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 + // 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 @@ -335,36 +360,54 @@ type GoogleAppsDriveLabelsV2FieldAppliedCapabilities struct { NullFields []string `json:"-"` } -func (s *GoogleAppsDriveLabelsV2FieldAppliedCapabilities) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2FieldAppliedCapabilities +func (s *GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2FieldDateOptions: Options for the date field -// type. -type GoogleAppsDriveLabelsV2FieldDateOptions struct { - // DateFormat: Output only. ICU date format. - DateFormat string `json:"dateFormat,omitempty"` +// GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse: Response +// for updating one or more Label Permissions. +type GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse struct { + // Permissions: Required. Permissions updated. + Permissions []*GoogleAppsDriveLabelsV2LabelPermission `json:"permissions,omitempty"` - // DateFormatType: Localized date formatting option. Field values are - // rendered in this format according to their locale. - // - // Possible values: - // "DATE_FORMAT_UNSPECIFIED" - Date format unspecified. - // "LONG_DATE" - Includes full month name. For example, January 12, - // 1999 (MMMM d, y) - // "SHORT_DATE" - Short, numeric, representation. For example, - // 12/13/99 (M/d/yy) - DateFormatType string `json:"dateFormatType,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // MaxValue: Output only. Maximum valid value (year, month, day). + // 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 *GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2DateLimits: Limits for date Field type. +type GoogleAppsDriveLabelsV2DateLimits struct { + // MaxValue: Maximum value for the date Field type. MaxValue *GoogleTypeDate `json:"maxValue,omitempty"` - // MinValue: Output only. Minimum valid value (year, month, day). + // MinValue: Minimum value for the date Field type. MinValue *GoogleTypeDate `json:"minValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "DateFormat") to + // 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 @@ -372,7 +415,7 @@ type GoogleAppsDriveLabelsV2FieldDateOptions struct { // 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 + // 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 @@ -381,30 +424,25 @@ type GoogleAppsDriveLabelsV2FieldDateOptions struct { NullFields []string `json:"-"` } -func (s *GoogleAppsDriveLabelsV2FieldDateOptions) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2FieldDateOptions +func (s *GoogleAppsDriveLabelsV2DateLimits) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2DateLimits raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2FieldDisplayHints: UI display hints for -// rendering a field. -type GoogleAppsDriveLabelsV2FieldDisplayHints 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 when - // searching for Drive items. - HiddenInSearch bool `json:"hiddenInSearch,omitempty"` - - // Required: Whether the field should be shown as required in the UI. - Required bool `json:"required,omitempty"` +// GoogleAppsDriveLabelsV2DeleteLabelPermissionRequest: Deletes a Label +// Permission. Permissions affect the Label resource as a whole, are not +// revisioned, and do not require publishing. +type GoogleAppsDriveLabelsV2DeleteLabelPermissionRequest struct { + // Name: Required. Label Permission resource name. + Name string `json:"name,omitempty"` - // ShownInApply: This field should be shown in the apply menu when - // applying values to a Drive item. - ShownInApply bool `json:"shownInApply,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. "Disabled") to + // 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 @@ -412,8 +450,8 @@ type GoogleAppsDriveLabelsV2FieldDisplayHints struct { // 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 + // 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. @@ -421,22 +459,42 @@ type GoogleAppsDriveLabelsV2FieldDisplayHints struct { NullFields []string `json:"-"` } -func (s *GoogleAppsDriveLabelsV2FieldDisplayHints) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2FieldDisplayHints +func (s *GoogleAppsDriveLabelsV2DeleteLabelPermissionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2DeleteLabelPermissionRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2FieldIntegerOptions: Options for the Integer -// field type. -type GoogleAppsDriveLabelsV2FieldIntegerOptions struct { - // MaxValue: Output only. The maximum valid value for the integer field. - MaxValue int64 `json:"maxValue,omitempty,string"` +// GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest: The set of requests +// for updating aspects of a Label. If any request is not valid, no +// requests will be applied. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest 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 []*GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestRequest `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"` - // MinValue: Output only. The minimum valid value for the integer field. - MinValue int64 `json:"minValue,omitempty,string"` + // WriteControl: Provides control over how write requests are executed. + WriteControl *GoogleAppsDriveLabelsV2WriteControl `json:"writeControl,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxValue") to + // 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 @@ -444,28 +502,28 @@ type GoogleAppsDriveLabelsV2FieldIntegerOptions struct { // 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 + // 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 *GoogleAppsDriveLabelsV2FieldIntegerOptions) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2FieldIntegerOptions +func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2FieldListOptions: Options for a multi-valued -// variant of an associated field type. -type GoogleAppsDriveLabelsV2FieldListOptions struct { - // MaxEntries: Maximum number of entries permitted. - MaxEntries int64 `json:"maxEntries,omitempty"` +// GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateFieldRequest: +// Request to create a Field within a Label. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateFieldRequest struct { + // Field: Required. Field to create. + Field *GoogleAppsDriveLabelsV2Field `json:"field,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxEntries") to + // 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 @@ -473,8 +531,8 @@ type GoogleAppsDriveLabelsV2FieldListOptions struct { // 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 + // 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. @@ -482,28 +540,23 @@ type GoogleAppsDriveLabelsV2FieldListOptions struct { NullFields []string `json:"-"` } -func (s *GoogleAppsDriveLabelsV2FieldListOptions) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2FieldListOptions +func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateFieldRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateFieldRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2FieldProperties: The basic properties of the -// field. -type GoogleAppsDriveLabelsV2FieldProperties 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 before the - // indicated field. If empty, the field is placed at the end of the - // list. - InsertBeforeField string `json:"insertBeforeField,omitempty"` +// GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateSelectionChoiceReq +// uest: Request to create a Selection Choice. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateSelectionChoiceRequest struct { + // Choice: Required. The Choice to create. + Choice *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice `json:"choice,omitempty"` - // Required: Whether the field should be marked as required. - Required bool `json:"required,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. "DisplayName") to + // 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 @@ -511,40 +564,28 @@ type GoogleAppsDriveLabelsV2FieldProperties struct { // 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 + // 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 *GoogleAppsDriveLabelsV2FieldProperties) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2FieldProperties +func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateSelectionChoiceRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateSelectionChoiceRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2FieldSchemaCapabilities: The capabilities -// related to this field when editing the field. -type GoogleAppsDriveLabelsV2FieldSchemaCapabilities struct { - // CanDelete: Whether the user can delete this field. The user must have - // permission and the field must be deprecated. - CanDelete bool `json:"canDelete,omitempty"` - - // CanDisable: Whether the user can disable this field. The user must - // have permission 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 - // permission and this field must be disabled. - CanEnable bool `json:"canEnable,omitempty"` - - // CanUpdate: Whether the user can change this field. - CanUpdate bool `json:"canUpdate,omitempty"` +// GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteFieldRequest: +// Request to delete the Field. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteFieldRequest struct { + // Id: Required. ID of the Field to delete. + Id string `json:"id,omitempty"` - // ForceSendFields is a list of field names (e.g. "CanDelete") to + // 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 @@ -552,8 +593,8 @@ type GoogleAppsDriveLabelsV2FieldSchemaCapabilities struct { // 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 + // 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. @@ -561,24 +602,23 @@ type GoogleAppsDriveLabelsV2FieldSchemaCapabilities struct { NullFields []string `json:"-"` } -func (s *GoogleAppsDriveLabelsV2FieldSchemaCapabilities) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2FieldSchemaCapabilities +func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteFieldRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteFieldRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2FieldSelectionOptions: Options for the -// selection field type. -type GoogleAppsDriveLabelsV2FieldSelectionOptions struct { - // Choices: The options available for this selection field. The list - // order is consistent, and modified with `insert_before_choice`. - Choices []*GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice `json:"choices,omitempty"` +// GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteSelectionChoiceReq +// uest: Request to delete a Choice. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteSelectionChoiceRequest struct { + // FieldId: Required. The Selection Field from which a Choice will be + // deleted. + FieldId string `json:"fieldId,omitempty"` - // ListOptions: When specified, indicates this field supports a list of - // values. Once the field is published, this cannot be changed. - ListOptions *GoogleAppsDriveLabelsV2FieldListOptions `json:"listOptions,omitempty"` + // Id: Required. Choice to delete. + Id string `json:"id,omitempty"` - // ForceSendFields is a list of field names (e.g. "Choices") to + // 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 @@ -586,7 +626,7 @@ type GoogleAppsDriveLabelsV2FieldSelectionOptions struct { // 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 + // 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 @@ -595,76 +635,79 @@ type GoogleAppsDriveLabelsV2FieldSelectionOptions struct { NullFields []string `json:"-"` } -func (s *GoogleAppsDriveLabelsV2FieldSelectionOptions) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2FieldSelectionOptions +func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteSelectionChoiceRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteSelectionChoiceRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice: Selection field -// choice. -type GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice struct { - // AppliedCapabilities: Output only. The capabilities related to this - // choice on applied metadata. - AppliedCapabilities *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceAppliedCapabilities `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 *GoogleAppsDriveLabelsV2UserInfo `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 *GoogleAppsDriveLabelsV2UserInfo `json:"disabler,omitempty"` - - // DisplayHints: Output only. UI display hints for rendering a choice. - DisplayHints *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceDisplayHints `json:"displayHints,omitempty"` +// GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableFieldRequest: +// Request to disable the Field. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableFieldRequest struct { + // DisabledPolicy: Required. Field Disabled Policy. + DisabledPolicy *GoogleAppsDriveLabelsV2LifecycleDisabledPolicy `json:"disabledPolicy,omitempty"` - // Id: The unique value of the choice. This ID is autogenerated. Matches - // the regex: `([a-zA-Z0-9_])+`. + // Id: Required. Key of the Field to disable. Id string `json:"id,omitempty"` - // Lifecycle: Output only. Lifecycle of the choice. - Lifecycle *GoogleAppsDriveLabelsV2Lifecycle `json:"lifecycle,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"` - // LockStatus: Output only. The LockStatus of this choice. - LockStatus *GoogleAppsDriveLabelsV2LockStatus `json:"lockStatus,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:"-"` - // Properties: Basic properties of the choice. - Properties *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties `json:"properties,omitempty"` + // 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:"-"` +} - // 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"` +func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableFieldRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableFieldRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // Publisher: Output only. The user who published this choice. This - // value has no meaning when the choice is not published. - Publisher *GoogleAppsDriveLabelsV2UserInfo `json:"publisher,omitempty"` +// GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableSelectionChoiceRe +// quest: Request to disable a Choice. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableSelectionChoiceRequest struct { + // DisabledPolicy: Required. The disabled policy to update. + DisabledPolicy *GoogleAppsDriveLabelsV2LifecycleDisabledPolicy `json:"disabledPolicy,omitempty"` - // SchemaCapabilities: Output only. The capabilities related to this - // option when editing the option. - SchemaCapabilities *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceSchemaCapabilities `json:"schemaCapabilities,omitempty"` + // FieldId: Required. The Selection Field in which a Choice will be + // disabled. + FieldId string `json:"fieldId,omitempty"` - // UpdateTime: Output only. The time this choice was updated last. - UpdateTime string `json:"updateTime,omitempty"` + // Id: Required. Choice to disable. + Id string `json:"id,omitempty"` - // Updater: Output only. The user who updated this choice last. - Updater *GoogleAppsDriveLabelsV2UserInfo `json:"updater,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. "AppliedCapabilities") - // to unconditionally include in API requests. By default, fields with + // 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. "AppliedCapabilities") to + // 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 @@ -674,26 +717,19 @@ type GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice struct { NullFields []string `json:"-"` } -func (s *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice +func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableSelectionChoiceRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableSelectionChoiceRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceAppliedCapabilities: -// -// The capabilities related to this choice on applied metadata. -type GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceAppliedCapabilities 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"` +// GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableFieldRequest: +// Request to enable the Field. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableFieldRequest struct { + // Id: Required. ID of the Field to enable. + Id string `json:"id,omitempty"` - // ForceSendFields is a list of field names (e.g. "CanRead") to + // 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 @@ -701,8 +737,8 @@ type GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceAppliedCapabilities struc // 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 + // 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. @@ -710,44 +746,23 @@ type GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceAppliedCapabilities struc NullFields []string `json:"-"` } -func (s *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceAppliedCapabilities) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceAppliedCapabilities +func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableFieldRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableFieldRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceDisplayHints: UI -// display hints for rendering an option. -type GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceDisplayHints struct { - // BadgeColors: The colors to use for the badge. Changed to Google - // Material colors based on the chosen `properties.badge_config.color`. - BadgeColors *GoogleAppsDriveLabelsV2BadgeColors `json:"badgeColors,omitempty"` - - // BadgePriority: The priority of this badge. Used to compare and sort - // between multiple badges. A lower number means 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. Changed to - // Google Material colors based on the chosen - // `properties.badge_config.color`. - DarkBadgeColors *GoogleAppsDriveLabelsV2BadgeColors `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 when - // searching for Drive items. - HiddenInSearch bool `json:"hiddenInSearch,omitempty"` +// GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableSelectionChoiceReq +// uest: Request to enable a Choice. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableSelectionChoiceRequest struct { + // FieldId: Required. The Selection Field in which a Choice will be + // enabled. + FieldId string `json:"fieldId,omitempty"` - // ShownInApply: This option should be shown in the apply menu when - // applying values to a Drive item. - ShownInApply bool `json:"shownInApply,omitempty"` + // Id: Required. Choice to enable. + Id string `json:"id,omitempty"` - // ForceSendFields is a list of field names (e.g. "BadgeColors") to + // 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 @@ -755,41 +770,62 @@ type GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceDisplayHints struct { // 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 + // 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 *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceDisplayHints) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceDisplayHints +func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableSelectionChoiceRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableSelectionChoiceRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties: Basic -// properties of the choice. -type GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties struct { - // BadgeConfig: The badge configuration for this choice. When set, the - // label that owns this choice is considered a "badged label". - BadgeConfig *GoogleAppsDriveLabelsV2BadgeConfig `json:"badgeConfig,omitempty"` +// GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestRequest: A single kind +// of update to apply to a Label. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestRequest struct { + // CreateField: Creates a new Field. + CreateField *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateFieldRequest `json:"createField,omitempty"` - // Description: The description of this label. - Description string `json:"description,omitempty"` + // CreateSelectionChoice: Creates Choice within a Selection field. + CreateSelectionChoice *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateSelectionChoiceRequest `json:"createSelectionChoice,omitempty"` - // DisplayName: Required. The display text to show in the UI identifying - // this field. - DisplayName string `json:"displayName,omitempty"` + // DeleteField: Deletes a Field from the label. + DeleteField *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteFieldRequest `json:"deleteField,omitempty"` - // InsertBeforeChoice: Input only. Insert or move this choice before the - // indicated choice. If empty, the choice is placed at the end of the - // list. - InsertBeforeChoice string `json:"insertBeforeChoice,omitempty"` + // DeleteSelectionChoice: Delete a Choice within a Selection Field. + DeleteSelectionChoice *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteSelectionChoiceRequest `json:"deleteSelectionChoice,omitempty"` - // ForceSendFields is a list of field names (e.g. "BadgeConfig") to + // DisableField: Disables the Field. + DisableField *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableFieldRequest `json:"disableField,omitempty"` + + // DisableSelectionChoice: Disable a Choice within a Selection Field. + DisableSelectionChoice *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableSelectionChoiceRequest `json:"disableSelectionChoice,omitempty"` + + // EnableField: Enables the Field. + EnableField *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableFieldRequest `json:"enableField,omitempty"` + + // EnableSelectionChoice: Enable a Choice within a Selection Field. + EnableSelectionChoice *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableSelectionChoiceRequest `json:"enableSelectionChoice,omitempty"` + + // UpdateField: Updates basic properties of a Field. + UpdateField *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldPropertiesRequest `json:"updateField,omitempty"` + + // UpdateFieldType: Update Field type and/or type options. + UpdateFieldType *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldTypeRequest `json:"updateFieldType,omitempty"` + + // UpdateLabel: Updates the Label properties. + UpdateLabel *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateLabelPropertiesRequest `json:"updateLabel,omitempty"` + + // UpdateSelectionChoiceProperties: Update a Choice properties within a + // Selection Field. + UpdateSelectionChoiceProperties *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateSelectionChoicePropertiesRequest `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 @@ -797,7 +833,7 @@ type GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties struct { // 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 + // 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 @@ -806,28 +842,28 @@ type GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties struct { NullFields []string `json:"-"` } -func (s *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties +func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceSchemaCapabilities: -// The capabilities related to this choice when editing the choice. -type GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceSchemaCapabilities struct { - // CanDelete: Whether the user can delete this choice. - CanDelete bool `json:"canDelete,omitempty"` - - // CanDisable: Whether the user can disable this choice. - CanDisable bool `json:"canDisable,omitempty"` +// GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldPropertiesReq +// uest: Request to update Field properties. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldPropertiesRequest struct { + // Id: Required. The Field to update. + Id string `json:"id,omitempty"` - // CanEnable: Whether the user can enable this choice. - CanEnable bool `json:"canEnable,omitempty"` + // Properties: Required. Basic Field properties. + Properties *GoogleAppsDriveLabelsV2FieldProperties `json:"properties,omitempty"` - // CanUpdate: Whether the user can update this choice. - CanUpdate bool `json:"canUpdate,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. "CanDelete") to + // 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 @@ -835,8 +871,8 @@ type GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceSchemaCapabilities struct // 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 + // 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. @@ -844,54 +880,43 @@ type GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceSchemaCapabilities struct NullFields []string `json:"-"` } -func (s *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceSchemaCapabilities) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceSchemaCapabilities +func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldPropertiesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldPropertiesRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2FieldTextOptions: Options for the Text field -// type. -type GoogleAppsDriveLabelsV2FieldTextOptions struct { - // MaxLength: Output only. The maximum valid length of values for the - // text field. - MaxLength int64 `json:"maxLength,omitempty"` +// GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldTypeRequest: +// Request to change the type of a Field. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldTypeRequest struct { + // DateOptions: Update field to Date. + DateOptions *GoogleAppsDriveLabelsV2FieldDateOptions `json:"dateOptions,omitempty"` - // MinLength: Output only. The minimum valid length of values for the - // text field. - MinLength int64 `json:"minLength,omitempty"` + // Id: Required. The Field to update. + Id string `json:"id,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:"-"` + // IntegerOptions: Update field to Integer. + IntegerOptions *GoogleAppsDriveLabelsV2FieldIntegerOptions `json:"integerOptions,omitempty"` - // 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:"-"` -} + // LongTextOptions: Update field to Long Text. + LongTextOptions *GoogleAppsDriveLabelsV2FieldLongTextOptions `json:"longTextOptions,omitempty"` -func (s *GoogleAppsDriveLabelsV2FieldTextOptions) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2FieldTextOptions - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // SelectionOptions: Update field to Selection. + SelectionOptions *GoogleAppsDriveLabelsV2FieldSelectionOptions `json:"selectionOptions,omitempty"` -// GoogleAppsDriveLabelsV2FieldUserOptions: Options for the user field -// type. -type GoogleAppsDriveLabelsV2FieldUserOptions struct { - // ListOptions: When specified, indicates that this field supports a - // list of values. Once the field is published, this cannot be changed. - ListOptions *GoogleAppsDriveLabelsV2FieldListOptions `json:"listOptions,omitempty"` + // TextOptions: Update field to Text. + TextOptions *GoogleAppsDriveLabelsV2FieldTextOptions `json:"textOptions,omitempty"` - // ForceSendFields is a list of field names (e.g. "ListOptions") to + // 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 *GoogleAppsDriveLabelsV2FieldUserOptions `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 @@ -899,7 +924,7 @@ type GoogleAppsDriveLabelsV2FieldUserOptions struct { // 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 + // 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 @@ -908,148 +933,105 @@ type GoogleAppsDriveLabelsV2FieldUserOptions struct { NullFields []string `json:"-"` } -func (s *GoogleAppsDriveLabelsV2FieldUserOptions) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2FieldUserOptions +func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldTypeRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldTypeRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2Label: A label defines a taxonomy that can be -// applied to Drive items in order to organize and search across items. -// Labels can be simple strings, or can contain fields that describe -// additional metadata that can be further used to organize and search -// Drive items. -type GoogleAppsDriveLabelsV2Label struct { - // AppliedCapabilities: Output only. The capabilities related to this - // label on applied metadata. - AppliedCapabilities *GoogleAppsDriveLabelsV2LabelAppliedCapabilities `json:"appliedCapabilities,omitempty"` - - // AppliedLabelPolicy: Output only. Behavior of this label when it's - // applied to Drive items. - AppliedLabelPolicy *GoogleAppsDriveLabelsV2LabelAppliedLabelPolicy `json:"appliedLabelPolicy,omitempty"` - - // CreateTime: Output only. The time this label was created. - CreateTime string `json:"createTime,omitempty"` +// GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateLabelPropertiesReq +// uest: Updates basic properties of a Label. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateLabelPropertiesRequest struct { + // Properties: Required. Label properties to update. + Properties *GoogleAppsDriveLabelsV2LabelProperties `json:"properties,omitempty"` - // Creator: Output only. The user who created this label. - Creator *GoogleAppsDriveLabelsV2UserInfo `json:"creator,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"` - // 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"` + // 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:"-"` - // Disabler: Output only. The user who disabled this label. This value - // has no meaning when the label is not disabled. - Disabler *GoogleAppsDriveLabelsV2UserInfo `json:"disabler,omitempty"` + // 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:"-"` +} - // DisplayHints: Output only. UI display hints for rendering the label. - DisplayHints *GoogleAppsDriveLabelsV2LabelDisplayHints `json:"displayHints,omitempty"` +func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateLabelPropertiesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateLabelPropertiesRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // Fields: List of fields in descending priority order. - Fields []*GoogleAppsDriveLabelsV2Field `json:"fields,omitempty"` +// GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateSelectionChoicePro +// pertiesRequest: Request to update a Choice properties. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateSelectionChoicePropertiesRequest struct { + // FieldId: Required. The Selection Field to update. + FieldId string `json:"fieldId,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: Required. The Choice to update. Id string `json:"id,omitempty"` - // LabelType: Required. The type of 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 *GoogleAppsDriveLabelsV2Lifecycle `json:"lifecycle,omitempty"` - - // LockStatus: Output only. The LockStatus of this label. - LockStatus *GoogleAppsDriveLabelsV2LockStatus `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 *GoogleAppsDriveLabelsV2LabelProperties `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 *GoogleAppsDriveLabelsV2UserInfo `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 *GoogleAppsDriveLabelsV2UserInfo `json:"revisionCreator,omitempty"` - - // RevisionId: Output only. Revision ID of the label. Revision ID might - // 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 *GoogleAppsDriveLabelsV2LabelSchemaCapabilities `json:"schemaCapabilities,omitempty"` + // Properties: Required. The Choice properties to update. + Properties *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties `json:"properties,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // 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. "AppliedCapabilities") - // to unconditionally include in API requests. By default, fields with + // 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. "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 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 *GoogleAppsDriveLabelsV2Label) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2Label +func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateSelectionChoicePropertiesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateSelectionChoicePropertiesRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2LabelAppliedCapabilities: The capabilities a -// user has on this label's applied metadata. -type GoogleAppsDriveLabelsV2LabelAppliedCapabilities struct { - // CanApply: Whether the user can apply this label to items. - CanApply bool `json:"canApply,omitempty"` +// GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse: Response for Label +// update. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse struct { + // Responses: The reply of the updates. This maps 1:1 with the updates, + // although responses to some requests may be empty. + Responses []*GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseResponse `json:"responses,omitempty"` - // CanRead: Whether the user can read applied metadata related to this - // label. - CanRead bool `json:"canRead,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 *GoogleAppsDriveLabelsV2Label `json:"updatedLabel,omitempty"` - // CanRemove: Whether the user can remove this label from items. - CanRemove bool `json:"canRemove,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CanApply") to + // 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 @@ -1057,7 +1039,7 @@ type GoogleAppsDriveLabelsV2LabelAppliedCapabilities struct { // 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 + // 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 @@ -1066,30 +1048,25 @@ type GoogleAppsDriveLabelsV2LabelAppliedCapabilities struct { NullFields []string `json:"-"` } -func (s *GoogleAppsDriveLabelsV2LabelAppliedCapabilities) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2LabelAppliedCapabilities +func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2LabelAppliedLabelPolicy: Behavior of this -// label when it's applied to Drive items. -type GoogleAppsDriveLabelsV2LabelAppliedLabelPolicy 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 are not copied - // by default when the Drive item it's applied to is copied. - // "ALWAYS_COPY" - The applied label and field values are always - // copied when the Drive item it's applied to is copied. Only admins can - // use this mode. - // "COPY_APPLIABLE" - The applied label and field values are copied if - // the label is appliable by the user making the copy. - CopyMode string `json:"copyMode,omitempty"` +// GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseCreateFieldResponse: +// Response following Field create. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseCreateFieldResponse 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"` - // ForceSendFields is a list of field names (e.g. "CopyMode") to + // 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 @@ -1097,8 +1074,8 @@ type GoogleAppsDriveLabelsV2LabelAppliedLabelPolicy struct { // 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 + // 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. @@ -1106,30 +1083,22 @@ type GoogleAppsDriveLabelsV2LabelAppliedLabelPolicy struct { NullFields []string `json:"-"` } -func (s *GoogleAppsDriveLabelsV2LabelAppliedLabelPolicy) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2LabelAppliedLabelPolicy +func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseCreateFieldResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseCreateFieldResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2LabelDisplayHints: UI display hints for -// rendering the label. -type GoogleAppsDriveLabelsV2LabelDisplayHints 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"` +// GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseCreateSelectionChoiceRe +// sponse: Response following Selection Choice create. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseCreateSelectionChoiceResponse struct { + // FieldId: The server-generated id of the field. + FieldId string `json:"fieldId,omitempty"` - // ShownInApply: This label should be shown in the apply menu when - // applying values to a Drive item. - ShownInApply bool `json:"shownInApply,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. "Disabled") to + // 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 @@ -1137,7 +1106,7 @@ type GoogleAppsDriveLabelsV2LabelDisplayHints struct { // 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 + // 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 @@ -1146,22 +1115,84 @@ type GoogleAppsDriveLabelsV2LabelDisplayHints struct { NullFields []string `json:"-"` } -func (s *GoogleAppsDriveLabelsV2LabelDisplayHints) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2LabelDisplayHints +func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseCreateSelectionChoiceResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseCreateSelectionChoiceResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2LabelProperties: Basic properties of the -// label. -type GoogleAppsDriveLabelsV2LabelProperties struct { - // Description: The description of the label. - Description string `json:"description,omitempty"` +// GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDeleteFieldResponse: +// Response following Field delete. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDeleteFieldResponse struct { +} - // Title: Required. Title of the label. - Title string `json:"title,omitempty"` +// GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDeleteSelectionChoiceRe +// sponse: Response following Choice delete. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDeleteSelectionChoiceResponse struct { +} - // ForceSendFields is a list of field names (e.g. "Description") to +// GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDisableFieldResponse: +// Response following Field disable. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDisableFieldResponse struct { +} + +// GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDisableSelectionChoiceR +// esponse: Response following Choice disable. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDisableSelectionChoiceResponse struct { +} + +// GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseEnableFieldResponse: +// Response following Field enable. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseEnableFieldResponse struct { +} + +// GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseEnableSelectionChoiceRe +// sponse: Response following Choice enable. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseEnableSelectionChoiceResponse struct { +} + +// GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseResponse: A single +// response from an update. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseResponse struct { + // CreateField: Creates a new Field. + CreateField *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseCreateFieldResponse `json:"createField,omitempty"` + + // CreateSelectionChoice: Creates a new selection list option to add to + // a Selection Field. + CreateSelectionChoice *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseCreateSelectionChoiceResponse `json:"createSelectionChoice,omitempty"` + + // DeleteField: Deletes a Field from the label. + DeleteField *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDeleteFieldResponse `json:"deleteField,omitempty"` + + // DeleteSelectionChoice: Deletes a Choice from a Selection Field. + DeleteSelectionChoice *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDeleteSelectionChoiceResponse `json:"deleteSelectionChoice,omitempty"` + + // DisableField: Disables Field. + DisableField *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDisableFieldResponse `json:"disableField,omitempty"` + + // DisableSelectionChoice: Disables a Choice within a Selection Field. + DisableSelectionChoice *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDisableSelectionChoiceResponse `json:"disableSelectionChoice,omitempty"` + + // EnableField: Enables Field. + EnableField *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseEnableFieldResponse `json:"enableField,omitempty"` + + // EnableSelectionChoice: Enables a Choice within a Selection Field. + EnableSelectionChoice *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseEnableSelectionChoiceResponse `json:"enableSelectionChoice,omitempty"` + + // UpdateField: Updates basic properties of a Field. + UpdateField *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateFieldPropertiesResponse `json:"updateField,omitempty"` + + // UpdateFieldType: Update Field type and/or type options. + UpdateFieldType *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateFieldTypeResponse `json:"updateFieldType,omitempty"` + + // UpdateLabel: Updated basic properties of a Label. + UpdateLabel *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateLabelPropertiesResponse `json:"updateLabel,omitempty"` + + // UpdateSelectionChoiceProperties: Updates a Choice within a Selection + // Field. + UpdateSelectionChoiceProperties *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateSelectionChoicePropertiesResponse `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 @@ -1169,7 +1200,7 @@ type GoogleAppsDriveLabelsV2LabelProperties struct { // 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 + // 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 @@ -1178,31 +1209,63 @@ type GoogleAppsDriveLabelsV2LabelProperties struct { NullFields []string `json:"-"` } -func (s *GoogleAppsDriveLabelsV2LabelProperties) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2LabelProperties +func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2LabelSchemaCapabilities: The capabilities -// related to this label when editing the label. -type GoogleAppsDriveLabelsV2LabelSchemaCapabilities 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"` +// GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateFieldPropertiesRe +// sponse: Response following update to Field properties. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateFieldPropertiesResponse 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"` - // 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"` + // 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:"-"` - // CanEnable: Whether the user can enable this label. The user must have - // permission and this label must be disabled. - CanEnable bool `json:"canEnable,omitempty"` + // 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:"-"` +} - // CanUpdate: Whether the user can change this label. - CanUpdate bool `json:"canUpdate,omitempty"` +func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateFieldPropertiesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateFieldPropertiesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // ForceSendFields is a list of field names (e.g. "CanDelete") to +// GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateFieldTypeResponse +// : Response following update to Field type. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateFieldTypeResponse struct { +} + +// GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateLabelPropertiesRe +// sponse: Response following update to Label properties. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateLabelPropertiesResponse struct { +} + +// GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateSelectionChoicePr +// opertiesResponse: Response following update to Selection Choice +// properties. +type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateSelectionChoicePropertiesResponse 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 @@ -1210,7 +1273,7 @@ type GoogleAppsDriveLabelsV2LabelSchemaCapabilities struct { // 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 + // 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 @@ -1219,49 +1282,37 @@ type GoogleAppsDriveLabelsV2LabelSchemaCapabilities struct { NullFields []string `json:"-"` } -func (s *GoogleAppsDriveLabelsV2LabelSchemaCapabilities) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2LabelSchemaCapabilities +func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateSelectionChoicePropertiesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateSelectionChoicePropertiesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2Lifecycle: The lifecycle state of an object, -// such as 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 might be made to -// an object in this state, in which case `has_unpublished_changes` will -// be true. Also, some kinds of changes are not permitted. Generally, -// any change that would invalidate or cause new restrictions on -// existing metadata related to the label are rejected. * -// Disabled—When disabled, the configured `DisabledPolicy` takes -// effect. -type GoogleAppsDriveLabelsV2Lifecycle struct { - // DisabledPolicy: The policy that governs how to show a disabled label, - // field, or selection choice. +// GoogleAppsDriveLabelsV2DisableLabelRequest: Request to deprecate a +// published Label. +type GoogleAppsDriveLabelsV2DisableLabelRequest struct { + // DisabledPolicy: Disabled policy to use. DisabledPolicy *GoogleAppsDriveLabelsV2LifecycleDisabledPolicy `json:"disabledPolicy,omitempty"` - // HasUnpublishedChanges: Output only. Whether the object associated - // with this lifecycle has unpublished changes. - HasUnpublishedChanges bool `json:"hasUnpublishedChanges,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"` - // 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 can 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 might have - // unpublished draft changes as indicated by `has_unpublished_changes`. - // "DISABLED" - The object has been published and has since been - // disabled. The object might have unpublished draft changes as - // indicated by `has_unpublished_changes`. - // "DELETED" - The object has been deleted. - State string `json:"state,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 *GoogleAppsDriveLabelsV2WriteControl `json:"writeControl,omitempty"` // ForceSendFields is a list of field names (e.g. "DisabledPolicy") to // unconditionally include in API requests. By default, fields with @@ -1281,30 +1332,29 @@ type GoogleAppsDriveLabelsV2Lifecycle struct { NullFields []string `json:"-"` } -func (s *GoogleAppsDriveLabelsV2Lifecycle) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2Lifecycle +func (s *GoogleAppsDriveLabelsV2DisableLabelRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2DisableLabelRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2LifecycleDisabledPolicy: The policy that -// governs how to treat a disabled label, field, or selection choice in -// different contexts. -type GoogleAppsDriveLabelsV2LifecycleDisabledPolicy struct { - // HideInSearch: Whether to hide this disabled object in the search menu - // for Drive items. * When `false`, the object is generally shown in the - // UI as disabled but it appears in the search results when searching - // for Drive items. * When `true`, the object is generally hidden in the - // UI when searching for Drive items. - HideInSearch bool `json:"hideInSearch,omitempty"` +// GoogleAppsDriveLabelsV2EnableLabelRequest: Request to enable a label. +type GoogleAppsDriveLabelsV2EnableLabelRequest 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"` - // ShowInApply: Whether to show this disabled object in the apply menu - // on Drive items. * When `true`, the object is generally shown in the - // UI as disabled and is unselectable. * When `false`, the object is - // generally hidden in the UI. - ShowInApply bool `json:"showInApply,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. "HideInSearch") to + // WriteControl: Provides control over how write requests are executed. + // Defaults to unset, which means last write wins. + WriteControl *GoogleAppsDriveLabelsV2WriteControl `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 @@ -1312,7 +1362,7 @@ type GoogleAppsDriveLabelsV2LifecycleDisabledPolicy struct { // 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 + // 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 @@ -1321,58 +1371,123 @@ type GoogleAppsDriveLabelsV2LifecycleDisabledPolicy struct { NullFields []string `json:"-"` } -func (s *GoogleAppsDriveLabelsV2LifecycleDisabledPolicy) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2LifecycleDisabledPolicy +func (s *GoogleAppsDriveLabelsV2EnableLabelRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2EnableLabelRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2ListLabelsResponse: Response for listing -// Labels. -type GoogleAppsDriveLabelsV2ListLabelsResponse struct { - // Labels: Labels. - Labels []*GoogleAppsDriveLabelsV2Label `json:"labels,omitempty"` +// GoogleAppsDriveLabelsV2Field: Defines a field that 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 GoogleAppsDriveLabelsV2Field struct { + // AppliedCapabilities: Output only. The capabilities this user has on + // this field and its value when the label is applied on Drive items. + AppliedCapabilities *GoogleAppsDriveLabelsV2FieldAppliedCapabilities `json:"appliedCapabilities,omitempty"` - // NextPageToken: The token of the next page in the response. - NextPageToken string `json:"nextPageToken,omitempty"` + // CreateTime: Output only. The time this field was created. + CreateTime string `json:"createTime,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Creator: Output only. The user who created this field. + Creator *GoogleAppsDriveLabelsV2UserInfo `json:"creator,omitempty"` - // ForceSendFields is a list of field names (e.g. "Labels") to - // unconditionally include in API requests. By default, fields with + // DateOptions: Date field options. + DateOptions *GoogleAppsDriveLabelsV2FieldDateOptions `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 *GoogleAppsDriveLabelsV2UserInfo `json:"disabler,omitempty"` + + // DisplayHints: Output only. UI display hints for rendering a field. + DisplayHints *GoogleAppsDriveLabelsV2FieldDisplayHints `json:"displayHints,omitempty"` + + // Id: Output only. The key of a field, unique within a label or + // library. This value is autogenerated. Matches the regex: + // `([a-zA-Z0-9])+` + Id string `json:"id,omitempty"` + + // IntegerOptions: Integer field options. + IntegerOptions *GoogleAppsDriveLabelsV2FieldIntegerOptions `json:"integerOptions,omitempty"` + + // Lifecycle: Output only. The lifecycle of this field. + Lifecycle *GoogleAppsDriveLabelsV2Lifecycle `json:"lifecycle,omitempty"` + + // LockStatus: Output only. The LockStatus of this field. + LockStatus *GoogleAppsDriveLabelsV2LockStatus `json:"lockStatus,omitempty"` + + // Properties: The basic properties of the field. + Properties *GoogleAppsDriveLabelsV2FieldProperties `json:"properties,omitempty"` + + // Publisher: Output only. The user who published this field. This value + // has no meaning when the field is not published. + Publisher *GoogleAppsDriveLabelsV2UserInfo `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 *GoogleAppsDriveLabelsV2FieldSchemaCapabilities `json:"schemaCapabilities,omitempty"` + + // SelectionOptions: Selection field options. + SelectionOptions *GoogleAppsDriveLabelsV2FieldSelectionOptions `json:"selectionOptions,omitempty"` + + // TextOptions: Text field options. + TextOptions *GoogleAppsDriveLabelsV2FieldTextOptions `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 *GoogleAppsDriveLabelsV2UserInfo `json:"updater,omitempty"` + + // UserOptions: User field options. + UserOptions *GoogleAppsDriveLabelsV2FieldUserOptions `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. "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 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 *GoogleAppsDriveLabelsV2ListLabelsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2ListLabelsResponse +func (s *GoogleAppsDriveLabelsV2Field) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2Field raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2LockStatus: Contains information about whether -// a label component should be considered locked. -type GoogleAppsDriveLabelsV2LockStatus struct { - // Locked: Output only. Indicates whether this label component is the - // (direct) target of a LabelLock. A label component can be implicitly - // locked even if it's not the direct target of a LabelLock, in which - // case this field is set to false. - Locked bool `json:"locked,omitempty"` +// GoogleAppsDriveLabelsV2FieldAppliedCapabilities: The capabilities +// related to this field on applied metadata. +type GoogleAppsDriveLabelsV2FieldAppliedCapabilities struct { + // CanRead: Whether the user can read related applied metadata on items. + CanRead bool `json:"canRead,omitempty"` - // ForceSendFields is a list of field names (e.g. "Locked") to + // 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 @@ -1380,8 +1495,8 @@ type GoogleAppsDriveLabelsV2LockStatus struct { // 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 + // 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. @@ -1389,19 +1504,36 @@ type GoogleAppsDriveLabelsV2LockStatus struct { NullFields []string `json:"-"` } -func (s *GoogleAppsDriveLabelsV2LockStatus) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2LockStatus +func (s *GoogleAppsDriveLabelsV2FieldAppliedCapabilities) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2FieldAppliedCapabilities raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsDriveLabelsV2UserInfo: Information about a user. -type GoogleAppsDriveLabelsV2UserInfo struct { - // Person: The identifier for this user that can be used with the People - // API to get more information. For example, people/12345678. - Person string `json:"person,omitempty"` +// GoogleAppsDriveLabelsV2FieldDateOptions: Options for the date field +// type. +type GoogleAppsDriveLabelsV2FieldDateOptions struct { + // DateFormat: Output only. ICU date format. + DateFormat string `json:"dateFormat,omitempty"` - // ForceSendFields is a list of field names (e.g. "Person") to + // DateFormatType: Localized date formatting option. Field values are + // rendered in this format according to their locale. + // + // Possible values: + // "DATE_FORMAT_UNSPECIFIED" - Date format unspecified. + // "LONG_DATE" - Includes full month name. For example, January 12, + // 1999 (MMMM d, y) + // "SHORT_DATE" - Short, numeric, representation. For example, + // 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 @@ -1409,8 +1541,8 @@ type GoogleAppsDriveLabelsV2UserInfo struct { // 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 + // 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. @@ -1418,12 +1550,1852 @@ type GoogleAppsDriveLabelsV2UserInfo struct { NullFields []string `json:"-"` } -func (s *GoogleAppsDriveLabelsV2UserInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAppsDriveLabelsV2UserInfo +func (s *GoogleAppsDriveLabelsV2FieldDateOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2FieldDateOptions raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleAppsDriveLabelsV2FieldDisplayHints: UI display hints for +// rendering a field. +type GoogleAppsDriveLabelsV2FieldDisplayHints 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 when + // searching for Drive items. + 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 in the apply menu 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 *GoogleAppsDriveLabelsV2FieldDisplayHints) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2FieldDisplayHints + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2FieldIntegerOptions: Options for the Integer +// field type. +type GoogleAppsDriveLabelsV2FieldIntegerOptions 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 *GoogleAppsDriveLabelsV2FieldIntegerOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2FieldIntegerOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2FieldLimits: Field constants governing the +// structure of a Field; such as, the maximum title length, minimum and +// maximum field values or length, etc. +type GoogleAppsDriveLabelsV2FieldLimits struct { + // DateLimits: Date Field limits. + DateLimits *GoogleAppsDriveLabelsV2DateLimits `json:"dateLimits,omitempty"` + + // IntegerLimits: Integer Field limits. + IntegerLimits *GoogleAppsDriveLabelsV2IntegerLimits `json:"integerLimits,omitempty"` + + // LongTextLimits: Long text Field limits. + LongTextLimits *GoogleAppsDriveLabelsV2LongTextLimits `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 *GoogleAppsDriveLabelsV2SelectionLimits `json:"selectionLimits,omitempty"` + + // TextLimits: The relevant limits for the specified Field.Type. Text + // Field limits. + TextLimits *GoogleAppsDriveLabelsV2TextLimits `json:"textLimits,omitempty"` + + // UserLimits: User Field limits. + UserLimits *GoogleAppsDriveLabelsV2UserLimits `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 *GoogleAppsDriveLabelsV2FieldLimits) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2FieldLimits + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2FieldListOptions: Options for a multi-valued +// variant of an associated field type. +type GoogleAppsDriveLabelsV2FieldListOptions 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 *GoogleAppsDriveLabelsV2FieldListOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2FieldListOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2FieldLongTextOptions: Options the Long Text +// field type. +type GoogleAppsDriveLabelsV2FieldLongTextOptions 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 *GoogleAppsDriveLabelsV2FieldLongTextOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2FieldLongTextOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2FieldProperties: The basic properties of the +// field. +type GoogleAppsDriveLabelsV2FieldProperties 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 before the + // indicated field. If empty, the field is 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 *GoogleAppsDriveLabelsV2FieldProperties) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2FieldProperties + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2FieldSchemaCapabilities: The capabilities +// related to this field when editing the field. +type GoogleAppsDriveLabelsV2FieldSchemaCapabilities struct { + // CanDelete: Whether the user can delete this field. The user must have + // permission and the field must be deprecated. + CanDelete bool `json:"canDelete,omitempty"` + + // CanDisable: Whether the user can disable this field. The user must + // have permission 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 + // permission 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 *GoogleAppsDriveLabelsV2FieldSchemaCapabilities) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2FieldSchemaCapabilities + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2FieldSelectionOptions: Options for the +// selection field type. +type GoogleAppsDriveLabelsV2FieldSelectionOptions struct { + // Choices: The options available for this selection field. The list + // order is consistent, and modified with `insert_before_choice`. + Choices []*GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice `json:"choices,omitempty"` + + // ListOptions: When specified, indicates this field supports a list of + // values. Once the field is published, this cannot be changed. + ListOptions *GoogleAppsDriveLabelsV2FieldListOptions `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 *GoogleAppsDriveLabelsV2FieldSelectionOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2FieldSelectionOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice: Selection field +// choice. +type GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice struct { + // AppliedCapabilities: Output only. The capabilities related to this + // choice on applied metadata. + AppliedCapabilities *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceAppliedCapabilities `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 *GoogleAppsDriveLabelsV2UserInfo `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 *GoogleAppsDriveLabelsV2UserInfo `json:"disabler,omitempty"` + + // DisplayHints: Output only. UI display hints for rendering a choice. + DisplayHints *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceDisplayHints `json:"displayHints,omitempty"` + + // Id: The unique value of the choice. This ID is autogenerated. Matches + // the regex: `([a-zA-Z0-9_])+`. + Id string `json:"id,omitempty"` + + // Lifecycle: Output only. Lifecycle of the choice. + Lifecycle *GoogleAppsDriveLabelsV2Lifecycle `json:"lifecycle,omitempty"` + + // LockStatus: Output only. The LockStatus of this choice. + LockStatus *GoogleAppsDriveLabelsV2LockStatus `json:"lockStatus,omitempty"` + + // Properties: Basic properties of the choice. + Properties *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties `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 *GoogleAppsDriveLabelsV2UserInfo `json:"publisher,omitempty"` + + // SchemaCapabilities: Output only. The capabilities related to this + // option when editing the option. + SchemaCapabilities *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceSchemaCapabilities `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 *GoogleAppsDriveLabelsV2UserInfo `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 *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceAppliedCapabilities: +// +// The capabilities related to this choice on applied metadata. +type GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceAppliedCapabilities 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 *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceAppliedCapabilities) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceAppliedCapabilities + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceDisplayHints: UI +// display hints for rendering an option. +type GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceDisplayHints struct { + // BadgeColors: The colors to use for the badge. Changed to Google + // Material colors based on the chosen `properties.badge_config.color`. + BadgeColors *GoogleAppsDriveLabelsV2BadgeColors `json:"badgeColors,omitempty"` + + // BadgePriority: The priority of this badge. Used to compare and sort + // between multiple badges. A lower number means 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. Changed to + // Google Material colors based on the chosen + // `properties.badge_config.color`. + DarkBadgeColors *GoogleAppsDriveLabelsV2BadgeColors `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 when + // searching for Drive items. + HiddenInSearch bool `json:"hiddenInSearch,omitempty"` + + // ShownInApply: This option should be shown in the apply 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 *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceDisplayHints) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceDisplayHints + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties: Basic +// properties of the choice. +type GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties struct { + // BadgeConfig: The badge configuration for this choice. When set, the + // label that owns this choice is considered a "badged label". + BadgeConfig *GoogleAppsDriveLabelsV2BadgeConfig `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 before the + // indicated choice. If empty, the choice is 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 *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceSchemaCapabilities: +// The capabilities related to this choice when editing the choice. +type GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceSchemaCapabilities struct { + // CanDelete: Whether the user can delete this choice. + CanDelete bool `json:"canDelete,omitempty"` + + // CanDisable: Whether the user can disable this choice. + 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 *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceSchemaCapabilities) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceSchemaCapabilities + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2FieldTextOptions: Options for the Text field +// type. +type GoogleAppsDriveLabelsV2FieldTextOptions 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 *GoogleAppsDriveLabelsV2FieldTextOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2FieldTextOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2FieldUserOptions: Options for the user field +// type. +type GoogleAppsDriveLabelsV2FieldUserOptions struct { + // ListOptions: When specified, indicates that this field supports a + // list of values. Once the field is published, this cannot be changed. + ListOptions *GoogleAppsDriveLabelsV2FieldListOptions `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 *GoogleAppsDriveLabelsV2FieldUserOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2FieldUserOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2IntegerLimits: Limits for integer Field type. +type GoogleAppsDriveLabelsV2IntegerLimits 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 *GoogleAppsDriveLabelsV2IntegerLimits) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2IntegerLimits + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2Label: A label defines a taxonomy that can be +// applied to Drive items in order to organize and search across items. +// Labels can be simple strings, or can contain fields that describe +// additional metadata that can be further used to organize and search +// Drive items. +type GoogleAppsDriveLabelsV2Label struct { + // AppliedCapabilities: Output only. The capabilities related to this + // label on applied metadata. + AppliedCapabilities *GoogleAppsDriveLabelsV2LabelAppliedCapabilities `json:"appliedCapabilities,omitempty"` + + // AppliedLabelPolicy: Output only. Behavior of this label when it's + // applied to Drive items. + AppliedLabelPolicy *GoogleAppsDriveLabelsV2LabelAppliedLabelPolicy `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 *GoogleAppsDriveLabelsV2UserInfo `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 *GoogleAppsDriveLabelsV2UserInfo `json:"disabler,omitempty"` + + // DisplayHints: Output only. UI display hints for rendering the label. + DisplayHints *GoogleAppsDriveLabelsV2LabelDisplayHints `json:"displayHints,omitempty"` + + // Fields: List of fields in descending priority order. + Fields []*GoogleAppsDriveLabelsV2Field `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 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 *GoogleAppsDriveLabelsV2Lifecycle `json:"lifecycle,omitempty"` + + // LockStatus: Output only. The LockStatus of this label. + LockStatus *GoogleAppsDriveLabelsV2LockStatus `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 *GoogleAppsDriveLabelsV2LabelProperties `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 *GoogleAppsDriveLabelsV2UserInfo `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 *GoogleAppsDriveLabelsV2UserInfo `json:"revisionCreator,omitempty"` + + // RevisionId: Output only. Revision ID of the label. Revision ID might + // 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 *GoogleAppsDriveLabelsV2LabelSchemaCapabilities `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 *GoogleAppsDriveLabelsV2Label) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2Label + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2LabelAppliedCapabilities: The capabilities a +// user has on this label's applied metadata. +type GoogleAppsDriveLabelsV2LabelAppliedCapabilities 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 *GoogleAppsDriveLabelsV2LabelAppliedCapabilities) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2LabelAppliedCapabilities + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2LabelAppliedLabelPolicy: Behavior of this +// label when it's applied to Drive items. +type GoogleAppsDriveLabelsV2LabelAppliedLabelPolicy 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 are not copied + // by default when the Drive item it's applied to is copied. + // "ALWAYS_COPY" - The applied label and field values are always + // copied when the Drive item it's applied to is copied. Only admins can + // use this mode. + // "COPY_APPLIABLE" - The applied label and field values are copied 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 *GoogleAppsDriveLabelsV2LabelAppliedLabelPolicy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2LabelAppliedLabelPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2LabelDisplayHints: UI display hints for +// rendering the label. +type GoogleAppsDriveLabelsV2LabelDisplayHints 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 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 *GoogleAppsDriveLabelsV2LabelDisplayHints) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2LabelDisplayHints + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2LabelLimits: Label constraints governing the +// structure of a Label; such as, the maximum number of Fields allowed +// and maximum length of the label title. +type GoogleAppsDriveLabelsV2LabelLimits struct { + // FieldLimits: The limits for Fields. + FieldLimits *GoogleAppsDriveLabelsV2FieldLimits `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 *GoogleAppsDriveLabelsV2LabelLimits) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2LabelLimits + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2LabelLock: A Lock that can be applied to a +// Label, Field, or Choice. +type GoogleAppsDriveLabelsV2LabelLock struct { + // Capabilities: Output only. The user's capabilities on this LabelLock. + Capabilities *GoogleAppsDriveLabelsV2LabelLockCapabilities `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 *GoogleAppsDriveLabelsV2UserInfo `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"` + + // 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 *GoogleAppsDriveLabelsV2LabelLock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2LabelLock + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2LabelLockCapabilities: A description of a +// user's capabilities on a LabelLock. +type GoogleAppsDriveLabelsV2LabelLockCapabilities 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 *GoogleAppsDriveLabelsV2LabelLockCapabilities) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2LabelLockCapabilities + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2LabelPermission: The permission that applies +// to a principal (user, group, audience) on a label. +type GoogleAppsDriveLabelsV2LabelPermission 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 can pin this label in shared drives they + // manage and add new appliers to the label. + // "EDITOR" - Editors can make any update including deleting the label + // which also deletes the 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 *GoogleAppsDriveLabelsV2LabelPermission) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2LabelPermission + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2LabelProperties: Basic properties of the +// label. +type GoogleAppsDriveLabelsV2LabelProperties struct { + // Description: The description of the 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 *GoogleAppsDriveLabelsV2LabelProperties) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2LabelProperties + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2LabelSchemaCapabilities: The capabilities +// related to this label when editing the label. +type GoogleAppsDriveLabelsV2LabelSchemaCapabilities 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 *GoogleAppsDriveLabelsV2LabelSchemaCapabilities) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2LabelSchemaCapabilities + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2Lifecycle: The lifecycle state of an object, +// such as 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 might be made to +// an object in this state, in which case `has_unpublished_changes` will +// be true. Also, some kinds of changes are not permitted. Generally, +// any change that would invalidate or cause new restrictions on +// existing metadata related to the label are rejected. * +// Disabled—When disabled, the configured `DisabledPolicy` takes +// effect. +type GoogleAppsDriveLabelsV2Lifecycle struct { + // DisabledPolicy: The policy that governs how to show a disabled label, + // field, or selection choice. + DisabledPolicy *GoogleAppsDriveLabelsV2LifecycleDisabledPolicy `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 can 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 might have + // unpublished draft changes as indicated by `has_unpublished_changes`. + // "DISABLED" - The object has been published and has since been + // disabled. The object might 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 *GoogleAppsDriveLabelsV2Lifecycle) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2Lifecycle + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2LifecycleDisabledPolicy: The policy that +// governs how to treat a disabled label, field, or selection choice in +// different contexts. +type GoogleAppsDriveLabelsV2LifecycleDisabledPolicy struct { + // HideInSearch: Whether to hide this disabled object in the search menu + // for Drive items. * When `false`, the object is generally shown in the + // UI as disabled but it appears in the search results when searching + // for Drive items. * When `true`, the object is generally 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 is generally shown in the + // UI as disabled and is unselectable. * When `false`, the object is + // generally 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 *GoogleAppsDriveLabelsV2LifecycleDisabledPolicy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2LifecycleDisabledPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2ListLabelLocksResponse: The response to a +// ListLabelLocksRequest. +type GoogleAppsDriveLabelsV2ListLabelLocksResponse struct { + // LabelLocks: LabelLocks. + LabelLocks []*GoogleAppsDriveLabelsV2LabelLock `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 *GoogleAppsDriveLabelsV2ListLabelLocksResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2ListLabelLocksResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2ListLabelPermissionsResponse: Response for +// listing the permissions on a Label. +type GoogleAppsDriveLabelsV2ListLabelPermissionsResponse struct { + // LabelPermissions: Label permissions. + LabelPermissions []*GoogleAppsDriveLabelsV2LabelPermission `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 *GoogleAppsDriveLabelsV2ListLabelPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2ListLabelPermissionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2ListLabelsResponse: Response for listing +// Labels. +type GoogleAppsDriveLabelsV2ListLabelsResponse struct { + // Labels: Labels. + Labels []*GoogleAppsDriveLabelsV2Label `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 *GoogleAppsDriveLabelsV2ListLabelsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2ListLabelsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2ListLimits: Limits for list-variant of a Field +// type. +type GoogleAppsDriveLabelsV2ListLimits 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 *GoogleAppsDriveLabelsV2ListLimits) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2ListLimits + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2LockStatus: Contains information about whether +// a label component should be considered locked. +type GoogleAppsDriveLabelsV2LockStatus struct { + // Locked: Output only. Indicates whether this label component is the + // (direct) target of a LabelLock. A label component can be implicitly + // locked even if it's not the direct target of a LabelLock, in which + // case this field is set to 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 *GoogleAppsDriveLabelsV2LockStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2LockStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2LongTextLimits: Limits for long text Field +// type. +type GoogleAppsDriveLabelsV2LongTextLimits 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 *GoogleAppsDriveLabelsV2LongTextLimits) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2LongTextLimits + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2PublishLabelRequest: Request to publish a +// label. +type GoogleAppsDriveLabelsV2PublishLabelRequest 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 *GoogleAppsDriveLabelsV2WriteControl `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 *GoogleAppsDriveLabelsV2PublishLabelRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2PublishLabelRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2SelectionLimits: Limits for selection Field +// type. +type GoogleAppsDriveLabelsV2SelectionLimits struct { + // ListLimits: Limits for list-variant of a Field type. + ListLimits *GoogleAppsDriveLabelsV2ListLimits `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 *GoogleAppsDriveLabelsV2SelectionLimits) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2SelectionLimits + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2TextLimits: Limits for text Field type. +type GoogleAppsDriveLabelsV2TextLimits 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 *GoogleAppsDriveLabelsV2TextLimits) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2TextLimits + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2UpdateLabelCopyModeRequest: 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 GoogleAppsDriveLabelsV2UpdateLabelCopyModeRequest 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 are not copied + // by default when the Drive item it's applied to is copied. + // "ALWAYS_COPY" - The applied label and field values are always + // copied when the Drive item it's applied to is copied. Only admins can + // use this mode. + // "COPY_APPLIABLE" - The applied label and field values are copied 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 *GoogleAppsDriveLabelsV2UpdateLabelCopyModeRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2UpdateLabelCopyModeRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2UpdateLabelPermissionRequest: Updates a Label +// Permission. Permissions affect the Label resource as a whole, are not +// revisioned, and do not require publishing. +type GoogleAppsDriveLabelsV2UpdateLabelPermissionRequest struct { + // LabelPermission: Required. The permission to create or update on the + // Label. + LabelPermission *GoogleAppsDriveLabelsV2LabelPermission `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 *GoogleAppsDriveLabelsV2UpdateLabelPermissionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2UpdateLabelPermissionRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2UserCapabilities: The capabilities of a user. +type GoogleAppsDriveLabelsV2UserCapabilities 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 *GoogleAppsDriveLabelsV2UserCapabilities) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2UserCapabilities + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2UserInfo: Information about a user. +type GoogleAppsDriveLabelsV2UserInfo struct { + // Person: The identifier for this user that can be used with the People + // API to get more information. For example, 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 *GoogleAppsDriveLabelsV2UserInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2UserInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2UserLimits: Limits for Field.Type.USER. +type GoogleAppsDriveLabelsV2UserLimits struct { + // ListLimits: Limits for list-variant of a Field type. + ListLimits *GoogleAppsDriveLabelsV2ListLimits `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 *GoogleAppsDriveLabelsV2UserLimits) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2UserLimits + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsDriveLabelsV2WriteControl: Provides control over how write +// requests are executed. When not specified, the last write wins. +type GoogleAppsDriveLabelsV2WriteControl 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 *GoogleAppsDriveLabelsV2WriteControl) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsDriveLabelsV2WriteControl + 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, @@ -1490,171 +3462,3968 @@ type GoogleTypeColor struct { // 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"` + // 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 + googleappsdrivelabelsv2label *GoogleAppsDriveLabelsV2Label + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Label. +func (r *LabelsService) Create(googleappsdrivelabelsv2label *GoogleAppsDriveLabelsV2Label) *LabelsCreateCall { + c := &LabelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.googleappsdrivelabelsv2label = googleappsdrivelabelsv2label + 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.googleappsdrivelabelsv2label) + 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/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 *GoogleAppsDriveLabelsV2Label or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAppsDriveLabelsV2Label.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) (*GoogleAppsDriveLabelsV2Label, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleAppsDriveLabelsV2Label{ + 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": "v2/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": "v2/labels", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2Label" + // }, + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2Label" + // } + // } + +} + +// 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, "v2/{+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, gensupport.WrapError(&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, gensupport.WrapError(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": "v2/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": "v2/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // } + // } + +} + +// method id "drivelabels.labels.delta": + +type LabelsDeltaCall struct { + s *Service + name string + googleappsdrivelabelsv2deltaupdatelabelrequest *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest + 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, googleappsdrivelabelsv2deltaupdatelabelrequest *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest) *LabelsDeltaCall { + c := &LabelsDeltaCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleappsdrivelabelsv2deltaupdatelabelrequest = googleappsdrivelabelsv2deltaupdatelabelrequest + 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.googleappsdrivelabelsv2deltaupdatelabelrequest) + 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}: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 *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse.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 *LabelsDeltaCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse{ + 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": "v2/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": "v2/{+name}:delta", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest" + // }, + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse" + // } + // } + +} + +// method id "drivelabels.labels.disable": + +type LabelsDisableCall struct { + s *Service + name string + googleappsdrivelabelsv2disablelabelrequest *GoogleAppsDriveLabelsV2DisableLabelRequest + 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, googleappsdrivelabelsv2disablelabelrequest *GoogleAppsDriveLabelsV2DisableLabelRequest) *LabelsDisableCall { + c := &LabelsDisableCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleappsdrivelabelsv2disablelabelrequest = googleappsdrivelabelsv2disablelabelrequest + 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.googleappsdrivelabelsv2disablelabelrequest) + 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}: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 *GoogleAppsDriveLabelsV2Label or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAppsDriveLabelsV2Label.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) (*GoogleAppsDriveLabelsV2Label, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleAppsDriveLabelsV2Label{ + 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": "v2/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": "v2/{+name}:disable", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2DisableLabelRequest" + // }, + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2Label" + // } + // } + +} + +// method id "drivelabels.labels.enable": + +type LabelsEnableCall struct { + s *Service + name string + googleappsdrivelabelsv2enablelabelrequest *GoogleAppsDriveLabelsV2EnableLabelRequest + 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, googleappsdrivelabelsv2enablelabelrequest *GoogleAppsDriveLabelsV2EnableLabelRequest) *LabelsEnableCall { + c := &LabelsEnableCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleappsdrivelabelsv2enablelabelrequest = googleappsdrivelabelsv2enablelabelrequest + 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.googleappsdrivelabelsv2enablelabelrequest) + 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}: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 *GoogleAppsDriveLabelsV2Label or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAppsDriveLabelsV2Label.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) (*GoogleAppsDriveLabelsV2Label, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleAppsDriveLabelsV2Label{ + 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": "v2/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": "v2/{+name}:enable", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2EnableLabelRequest" + // }, + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2Label" + // } + // } + +} + +// 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 `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 are 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 +// verifies that 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 are 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, "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 "drivelabels.labels.get" call. +// Exactly one of *GoogleAppsDriveLabelsV2Label or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAppsDriveLabelsV2Label.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) (*GoogleAppsDriveLabelsV2Label, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleAppsDriveLabelsV2Label{ + 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 `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": "v2/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 are 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 verifies that 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 are 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": "v2/{+name}", + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2Label" + // } + // } + +} + +// method id "drivelabels.labels.list": + +type LabelsListCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: 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 are 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 can pin this label in shared drives they +// +// manage and add new appliers to the label. +// +// "EDITOR" - Editors can make any update including deleting the label +// +// which also deletes the 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 are returned. Disabled labels are +// included. Returned label resource names reference the published +// revision (`labels/{id}/{revision_id}`). * When `false`, the current +// label revisions are returned, which might not be published. Returned +// label resource names don't 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 are 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, "v2/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 *GoogleAppsDriveLabelsV2ListLabelsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAppsDriveLabelsV2ListLabelsResponse.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) (*GoogleAppsDriveLabelsV2ListLabelsResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleAppsDriveLabelsV2ListLabelsResponse{ + 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": "List labels.", + // "flatPath": "v2/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 are 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 can pin this label in shared drives they manage and add new appliers to the label.", + // "Editors can make any update including deleting the label which also deletes the 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 are returned. Disabled labels are included. Returned label resource names reference the published revision (`labels/{id}/{revision_id}`). * When `false`, the current label revisions are returned, which might not be published. Returned label resource names don't 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 are 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": "v2/labels", + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2ListLabelsResponse" + // } + // } + +} + +// 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(*GoogleAppsDriveLabelsV2ListLabelsResponse) 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 + googleappsdrivelabelsv2publishlabelrequest *GoogleAppsDriveLabelsV2PublishLabelRequest + 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, googleappsdrivelabelsv2publishlabelrequest *GoogleAppsDriveLabelsV2PublishLabelRequest) *LabelsPublishCall { + c := &LabelsPublishCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleappsdrivelabelsv2publishlabelrequest = googleappsdrivelabelsv2publishlabelrequest + 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.googleappsdrivelabelsv2publishlabelrequest) + 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}: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 *GoogleAppsDriveLabelsV2Label or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAppsDriveLabelsV2Label.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) (*GoogleAppsDriveLabelsV2Label, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleAppsDriveLabelsV2Label{ + 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": "v2/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": "v2/{+name}:publish", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2PublishLabelRequest" + // }, + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2Label" + // } + // } + +} + +// method id "drivelabels.labels.updateLabelCopyMode": + +type LabelsUpdateLabelCopyModeCall struct { + s *Service + name string + googleappsdrivelabelsv2updatelabelcopymoderequest *GoogleAppsDriveLabelsV2UpdateLabelCopyModeRequest + 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, googleappsdrivelabelsv2updatelabelcopymoderequest *GoogleAppsDriveLabelsV2UpdateLabelCopyModeRequest) *LabelsUpdateLabelCopyModeCall { + c := &LabelsUpdateLabelCopyModeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleappsdrivelabelsv2updatelabelcopymoderequest = googleappsdrivelabelsv2updatelabelcopymoderequest + 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.googleappsdrivelabelsv2updatelabelcopymoderequest) + 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}: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 *GoogleAppsDriveLabelsV2Label or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAppsDriveLabelsV2Label.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) (*GoogleAppsDriveLabelsV2Label, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleAppsDriveLabelsV2Label{ + 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": "v2/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": "v2/{+name}:updateLabelCopyMode", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2UpdateLabelCopyModeRequest" + // }, + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2Label" + // } + // } + +} + +// method id "drivelabels.labels.updatePermissions": + +type LabelsUpdatePermissionsCall struct { + s *Service + parent string + googleappsdrivelabelsv2labelpermission *GoogleAppsDriveLabelsV2LabelPermission + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdatePermissions: 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 *LabelsService) UpdatePermissions(parent string, googleappsdrivelabelsv2labelpermission *GoogleAppsDriveLabelsV2LabelPermission) *LabelsUpdatePermissionsCall { + c := &LabelsUpdatePermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleappsdrivelabelsv2labelpermission = googleappsdrivelabelsv2labelpermission + 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 *LabelsUpdatePermissionsCall) UseAdminAccess(useAdminAccess bool) *LabelsUpdatePermissionsCall { + 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 *LabelsUpdatePermissionsCall) Fields(s ...googleapi.Field) *LabelsUpdatePermissionsCall { + 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 *LabelsUpdatePermissionsCall) Context(ctx context.Context) *LabelsUpdatePermissionsCall { + 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 *LabelsUpdatePermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsUpdatePermissionsCall) 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.googleappsdrivelabelsv2labelpermission) + 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}/permissions") + 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.updatePermissions" call. +// Exactly one of *GoogleAppsDriveLabelsV2LabelPermission or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleAppsDriveLabelsV2LabelPermission.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 *LabelsUpdatePermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2LabelPermission, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleAppsDriveLabelsV2LabelPermission{ + 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": "v2/labels/{labelsId}/permissions", + // "httpMethod": "PATCH", + // "id": "drivelabels.labels.updatePermissions", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent 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" + // } + // }, + // "path": "v2/{+parent}/permissions", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2LabelPermission" + // }, + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2LabelPermission" + // } + // } + +} + +// 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 LabelLocks 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, "v2/{+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 *GoogleAppsDriveLabelsV2ListLabelLocksResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAppsDriveLabelsV2ListLabelLocksResponse.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 *LabelsLocksListCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2ListLabelLocksResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleAppsDriveLabelsV2ListLabelLocksResponse{ + 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 LabelLocks on a Label.", + // "flatPath": "v2/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": "v2/{+parent}/locks", + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2ListLabelLocksResponse" + // } + // } + +} + +// 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(*GoogleAppsDriveLabelsV2ListLabelLocksResponse) 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 + parent string + googleappsdrivelabelsv2batchdeletelabelpermissionsrequest *GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest + 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. +// +// - parent: The parent Label resource name shared by all permissions +// being deleted. 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) BatchDelete(parent string, googleappsdrivelabelsv2batchdeletelabelpermissionsrequest *GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest) *LabelsPermissionsBatchDeleteCall { + c := &LabelsPermissionsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleappsdrivelabelsv2batchdeletelabelpermissionsrequest = googleappsdrivelabelsv2batchdeletelabelpermissionsrequest + 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.googleappsdrivelabelsv2batchdeletelabelpermissionsrequest) + 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}/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{ + "parent": c.parent, + }) + 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, gensupport.WrapError(&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, gensupport.WrapError(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": "v2/labels/{labelsId}/permissions:batchDelete", + // "httpMethod": "POST", + // "id": "drivelabels.labels.permissions.batchDelete", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent Label resource name shared by all permissions being deleted. 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": "v2/{+parent}/permissions:batchDelete", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleProtobufEmpty" + // } + // } + +} + +// method id "drivelabels.labels.permissions.batchUpdate": + +type LabelsPermissionsBatchUpdateCall struct { + s *Service + parent string + googleappsdrivelabelsv2batchupdatelabelpermissionsrequest *GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest + 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, googleappsdrivelabelsv2batchupdatelabelpermissionsrequest *GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest) *LabelsPermissionsBatchUpdateCall { + c := &LabelsPermissionsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleappsdrivelabelsv2batchupdatelabelpermissionsrequest = googleappsdrivelabelsv2batchupdatelabelpermissionsrequest + 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.googleappsdrivelabelsv2batchupdatelabelpermissionsrequest) + 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}/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 +// *GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse.ServerResp +// onse.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) (*GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse{ + 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": "v2/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": "v2/{+parent}/permissions:batchUpdate", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse" + // } + // } + +} + +// method id "drivelabels.labels.permissions.create": + +type LabelsPermissionsCreateCall struct { + s *Service + parent string + googleappsdrivelabelsv2labelpermission *GoogleAppsDriveLabelsV2LabelPermission + 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, googleappsdrivelabelsv2labelpermission *GoogleAppsDriveLabelsV2LabelPermission) *LabelsPermissionsCreateCall { + c := &LabelsPermissionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleappsdrivelabelsv2labelpermission = googleappsdrivelabelsv2labelpermission + 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.googleappsdrivelabelsv2labelpermission) + 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}/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 *GoogleAppsDriveLabelsV2LabelPermission or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleAppsDriveLabelsV2LabelPermission.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) (*GoogleAppsDriveLabelsV2LabelPermission, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleAppsDriveLabelsV2LabelPermission{ + 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": "v2/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": "v2/{+parent}/permissions", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2LabelPermission" + // }, + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2LabelPermission" + // } + // } + +} + +// 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, "v2/{+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, gensupport.WrapError(&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, gensupport.WrapError(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": "v2/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": "v2/{+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, "v2/{+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 *GoogleAppsDriveLabelsV2ListLabelPermissionsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleAppsDriveLabelsV2ListLabelPermissionsResponse.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 *LabelsPermissionsListCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2ListLabelPermissionsResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleAppsDriveLabelsV2ListLabelPermissionsResponse{ + 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": "v2/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": "v2/{+parent}/permissions", + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2ListLabelPermissionsResponse" + // } + // } + +} + +// 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(*GoogleAppsDriveLabelsV2ListLabelPermissionsResponse) 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.updatePermissions": + +type LabelsRevisionsUpdatePermissionsCall struct { + s *Service + parent string + googleappsdrivelabelsv2labelpermission *GoogleAppsDriveLabelsV2LabelPermission + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdatePermissions: 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 *LabelsRevisionsService) UpdatePermissions(parent string, googleappsdrivelabelsv2labelpermission *GoogleAppsDriveLabelsV2LabelPermission) *LabelsRevisionsUpdatePermissionsCall { + c := &LabelsRevisionsUpdatePermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleappsdrivelabelsv2labelpermission = googleappsdrivelabelsv2labelpermission + 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 *LabelsRevisionsUpdatePermissionsCall) UseAdminAccess(useAdminAccess bool) *LabelsRevisionsUpdatePermissionsCall { + 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 *LabelsRevisionsUpdatePermissionsCall) Fields(s ...googleapi.Field) *LabelsRevisionsUpdatePermissionsCall { + 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 *LabelsRevisionsUpdatePermissionsCall) Context(ctx context.Context) *LabelsRevisionsUpdatePermissionsCall { + 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 *LabelsRevisionsUpdatePermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsRevisionsUpdatePermissionsCall) 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.googleappsdrivelabelsv2labelpermission) + 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}/permissions") + 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.updatePermissions" call. +// Exactly one of *GoogleAppsDriveLabelsV2LabelPermission or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleAppsDriveLabelsV2LabelPermission.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 *LabelsRevisionsUpdatePermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2LabelPermission, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleAppsDriveLabelsV2LabelPermission{ + 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": "v2/labels/{labelsId}/revisions/{revisionsId}/permissions", + // "httpMethod": "PATCH", + // "id": "drivelabels.labels.revisions.updatePermissions", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent Label resource name.", + // "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": "v2/{+parent}/permissions", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2LabelPermission" + // }, + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2LabelPermission" + // } + // } + +} + +// 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 LabelLocks 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, "v2/{+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 *GoogleAppsDriveLabelsV2ListLabelLocksResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAppsDriveLabelsV2ListLabelLocksResponse.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 *LabelsRevisionsLocksListCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2ListLabelLocksResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleAppsDriveLabelsV2ListLabelLocksResponse{ + 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 LabelLocks on a Label.", + // "flatPath": "v2/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": "v2/{+parent}/locks", + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2ListLabelLocksResponse" + // } + // } + +} + +// 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(*GoogleAppsDriveLabelsV2ListLabelLocksResponse) 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 + parent string + googleappsdrivelabelsv2batchdeletelabelpermissionsrequest *GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest + 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. +// +// - parent: The parent Label resource name shared by all permissions +// being deleted. 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) BatchDelete(parent string, googleappsdrivelabelsv2batchdeletelabelpermissionsrequest *GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest) *LabelsRevisionsPermissionsBatchDeleteCall { + c := &LabelsRevisionsPermissionsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleappsdrivelabelsv2batchdeletelabelpermissionsrequest = googleappsdrivelabelsv2batchdeletelabelpermissionsrequest + 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.googleappsdrivelabelsv2batchdeletelabelpermissionsrequest) + 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}/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{ + "parent": c.parent, + }) + 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, gensupport.WrapError(&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, gensupport.WrapError(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": "v2/labels/{labelsId}/revisions/{revisionsId}/permissions:batchDelete", + // "httpMethod": "POST", + // "id": "drivelabels.labels.revisions.permissions.batchDelete", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent Label resource name shared by all permissions being deleted. 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": "v2/{+parent}/permissions:batchDelete", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleProtobufEmpty" + // } + // } + +} + +// method id "drivelabels.labels.revisions.permissions.batchUpdate": + +type LabelsRevisionsPermissionsBatchUpdateCall struct { + s *Service + parent string + googleappsdrivelabelsv2batchupdatelabelpermissionsrequest *GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest + 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, googleappsdrivelabelsv2batchupdatelabelpermissionsrequest *GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest) *LabelsRevisionsPermissionsBatchUpdateCall { + c := &LabelsRevisionsPermissionsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleappsdrivelabelsv2batchupdatelabelpermissionsrequest = googleappsdrivelabelsv2batchupdatelabelpermissionsrequest + 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.googleappsdrivelabelsv2batchupdatelabelpermissionsrequest) + 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}/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 +// *GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse.ServerResp +// onse.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) (*GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse{ + 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": "v2/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": "v2/{+parent}/permissions:batchUpdate", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse" + // } + // } + +} + +// method id "drivelabels.labels.revisions.permissions.create": + +type LabelsRevisionsPermissionsCreateCall struct { + s *Service + parent string + googleappsdrivelabelsv2labelpermission *GoogleAppsDriveLabelsV2LabelPermission + 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, googleappsdrivelabelsv2labelpermission *GoogleAppsDriveLabelsV2LabelPermission) *LabelsRevisionsPermissionsCreateCall { + c := &LabelsRevisionsPermissionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleappsdrivelabelsv2labelpermission = googleappsdrivelabelsv2labelpermission + 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.googleappsdrivelabelsv2labelpermission) + 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}/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 *GoogleAppsDriveLabelsV2LabelPermission or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleAppsDriveLabelsV2LabelPermission.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) (*GoogleAppsDriveLabelsV2LabelPermission, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleAppsDriveLabelsV2LabelPermission{ + 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": "v2/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": "v2/{+parent}/permissions", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2LabelPermission" + // }, + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2LabelPermission" + // } + // } + +} + +// 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, "v2/{+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, gensupport.WrapError(&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, gensupport.WrapError(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": "v2/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": "v2/{+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 +} - // Green: The amount of green in the color as a value in the interval - // [0, 1]. - Green float64 `json:"green,omitempty"` +// 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 +} - // Red: The amount of red in the color as a value in the interval [0, - // 1]. - Red float64 `json:"red,omitempty"` +// 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 +} - // 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:"-"` +// 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 +} - // 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:"-"` +// 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 } -func (s *GoogleTypeColor) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeColor - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// 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 (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 +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 } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - s.Alpha = float64(s1.Alpha) - s.Blue = float64(s1.Blue) - s.Green = float64(s1.Green) - s.Red = float64(s1.Red) - return nil + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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) } -// 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:"-"` +// Do executes the "drivelabels.labels.revisions.permissions.list" call. +// Exactly one of *GoogleAppsDriveLabelsV2ListLabelPermissionsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleAppsDriveLabelsV2ListLabelPermissionsResponse.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 *LabelsRevisionsPermissionsListCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2ListLabelPermissionsResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleAppsDriveLabelsV2ListLabelPermissionsResponse{ + 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": "v2/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": "v2/{+parent}/permissions", + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2ListLabelPermissionsResponse" + // } + // } - // 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) +// 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(*GoogleAppsDriveLabelsV2ListLabelPermissionsResponse) 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.get": +// method id "drivelabels.limits.getLabel": -type LabelsGetCall struct { +type LimitsGetLabelCall 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 `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 are 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 -// verifies that 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)) +// 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 } -// View sets the optional parameter "view": When specified, only certain -// fields belonging to the indicated view are 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) +// 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 *LabelsGetCall) Fields(s ...googleapi.Field) *LabelsGetCall { +func (c *LimitsGetLabelCall) Fields(s ...googleapi.Field) *LimitsGetLabelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1664,7 +7433,7 @@ func (c *LabelsGetCall) Fields(s ...googleapi.Field) *LabelsGetCall { // 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 { +func (c *LimitsGetLabelCall) IfNoneMatch(entityTag string) *LimitsGetLabelCall { c.ifNoneMatch_ = entityTag return c } @@ -1672,21 +7441,21 @@ func (c *LabelsGetCall) IfNoneMatch(entityTag string) *LabelsGetCall { // 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 { +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 *LabelsGetCall) Header() http.Header { +func (c *LimitsGetLabelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LabelsGetCall) doRequest(alt string) (*http.Response, error) { +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_ { @@ -1699,27 +7468,25 @@ func (c *LabelsGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil 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/limits/label") 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 *GoogleAppsDriveLabelsV2Label or error will be +// Do executes the "drivelabels.limits.getLabel" call. +// Exactly one of *GoogleAppsDriveLabelsV2LabelLimits or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleAppsDriveLabelsV2Label.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) (*GoogleAppsDriveLabelsV2Label, error) { +// either *GoogleAppsDriveLabelsV2LabelLimits.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) (*GoogleAppsDriveLabelsV2LabelLimits, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1738,7 +7505,7 @@ func (c *LabelsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabels if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAppsDriveLabelsV2Label{ + ret := &GoogleAppsDriveLabelsV2LabelLimits{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1750,159 +7517,51 @@ func (c *LabelsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabels } return ret, nil // { - // "description": "Get a label by its resource name. Resource name may be any of: * `labels/{id}` - See `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": "v2/labels/{labelsId}", + // "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": "v2/limits/label", // "httpMethod": "GET", - // "id": "drivelabels.labels.get", - // "parameterOrder": [ - // "name" - // ], + // "id": "drivelabels.limits.getLabel", + // "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 are 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 verifies that 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 are returned.", - // "enum": [ - // "LABEL_VIEW_BASIC", - // "LABEL_VIEW_FULL" - // ], - // "enumDescriptions": [ - // "Implies the field mask: `name,id,revision_id,label_type,properties.*`", - // "All possible fields." - // ], + // "description": "Required. Label revision resource name Must be: \"limits/label\"", // "location": "query", // "type": "string" // } // }, - // "path": "v2/{+name}", + // "path": "v2/limits/label", // "response": { - // "$ref": "GoogleAppsDriveLabelsV2Label" + // "$ref": "GoogleAppsDriveLabelsV2LabelLimits" // } // } } -// method id "drivelabels.labels.list": +// method id "drivelabels.users.getCapabilities": -type LabelsListCall struct { +type UsersGetCapabilitiesCall struct { s *Service + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: 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 are 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 can pin this label in shared drives they -// -// manage and add new appliers to the label. -// -// "EDITOR" - Editors can make any update including deleting the label -// -// which also deletes the 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 are returned. Disabled labels are -// included. Returned label resource names reference the published -// revision (`labels/{id}/{revision_id}`). * When `false`, the current -// label revisions are returned, which might not be published. Returned -// label resource names don't 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 are returned. -// -// Possible values: +// GetCapabilities: Gets the user capabilities. // -// "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) +// - 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 *LabelsListCall) Fields(s ...googleapi.Field) *LabelsListCall { +func (c *UsersGetCapabilitiesCall) Fields(s ...googleapi.Field) *UsersGetCapabilitiesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1912,7 +7571,7 @@ func (c *LabelsListCall) Fields(s ...googleapi.Field) *LabelsListCall { // 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 { +func (c *UsersGetCapabilitiesCall) IfNoneMatch(entityTag string) *UsersGetCapabilitiesCall { c.ifNoneMatch_ = entityTag return c } @@ -1920,21 +7579,21 @@ func (c *LabelsListCall) IfNoneMatch(entityTag string) *LabelsListCall { // 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 { +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 *LabelsListCall) Header() http.Header { +func (c *UsersGetCapabilitiesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LabelsListCall) doRequest(alt string) (*http.Response, error) { +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_ { @@ -1947,26 +7606,28 @@ func (c *LabelsListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/labels") + 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 "drivelabels.labels.list" call. -// Exactly one of *GoogleAppsDriveLabelsV2ListLabelsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAppsDriveLabelsV2ListLabelsResponse.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) (*GoogleAppsDriveLabelsV2ListLabelsResponse, error) { +// Do executes the "drivelabels.users.getCapabilities" call. +// Exactly one of *GoogleAppsDriveLabelsV2UserCapabilities or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleAppsDriveLabelsV2UserCapabilities.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) (*GoogleAppsDriveLabelsV2UserCapabilities, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1985,7 +7646,7 @@ func (c *LabelsListCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabel if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAppsDriveLabelsV2ListLabelsResponse{ + ret := &GoogleAppsDriveLabelsV2UserCapabilities{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1997,96 +7658,26 @@ func (c *LabelsListCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabel } return ret, nil // { - // "description": "List labels.", - // "flatPath": "v2/labels", + // "description": "Gets the user capabilities.", + // "flatPath": "v2/users/{usersId}/capabilities", // "httpMethod": "GET", - // "id": "drivelabels.labels.list", - // "parameterOrder": [], + // "id": "drivelabels.users.getCapabilities", + // "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 are 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 can pin this label in shared drives they manage and add new appliers to the label.", - // "Editors can make any update including deleting the label which also deletes the 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 are returned. Disabled labels are included. Returned label resource names reference the published revision (`labels/{id}/{revision_id}`). * When `false`, the current label revisions are returned, which might not be published. Returned label resource names don't 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 are 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", + // "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": "v2/labels", + // "path": "v2/{+name}", // "response": { - // "$ref": "GoogleAppsDriveLabelsV2ListLabelsResponse" + // "$ref": "GoogleAppsDriveLabelsV2UserCapabilities" // } // } } - -// 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(*GoogleAppsDriveLabelsV2ListLabelsResponse) 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) - } -} diff --git a/gkebackup/v1/gkebackup-api.json b/gkebackup/v1/gkebackup-api.json index 8740be9a376..7be89051bfe 100644 --- a/gkebackup/v1/gkebackup-api.json +++ b/gkebackup/v1/gkebackup-api.json @@ -1688,7 +1688,7 @@ } } }, - "revision": "20230131", + "revision": "20230220", "rootUrl": "https://gkebackup.googleapis.com/", "schemas": { "AuditConfig": { @@ -2063,11 +2063,11 @@ "type": "object" }, "ClusterResourceRestoreScope": { - "description": "Identifies the cluster-scoped resources to restore from the Backup.", + "description": "Defines the scope of cluster-scoped resources to restore. Some group kinds are not reasonable choices for a restore, and will cause an error if selected here. Any scope selection that would restore \"all valid\" resources automatically excludes these group kinds. - gkebackup.gke.io/BackupJob - gkebackup.gke.io/RestoreJob - metrics.k8s.io/NodeMetrics - migration.k8s.io/StorageState - migration.k8s.io/StorageVersionMigration - Node - snapshot.storage.k8s.io/VolumeSnapshotContent - storage.k8s.io/CSINode Some group kinds are driven by restore configuration elsewhere, and will cause an error if selected here. - Namespace - PersistentVolume", "id": "ClusterResourceRestoreScope", "properties": { "selectedGroupKinds": { - "description": "A list of \"types\" of cluster-scoped resources to be restored from the Backup. An empty list means that NO cluster-scoped resources will be restored. Note that Namespaces and PersistentVolume restoration is handled separately and is not governed by this field.", + "description": "A list of cluster-scoped resource group kinds to restore from the backup. If specified, only the selected resources will be restored. Mutually exclusive to any other field in the message.", "items": { "$ref": "GroupKind" }, @@ -2632,7 +2632,7 @@ "type": "object" }, "RestoreConfig": { - "description": "Configuration of a restore. Next id: 9", + "description": "Configuration of a restore. Next id: 11", "id": "RestoreConfig", "properties": { "allNamespaces": { @@ -2823,7 +2823,7 @@ "type": "string" }, "originalValuePattern": { - "description": "(Filtering parameter) This is a [regular expression] (https://en.wikipedia.org/wiki/Regular_expression) that is compared against the fields matched by the target_json_path expression (and must also have passed the previous filters). Substitution will not be performed against fields whose value does not match this expression. If this field is NOT specified, then ALL fields matched by the target_json_path expression will undergo substitution. Note that an empty (e.g., \"\", rather than unspecified) value for for this field will only match empty fields.", + "description": "(Filtering parameter) This is a [regular expression] (https://en.wikipedia.org/wiki/Regular_expression) that is compared against the fields matched by the target_json_path expression (and must also have passed the previous filters). Substitution will not be performed against fields whose value does not match this expression. If this field is NOT specified, then ALL fields matched by the target_json_path expression will undergo substitution. Note that an empty (e.g., \"\", rather than unspecified) value for this field will only match empty fields.", "type": "string" }, "targetGroupKinds": { diff --git a/gkebackup/v1/gkebackup-gen.go b/gkebackup/v1/gkebackup-gen.go index f1cb794a6cf..15cb49e5bef 100644 --- a/gkebackup/v1/gkebackup-gen.go +++ b/gkebackup/v1/gkebackup-gen.go @@ -778,14 +778,23 @@ func (s *ClusterMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ClusterResourceRestoreScope: Identifies the cluster-scoped resources -// to restore from the Backup. +// ClusterResourceRestoreScope: Defines the scope of cluster-scoped +// resources to restore. Some group kinds are not reasonable choices for +// a restore, and will cause an error if selected here. Any scope +// selection that would restore "all valid" resources automatically +// excludes these group kinds. - gkebackup.gke.io/BackupJob - +// gkebackup.gke.io/RestoreJob - metrics.k8s.io/NodeMetrics - +// migration.k8s.io/StorageState - +// migration.k8s.io/StorageVersionMigration - Node - +// snapshot.storage.k8s.io/VolumeSnapshotContent - +// storage.k8s.io/CSINode Some group kinds are driven by restore +// configuration elsewhere, and will cause an error if selected here. - +// Namespace - PersistentVolume type ClusterResourceRestoreScope struct { - // SelectedGroupKinds: A list of "types" of cluster-scoped resources to - // be restored from the Backup. An empty list means that NO - // cluster-scoped resources will be restored. Note that Namespaces and - // PersistentVolume restoration is handled separately and is not - // governed by this field. + // SelectedGroupKinds: A list of cluster-scoped resource group kinds to + // restore from the backup. If specified, only the selected resources + // will be restored. Mutually exclusive to any other field in the + // message. SelectedGroupKinds []*GroupKind `json:"selectedGroupKinds,omitempty"` // ForceSendFields is a list of field names (e.g. "SelectedGroupKinds") @@ -1795,7 +1804,7 @@ func (s *Restore) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RestoreConfig: Configuration of a restore. Next id: 9 +// RestoreConfig: Configuration of a restore. Next id: 11 type RestoreConfig struct { // AllNamespaces: Restore all namespaced resources in the Backup if set // to "True". Specifying this field to "False" is an error. @@ -2136,7 +2145,7 @@ type SubstitutionRule struct { // not match this expression. If this field is NOT specified, then ALL // fields matched by the target_json_path expression will undergo // substitution. Note that an empty (e.g., "", rather than unspecified) - // value for for this field will only match empty fields. + // value for this field will only match empty fields. OriginalValuePattern string `json:"originalValuePattern,omitempty"` // TargetGroupKinds: (Filtering parameter) Any resource subject to diff --git a/gkehub/v1alpha/gkehub-api.json b/gkehub/v1alpha/gkehub-api.json index 3069c372d03..2604b78ad4d 100644 --- a/gkehub/v1alpha/gkehub-api.json +++ b/gkehub/v1alpha/gkehub-api.json @@ -1503,7 +1503,7 @@ ], "parameters": { "name": { - "description": "The resource name for the rbacrolebinding `projects/{project}/locations/{location}/namespaces/{namespace}/rbacrolebindings/{rbacrolebinding}`", + "description": "The resource name for the rbacrolebinding `projects/{project}/locations/{location}/namespaces/{namespace}/rbacrolebindings/{rbacrolebinding}` or `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/rbacrolebindings/[^/]+$", "required": true, @@ -1816,7 +1816,7 @@ } } }, - "revision": "20230219", + "revision": "20230224", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -4686,7 +4686,7 @@ "type": "string" }, "name": { - "description": "The resource name for the rbacrolebinding `projects/{project}/locations/{location}/namespaces/{namespace}/rbacrolebindings/{rbacrolebinding}`", + "description": "The resource name for the rbacrolebinding `projects/{project}/locations/{location}/namespaces/{namespace}/rbacrolebindings/{rbacrolebinding}` or `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}`", "type": "string" }, "role": { @@ -4786,13 +4786,15 @@ "UNKNOWN", "ADMIN", "EDIT", - "VIEW" + "VIEW", + "ANTHOS_SUPPORT" ], "enumDescriptions": [ "UNKNOWN", "ADMIN has EDIT and RBAC permissions", "EDIT can edit all resources except RBAC", - "VIEW can only read resources" + "VIEW can only read resources", + "ANTHOS_SUPPORT gives Google Support read-only access to a number of cluster resources." ], "type": "string" } diff --git a/gkehub/v1alpha/gkehub-gen.go b/gkehub/v1alpha/gkehub-gen.go index ef933c05521..b8fcc8fb30d 100644 --- a/gkehub/v1alpha/gkehub-gen.go +++ b/gkehub/v1alpha/gkehub-gen.go @@ -4960,7 +4960,9 @@ type RBACRoleBinding struct { // Name: The resource name for the rbacrolebinding // `projects/{project}/locations/{location}/namespaces/{namespace}/rbacro - // lebindings/{rbacrolebinding}` + // lebindings/{rbacrolebinding}` or + // `projects/{project}/locations/{location}/memberships/{membership}/rbac + // rolebindings/{rbacrolebinding}` Name string `json:"name,omitempty"` // Role: Required. Role to bind to the principal @@ -5134,6 +5136,8 @@ type Role struct { // "ADMIN" - ADMIN has EDIT and RBAC permissions // "EDIT" - EDIT can edit all resources except RBAC // "VIEW" - VIEW can only read resources + // "ANTHOS_SUPPORT" - ANTHOS_SUPPORT gives Google Support read-only + // access to a number of cluster resources. PredefinedRole string `json:"predefinedRole,omitempty"` // ForceSendFields is a list of field names (e.g. "PredefinedRole") to @@ -12879,7 +12883,9 @@ type ProjectsLocationsNamespacesRbacrolebindingsPatchCall struct { // // - name: The resource name for the rbacrolebinding // `projects/{project}/locations/{location}/namespaces/{namespace}/rbac -// rolebindings/{rbacrolebinding}`. +// rolebindings/{rbacrolebinding}` or +// `projects/{project}/locations/{location}/memberships/{membership}/rb +// acrolebindings/{rbacrolebinding}`. func (r *ProjectsLocationsNamespacesRbacrolebindingsService) Patch(name string, rbacrolebinding *RBACRoleBinding) *ProjectsLocationsNamespacesRbacrolebindingsPatchCall { c := &ProjectsLocationsNamespacesRbacrolebindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -12994,7 +13000,7 @@ func (c *ProjectsLocationsNamespacesRbacrolebindingsPatchCall) Do(opts ...google // ], // "parameters": { // "name": { - // "description": "The resource name for the rbacrolebinding `projects/{project}/locations/{location}/namespaces/{namespace}/rbacrolebindings/{rbacrolebinding}`", + // "description": "The resource name for the rbacrolebinding `projects/{project}/locations/{location}/namespaces/{namespace}/rbacrolebindings/{rbacrolebinding}` or `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/rbacrolebindings/[^/]+$", // "required": true, diff --git a/gkehub/v1beta/gkehub-api.json b/gkehub/v1beta/gkehub-api.json index 0351025ef70..8ffda24fd63 100644 --- a/gkehub/v1beta/gkehub-api.json +++ b/gkehub/v1beta/gkehub-api.json @@ -989,7 +989,7 @@ ], "parameters": { "name": { - "description": "The resource name for the rbacrolebinding `projects/{project}/locations/{location}/namespaces/{namespace}/rbacrolebindings/{rbacrolebinding}`", + "description": "The resource name for the rbacrolebinding `projects/{project}/locations/{location}/namespaces/{namespace}/rbacrolebindings/{rbacrolebinding}` or `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/rbacrolebindings/[^/]+$", "required": true, @@ -1302,7 +1302,7 @@ } } }, - "revision": "20230219", + "revision": "20230224", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -3600,7 +3600,7 @@ "type": "string" }, "name": { - "description": "The resource name for the rbacrolebinding `projects/{project}/locations/{location}/namespaces/{namespace}/rbacrolebindings/{rbacrolebinding}`", + "description": "The resource name for the rbacrolebinding `projects/{project}/locations/{location}/namespaces/{namespace}/rbacrolebindings/{rbacrolebinding}` or `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}`", "type": "string" }, "role": { @@ -3666,13 +3666,15 @@ "UNKNOWN", "ADMIN", "EDIT", - "VIEW" + "VIEW", + "ANTHOS_SUPPORT" ], "enumDescriptions": [ "UNKNOWN", "ADMIN has EDIT and RBAC permissions", "EDIT can edit all resources except RBAC", - "VIEW can only read resources" + "VIEW can only read resources", + "ANTHOS_SUPPORT gives Google Support read-only access to a number of cluster resources." ], "type": "string" } diff --git a/gkehub/v1beta/gkehub-gen.go b/gkehub/v1beta/gkehub-gen.go index 7d0d421bda5..dd5efa21e68 100644 --- a/gkehub/v1beta/gkehub-gen.go +++ b/gkehub/v1beta/gkehub-gen.go @@ -3942,7 +3942,9 @@ type RBACRoleBinding struct { // Name: The resource name for the rbacrolebinding // `projects/{project}/locations/{location}/namespaces/{namespace}/rbacro - // lebindings/{rbacrolebinding}` + // lebindings/{rbacrolebinding}` or + // `projects/{project}/locations/{location}/memberships/{membership}/rbac + // rolebindings/{rbacrolebinding}` Name string `json:"name,omitempty"` // Role: Required. Role to bind to the principal @@ -4036,6 +4038,8 @@ type Role struct { // "ADMIN" - ADMIN has EDIT and RBAC permissions // "EDIT" - EDIT can edit all resources except RBAC // "VIEW" - VIEW can only read resources + // "ANTHOS_SUPPORT" - ANTHOS_SUPPORT gives Google Support read-only + // access to a number of cluster resources. PredefinedRole string `json:"predefinedRole,omitempty"` // ForceSendFields is a list of field names (e.g. "PredefinedRole") to @@ -8967,7 +8971,9 @@ type ProjectsLocationsNamespacesRbacrolebindingsPatchCall struct { // // - name: The resource name for the rbacrolebinding // `projects/{project}/locations/{location}/namespaces/{namespace}/rbac -// rolebindings/{rbacrolebinding}`. +// rolebindings/{rbacrolebinding}` or +// `projects/{project}/locations/{location}/memberships/{membership}/rb +// acrolebindings/{rbacrolebinding}`. func (r *ProjectsLocationsNamespacesRbacrolebindingsService) Patch(name string, rbacrolebinding *RBACRoleBinding) *ProjectsLocationsNamespacesRbacrolebindingsPatchCall { c := &ProjectsLocationsNamespacesRbacrolebindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -9082,7 +9088,7 @@ func (c *ProjectsLocationsNamespacesRbacrolebindingsPatchCall) Do(opts ...google // ], // "parameters": { // "name": { - // "description": "The resource name for the rbacrolebinding `projects/{project}/locations/{location}/namespaces/{namespace}/rbacrolebindings/{rbacrolebinding}`", + // "description": "The resource name for the rbacrolebinding `projects/{project}/locations/{location}/namespaces/{namespace}/rbacrolebindings/{rbacrolebinding}` or `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/rbacrolebindings/[^/]+$", // "required": true, diff --git a/healthcare/v1beta1/healthcare-api.json b/healthcare/v1beta1/healthcare-api.json index 8f23798d78b..8f1837880fb 100644 --- a/healthcare/v1beta1/healthcare-api.json +++ b/healthcare/v1beta1/healthcare-api.json @@ -4890,7 +4890,7 @@ } } }, - "revision": "20230207", + "revision": "20230223", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "Action": { @@ -6331,7 +6331,7 @@ "id": "FhirNotificationConfig", "properties": { "pubsubTopic": { - "description": "The [Pub/Sub](https://cloud.google.com/pubsub/docs/) topic that notifications of changes are published on. Supplied by the client. The notification is a `PubsubMessage` with the following fields: * `PubsubMessage.Data` contains the resource name. * `PubsubMessage.MessageId` is the ID of this notification. It is guaranteed to be unique within the topic. * `PubsubMessage.PublishTime` is the time when the message was published. Note that notifications are only sent if the topic is non-empty. [Topic names](https://cloud.google.com/pubsub/docs/overview#names) must be scoped to a project. The Cloud Healthcare API service account, service-@gcp-sa-healthcare.iam.gserviceaccount.com, must have publisher permissions on the given Pub/Sub topic. Not having adequate permissions causes the calls that send notifications to fail. If a notification can't be published to Pub/Sub, errors are logged to Cloud Logging. For more information, see [Viewing error logs in Cloud Logging](https://cloud.google.com/healthcare-api/docs/how-tos/logging).", + "description": "The [Pub/Sub](https://cloud.google.com/pubsub/docs/) topic that notifications of changes are published on. Supplied by the client. The notification is a `PubsubMessage` with the following fields: * `PubsubMessage.Data` contains the resource name. * `PubsubMessage.MessageId` is the ID of this notification. It is guaranteed to be unique within the topic. * `PubsubMessage.PublishTime` is the time when the message was published. Note that notifications are only sent if the topic is non-empty. [Topic names](https://cloud.google.com/pubsub/docs/overview#names) must be scoped to a project. The Cloud Healthcare API service account, service-@gcp-sa-healthcare.iam.gserviceaccount.com, must have publisher permissions on the given Pub/Sub topic. Not having adequate permissions causes the calls that send notifications to fail (https://cloud.google.com/healthcare-api/docs/permissions-healthcare-api-gcp-products#dicom_fhir_and_hl7v2_store_cloud_pubsub_permissions). If a notification can't be published to Pub/Sub, errors are logged to Cloud Logging. For more information, see [Viewing error logs in Cloud Logging](https://cloud.google.com/healthcare-api/docs/how-tos/logging).", "type": "string" }, "sendFullResource": { diff --git a/healthcare/v1beta1/healthcare-gen.go b/healthcare/v1beta1/healthcare-gen.go index 7b5870de5b2..2495daa3f64 100644 --- a/healthcare/v1beta1/healthcare-gen.go +++ b/healthcare/v1beta1/healthcare-gen.go @@ -3151,8 +3151,9 @@ type FhirNotificationConfig struct { // to a project. The Cloud Healthcare API service account, // service-@gcp-sa-healthcare.iam.gserviceaccount.com, must have // publisher permissions on the given Pub/Sub topic. Not having adequate - // permissions causes the calls that send notifications to fail. If a - // notification can't be published to Pub/Sub, errors are logged to + // permissions causes the calls that send notifications to fail + // (https://cloud.google.com/healthcare-api/docs/permissions-healthcare-api-gcp-products#dicom_fhir_and_hl7v2_store_cloud_pubsub_permissions). + // If a notification can't be published to Pub/Sub, errors are logged to // Cloud Logging. For more information, see Viewing error logs in Cloud // Logging // (https://cloud.google.com/healthcare-api/docs/how-tos/logging). diff --git a/managedidentities/v1alpha1/managedidentities-api.json b/managedidentities/v1alpha1/managedidentities-api.json index 79f0e3226fb..9f9fccfea1e 100644 --- a/managedidentities/v1alpha1/managedidentities-api.json +++ b/managedidentities/v1alpha1/managedidentities-api.json @@ -1515,7 +1515,7 @@ } } }, - "revision": "20221227", + "revision": "20230227", "rootUrl": "https://managedidentities.googleapis.com/", "schemas": { "AttachTrustRequest": { @@ -1613,7 +1613,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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `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`. ", + "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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `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`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `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.", "items": { "type": "string" }, @@ -2072,10 +2072,11 @@ "type": "object" }, "GoogleCloudSaasacceleratorManagementProvidersV1Instance": { + "description": "Instance represents the interface for SLM services to actuate the state of control plane resources. Example Instance in JSON, where consumer-project-number=123456, producer-project-id=cloud-sql: ```json Instance: { \"name\": \"projects/123456/locations/us-east1/instances/prod-instance\", \"create_time\": { \"seconds\": 1526406431, }, \"labels\": { \"env\": \"prod\", \"foo\": \"bar\" }, \"state\": READY, \"software_versions\": { \"software_update\": \"cloud-sql-09-28-2018\", }, \"maintenance_policy_names\": { \"UpdatePolicy\": \"projects/123456/locations/us-east1/maintenancePolicies/prod-update-policy\", } \"tenant_project_id\": \"cloud-sql-test-tenant\", \"producer_metadata\": { \"cloud-sql-tier\": \"basic\", \"cloud-sql-instance-size\": \"1G\", }, \"provisioned_resources\": [ { \"resource-type\": \"compute-instance\", \"resource-url\": \"https://www.googleapis.com/compute/v1/projects/cloud-sql/zones/us-east1-b/instances/vm-1\", } ], \"maintenance_schedules\": { \"csa_rollout\": { \"start_time\": { \"seconds\": 1526406431, }, \"end_time\": { \"seconds\": 1535406431, }, }, \"ncsa_rollout\": { \"start_time\": { \"seconds\": 1526406431, }, \"end_time\": { \"seconds\": 1535406431, }, } }, \"consumer_defined_name\": \"my-sql-instance1\", } ``` LINT.IfChange", "id": "GoogleCloudSaasacceleratorManagementProvidersV1Instance", "properties": { "consumerDefinedName": { - "description": "consumer_defined_name is the name that is set by the consumer. On the other hand Name field represents system-assigned id of an instance so consumers are not necessarily aware of it. consumer_defined_name is used for notification/UI purposes for consumer to recognize their instances.", + "description": "consumer_defined_name is the name of the instance set by the service consumers. Generally this is different from the `name` field which reperesents the system-assigned id of the instance which the service consumers do not recognize. This is a required field for tenants onboarding to Maintenance Window notifications (go/slm-rollout-maintenance-policies#prerequisites).", "type": "string" }, "createTime": { @@ -2099,7 +2100,7 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. Deprecated. The MaintenancePolicies that have been attached to the instance. The key must be of the type name of the oneof policy name defined in MaintenancePolicy, and the referenced policy must define the same policy type. For complete details of MaintenancePolicy, please refer to go/cloud-saas-mw-ug.", + "description": "Optional. The MaintenancePolicies that have been attached to the instance. The key must be of the type name of the oneof policy name defined in MaintenancePolicy, and the referenced policy must define the same policy type. For details, please refer to go/cloud-saas-mw-ug. Should not be set if maintenance_settings.maintenance_policies is set.", "type": "object" }, "maintenanceSchedules": { @@ -2239,7 +2240,7 @@ "additionalProperties": { "$ref": "MaintenancePolicy" }, - "description": "Optional. The MaintenancePolicies that have been attached to the instance. The key must be of the type name of the oneof policy name defined in MaintenancePolicy, and the embedded policy must define the same policy type. For complete details of MaintenancePolicy, please refer to go/cloud-saas-mw-ug. If only the name is needed, then only populate MaintenancePolicy.name.", + "description": "Optional. The MaintenancePolicies that have been attached to the instance. The key must be of the type name of the oneof policy name defined in MaintenancePolicy, and the embedded policy must define the same policy type. For details, please refer to go/cloud-saas-mw-ug. Should not be set if maintenance_policy_names is set. If only the name is needed, then only populate MaintenancePolicy.name.", "type": "object" } }, diff --git a/managedidentities/v1alpha1/managedidentities-gen.go b/managedidentities/v1alpha1/managedidentities-gen.go index 0c872598442..d0409cfe1ae 100644 --- a/managedidentities/v1alpha1/managedidentities-gen.go +++ b/managedidentities/v1alpha1/managedidentities-gen.go @@ -358,7 +358,9 @@ type Binding struct { // (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`. * + // For example, `admins@example.com`. * `domain:{domain}`: The G Suite + // domain (primary) that represents all the users of that domain. For + // example, `google.com` or `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`. @@ -375,9 +377,7 @@ type Binding struct { // 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`. + // group retains the role in the binding. Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. @@ -1114,12 +1114,34 @@ func (s *GoogleCloudManagedidentitiesV1beta1OpMetadata) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudSaasacceleratorManagementProvidersV1Instance: Instance +// represents the interface for SLM services to actuate the state of +// control plane resources. Example Instance in JSON, where +// consumer-project-number=123456, producer-project-id=cloud-sql: +// ```json Instance: { "name": +// "projects/123456/locations/us-east1/instances/prod-instance", +// "create_time": { "seconds": 1526406431, }, "labels": { "env": "prod", +// "foo": "bar" }, "state": READY, "software_versions": { +// "software_update": "cloud-sql-09-28-2018", }, +// "maintenance_policy_names": { "UpdatePolicy": +// "projects/123456/locations/us-east1/maintenancePolicies/prod-update-po +// licy", } "tenant_project_id": "cloud-sql-test-tenant", +// "producer_metadata": { "cloud-sql-tier": "basic", +// "cloud-sql-instance-size": "1G", }, "provisioned_resources": [ { +// "resource-type": "compute-instance", "resource-url": +// "https://www.googleapis.com/compute/v1/projects/cloud-sql/zones/us-eas +// t1-b/instances/vm-1", } ], "maintenance_schedules": { "csa_rollout": +// { "start_time": { "seconds": 1526406431, }, "end_time": { "seconds": +// 1535406431, }, }, "ncsa_rollout": { "start_time": { "seconds": +// 1526406431, }, "end_time": { "seconds": 1535406431, }, } }, +// "consumer_defined_name": "my-sql-instance1", } ``` LINT.IfChange type GoogleCloudSaasacceleratorManagementProvidersV1Instance struct { - // ConsumerDefinedName: consumer_defined_name is the name that is set by - // the consumer. On the other hand Name field represents system-assigned - // id of an instance so consumers are not necessarily aware of it. - // consumer_defined_name is used for notification/UI purposes for - // consumer to recognize their instances. + // ConsumerDefinedName: consumer_defined_name is the name of the + // instance set by the service consumers. Generally this is different + // from the `name` field which reperesents the system-assigned id of the + // instance which the service consumers do not recognize. This is a + // required field for tenants onboarding to Maintenance Window + // notifications (go/slm-rollout-maintenance-policies#prerequisites). ConsumerDefinedName string `json:"consumerDefinedName,omitempty"` // CreateTime: Output only. Timestamp when the resource was created. @@ -1139,11 +1161,12 @@ type GoogleCloudSaasacceleratorManagementProvidersV1Instance struct { // value are arbitrary strings provided by the user. Labels map[string]string `json:"labels,omitempty"` - // MaintenancePolicyNames: Optional. Deprecated. The MaintenancePolicies - // that have been attached to the instance. The key must be of the type - // name of the oneof policy name defined in MaintenancePolicy, and the - // referenced policy must define the same policy type. For complete - // details of MaintenancePolicy, please refer to go/cloud-saas-mw-ug. + // MaintenancePolicyNames: Optional. The MaintenancePolicies that have + // been attached to the instance. The key must be of the type name of + // the oneof policy name defined in MaintenancePolicy, and the + // referenced policy must define the same policy type. For details, + // please refer to go/cloud-saas-mw-ug. Should not be set if + // maintenance_settings.maintenance_policies is set. MaintenancePolicyNames map[string]string `json:"maintenancePolicyNames,omitempty"` // MaintenanceSchedules: The MaintenanceSchedule contains the scheduling @@ -1310,9 +1333,10 @@ type GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSettings struct { // MaintenancePolicies: Optional. The MaintenancePolicies that have been // attached to the instance. The key must be of the type name of the // oneof policy name defined in MaintenancePolicy, and the embedded - // policy must define the same policy type. For complete details of - // MaintenancePolicy, please refer to go/cloud-saas-mw-ug. If only the - // name is needed, then only populate MaintenancePolicy.name. + // policy must define the same policy type. For details, please refer to + // go/cloud-saas-mw-ug. Should not be set if maintenance_policy_names is + // set. If only the name is needed, then only populate + // MaintenancePolicy.name. MaintenancePolicies map[string]MaintenancePolicy `json:"maintenancePolicies,omitempty"` // ForceSendFields is a list of field names (e.g. "Exclude") to diff --git a/managedidentities/v1beta1/managedidentities-api.json b/managedidentities/v1beta1/managedidentities-api.json index d2b4fe8185c..3d648ddb090 100644 --- a/managedidentities/v1beta1/managedidentities-api.json +++ b/managedidentities/v1beta1/managedidentities-api.json @@ -1515,7 +1515,7 @@ } } }, - "revision": "20221227", + "revision": "20230227", "rootUrl": "https://managedidentities.googleapis.com/", "schemas": { "AttachTrustRequest": { @@ -1614,7 +1614,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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `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`. ", + "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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `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`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `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.", "items": { "type": "string" }, @@ -2081,10 +2081,11 @@ "type": "object" }, "GoogleCloudSaasacceleratorManagementProvidersV1Instance": { + "description": "Instance represents the interface for SLM services to actuate the state of control plane resources. Example Instance in JSON, where consumer-project-number=123456, producer-project-id=cloud-sql: ```json Instance: { \"name\": \"projects/123456/locations/us-east1/instances/prod-instance\", \"create_time\": { \"seconds\": 1526406431, }, \"labels\": { \"env\": \"prod\", \"foo\": \"bar\" }, \"state\": READY, \"software_versions\": { \"software_update\": \"cloud-sql-09-28-2018\", }, \"maintenance_policy_names\": { \"UpdatePolicy\": \"projects/123456/locations/us-east1/maintenancePolicies/prod-update-policy\", } \"tenant_project_id\": \"cloud-sql-test-tenant\", \"producer_metadata\": { \"cloud-sql-tier\": \"basic\", \"cloud-sql-instance-size\": \"1G\", }, \"provisioned_resources\": [ { \"resource-type\": \"compute-instance\", \"resource-url\": \"https://www.googleapis.com/compute/v1/projects/cloud-sql/zones/us-east1-b/instances/vm-1\", } ], \"maintenance_schedules\": { \"csa_rollout\": { \"start_time\": { \"seconds\": 1526406431, }, \"end_time\": { \"seconds\": 1535406431, }, }, \"ncsa_rollout\": { \"start_time\": { \"seconds\": 1526406431, }, \"end_time\": { \"seconds\": 1535406431, }, } }, \"consumer_defined_name\": \"my-sql-instance1\", } ``` LINT.IfChange", "id": "GoogleCloudSaasacceleratorManagementProvidersV1Instance", "properties": { "consumerDefinedName": { - "description": "consumer_defined_name is the name that is set by the consumer. On the other hand Name field represents system-assigned id of an instance so consumers are not necessarily aware of it. consumer_defined_name is used for notification/UI purposes for consumer to recognize their instances.", + "description": "consumer_defined_name is the name of the instance set by the service consumers. Generally this is different from the `name` field which reperesents the system-assigned id of the instance which the service consumers do not recognize. This is a required field for tenants onboarding to Maintenance Window notifications (go/slm-rollout-maintenance-policies#prerequisites).", "type": "string" }, "createTime": { @@ -2108,7 +2109,7 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. Deprecated. The MaintenancePolicies that have been attached to the instance. The key must be of the type name of the oneof policy name defined in MaintenancePolicy, and the referenced policy must define the same policy type. For complete details of MaintenancePolicy, please refer to go/cloud-saas-mw-ug.", + "description": "Optional. The MaintenancePolicies that have been attached to the instance. The key must be of the type name of the oneof policy name defined in MaintenancePolicy, and the referenced policy must define the same policy type. For details, please refer to go/cloud-saas-mw-ug. Should not be set if maintenance_settings.maintenance_policies is set.", "type": "object" }, "maintenanceSchedules": { @@ -2248,7 +2249,7 @@ "additionalProperties": { "$ref": "MaintenancePolicy" }, - "description": "Optional. The MaintenancePolicies that have been attached to the instance. The key must be of the type name of the oneof policy name defined in MaintenancePolicy, and the embedded policy must define the same policy type. For complete details of MaintenancePolicy, please refer to go/cloud-saas-mw-ug. If only the name is needed, then only populate MaintenancePolicy.name.", + "description": "Optional. The MaintenancePolicies that have been attached to the instance. The key must be of the type name of the oneof policy name defined in MaintenancePolicy, and the embedded policy must define the same policy type. For details, please refer to go/cloud-saas-mw-ug. Should not be set if maintenance_policy_names is set. If only the name is needed, then only populate MaintenancePolicy.name.", "type": "object" } }, diff --git a/managedidentities/v1beta1/managedidentities-gen.go b/managedidentities/v1beta1/managedidentities-gen.go index 2960b86c27a..fa9d871d8bd 100644 --- a/managedidentities/v1beta1/managedidentities-gen.go +++ b/managedidentities/v1beta1/managedidentities-gen.go @@ -359,7 +359,9 @@ type Binding struct { // (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`. * + // For example, `admins@example.com`. * `domain:{domain}`: The G Suite + // domain (primary) that represents all the users of that domain. For + // example, `google.com` or `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`. @@ -376,9 +378,7 @@ type Binding struct { // 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`. + // group retains the role in the binding. Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. @@ -1121,12 +1121,34 @@ func (s *GoogleCloudManagedidentitiesV1beta1OpMetadata) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudSaasacceleratorManagementProvidersV1Instance: Instance +// represents the interface for SLM services to actuate the state of +// control plane resources. Example Instance in JSON, where +// consumer-project-number=123456, producer-project-id=cloud-sql: +// ```json Instance: { "name": +// "projects/123456/locations/us-east1/instances/prod-instance", +// "create_time": { "seconds": 1526406431, }, "labels": { "env": "prod", +// "foo": "bar" }, "state": READY, "software_versions": { +// "software_update": "cloud-sql-09-28-2018", }, +// "maintenance_policy_names": { "UpdatePolicy": +// "projects/123456/locations/us-east1/maintenancePolicies/prod-update-po +// licy", } "tenant_project_id": "cloud-sql-test-tenant", +// "producer_metadata": { "cloud-sql-tier": "basic", +// "cloud-sql-instance-size": "1G", }, "provisioned_resources": [ { +// "resource-type": "compute-instance", "resource-url": +// "https://www.googleapis.com/compute/v1/projects/cloud-sql/zones/us-eas +// t1-b/instances/vm-1", } ], "maintenance_schedules": { "csa_rollout": +// { "start_time": { "seconds": 1526406431, }, "end_time": { "seconds": +// 1535406431, }, }, "ncsa_rollout": { "start_time": { "seconds": +// 1526406431, }, "end_time": { "seconds": 1535406431, }, } }, +// "consumer_defined_name": "my-sql-instance1", } ``` LINT.IfChange type GoogleCloudSaasacceleratorManagementProvidersV1Instance struct { - // ConsumerDefinedName: consumer_defined_name is the name that is set by - // the consumer. On the other hand Name field represents system-assigned - // id of an instance so consumers are not necessarily aware of it. - // consumer_defined_name is used for notification/UI purposes for - // consumer to recognize their instances. + // ConsumerDefinedName: consumer_defined_name is the name of the + // instance set by the service consumers. Generally this is different + // from the `name` field which reperesents the system-assigned id of the + // instance which the service consumers do not recognize. This is a + // required field for tenants onboarding to Maintenance Window + // notifications (go/slm-rollout-maintenance-policies#prerequisites). ConsumerDefinedName string `json:"consumerDefinedName,omitempty"` // CreateTime: Output only. Timestamp when the resource was created. @@ -1146,11 +1168,12 @@ type GoogleCloudSaasacceleratorManagementProvidersV1Instance struct { // value are arbitrary strings provided by the user. Labels map[string]string `json:"labels,omitempty"` - // MaintenancePolicyNames: Optional. Deprecated. The MaintenancePolicies - // that have been attached to the instance. The key must be of the type - // name of the oneof policy name defined in MaintenancePolicy, and the - // referenced policy must define the same policy type. For complete - // details of MaintenancePolicy, please refer to go/cloud-saas-mw-ug. + // MaintenancePolicyNames: Optional. The MaintenancePolicies that have + // been attached to the instance. The key must be of the type name of + // the oneof policy name defined in MaintenancePolicy, and the + // referenced policy must define the same policy type. For details, + // please refer to go/cloud-saas-mw-ug. Should not be set if + // maintenance_settings.maintenance_policies is set. MaintenancePolicyNames map[string]string `json:"maintenancePolicyNames,omitempty"` // MaintenanceSchedules: The MaintenanceSchedule contains the scheduling @@ -1317,9 +1340,10 @@ type GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSettings struct { // MaintenancePolicies: Optional. The MaintenancePolicies that have been // attached to the instance. The key must be of the type name of the // oneof policy name defined in MaintenancePolicy, and the embedded - // policy must define the same policy type. For complete details of - // MaintenancePolicy, please refer to go/cloud-saas-mw-ug. If only the - // name is needed, then only populate MaintenancePolicy.name. + // policy must define the same policy type. For details, please refer to + // go/cloud-saas-mw-ug. Should not be set if maintenance_policy_names is + // set. If only the name is needed, then only populate + // MaintenancePolicy.name. MaintenancePolicies map[string]MaintenancePolicy `json:"maintenancePolicies,omitempty"` // ForceSendFields is a list of field names (e.g. "Exclude") to diff --git a/workflowexecutions/v1/workflowexecutions-api.json b/workflowexecutions/v1/workflowexecutions-api.json index d58a545c4fc..9d1d2ccd1ad 100644 --- a/workflowexecutions/v1/workflowexecutions-api.json +++ b/workflowexecutions/v1/workflowexecutions-api.json @@ -224,7 +224,7 @@ ], "enumDescriptions": [ "The default / unset value.", - "Includes only basic metadata about the execution. Following fields are returned: name, start_time, end_time, duration, state and workflow_revision_id.", + "Includes only basic metadata about the execution. The following fields are returned: name, start_time, end_time, duration, state, and workflow_revision_id.", "Includes all data." ], "location": "query", @@ -254,7 +254,7 @@ "type": "string" }, "orderBy": { - "description": "Optional. The orderding applied to the [Executions.ListExecutions] results. By default the ordering is based on descending start time. The following fields are supported for order by: executionID, startTime, endTime, duration, state, and workflowRevisionID.", + "description": "Optional. The ordering applied to the [Executions.ListExecutions] results. By default the ordering is based on descending start time. The following fields are supported for order by: executionID, startTime, endTime, duration, state, and workflowRevisionID.", "location": "query", "type": "string" }, @@ -265,7 +265,7 @@ "type": "integer" }, "pageToken": { - "description": "A page token, received from a previous `ListExecutions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListExecutions` must match the call that provided the page token.", + "description": "A page token, received from a previous `ListExecutions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListExecutions` must match the call that provided the page token. Note that pagination is applied to dynamic data. The list of executions returned can change between page requests.", "location": "query", "type": "string" }, @@ -285,7 +285,7 @@ ], "enumDescriptions": [ "The default / unset value.", - "Includes only basic metadata about the execution. Following fields are returned: name, start_time, end_time, duration, state and workflow_revision_id.", + "Includes only basic metadata about the execution. The following fields are returned: name, start_time, end_time, duration, state, and workflow_revision_id.", "Includes all data." ], "location": "query", @@ -309,7 +309,7 @@ } } }, - "revision": "20230117", + "revision": "20230221", "rootUrl": "https://workflowexecutions.googleapis.com/", "schemas": { "CancelExecutionRequest": { @@ -380,7 +380,7 @@ "additionalProperties": { "type": "string" }, - "description": "Labels associated with this execution. Labels can contain at most 64 entries. Keys and values can be no longer than 63 characters and can only contain lowercase letters, numeric characters, underscores and dashes. Label keys must start with a letter. International characters are allowed.", + "description": "Labels associated with this execution. Labels can contain at most 64 entries. Keys and values can be no longer than 63 characters and can only contain lowercase letters, numeric characters, underscores, and dashes. Label keys must start with a letter. International characters are allowed. By default, labels are inherited from the workflow but are overridden by any labels associated with the execution.", "type": "object" }, "name": { diff --git a/workflowexecutions/v1/workflowexecutions-gen.go b/workflowexecutions/v1/workflowexecutions-gen.go index 14f3f30d379..e9ba5f52dcc 100644 --- a/workflowexecutions/v1/workflowexecutions-gen.go +++ b/workflowexecutions/v1/workflowexecutions-gen.go @@ -256,8 +256,10 @@ type Execution struct { // Labels: Labels associated with this execution. Labels can contain at // most 64 entries. Keys and values can be no longer than 63 characters // and can only contain lowercase letters, numeric characters, - // underscores and dashes. Label keys must start with a letter. - // International characters are allowed. + // underscores, and dashes. Label keys must start with a letter. + // International characters are allowed. By default, labels are + // inherited from the workflow but are overridden by any labels + // associated with the execution. Labels map[string]string `json:"labels,omitempty"` // Name: Output only. The resource name of the execution. Format: @@ -1090,10 +1092,10 @@ func (r *ProjectsLocationsWorkflowsExecutionsService) Get(name string) *Projects // Possible values: // // "EXECUTION_VIEW_UNSPECIFIED" - The default / unset value. -// "BASIC" - Includes only basic metadata about the execution. +// "BASIC" - Includes only basic metadata about the execution. The // -// Following fields are returned: name, start_time, end_time, duration, -// state and workflow_revision_id. +// following fields are returned: name, start_time, end_time, duration, +// state, and workflow_revision_id. // // "FULL" - Includes all data. func (c *ProjectsLocationsWorkflowsExecutionsGetCall) View(view string) *ProjectsLocationsWorkflowsExecutionsGetCall { @@ -1224,7 +1226,7 @@ func (c *ProjectsLocationsWorkflowsExecutionsGetCall) Do(opts ...googleapi.CallO // ], // "enumDescriptions": [ // "The default / unset value.", - // "Includes only basic metadata about the execution. Following fields are returned: name, start_time, end_time, duration, state and workflow_revision_id.", + // "Includes only basic metadata about the execution. The following fields are returned: name, start_time, end_time, duration, state, and workflow_revision_id.", // "Includes all data." // ], // "location": "query", @@ -1276,7 +1278,7 @@ func (c *ProjectsLocationsWorkflowsExecutionsListCall) Filter(filter string) *Pr return c } -// OrderBy sets the optional parameter "orderBy": The orderding applied +// OrderBy sets the optional parameter "orderBy": The ordering applied // to the [Executions.ListExecutions] results. By default the ordering // is based on descending start time. The following fields are supported // for order by: executionID, startTime, endTime, duration, state, and @@ -1301,7 +1303,8 @@ func (c *ProjectsLocationsWorkflowsExecutionsListCall) PageSize(pageSize int64) // received from a previous `ListExecutions` call. Provide this to // retrieve the subsequent page. When paginating, all other parameters // provided to `ListExecutions` must match the call that provided the -// page token. +// page token. Note that pagination is applied to dynamic data. The list +// of executions returned can change between page requests. func (c *ProjectsLocationsWorkflowsExecutionsListCall) PageToken(pageToken string) *ProjectsLocationsWorkflowsExecutionsListCall { c.urlParams_.Set("pageToken", pageToken) return c @@ -1314,10 +1317,10 @@ func (c *ProjectsLocationsWorkflowsExecutionsListCall) PageToken(pageToken strin // Possible values: // // "EXECUTION_VIEW_UNSPECIFIED" - The default / unset value. -// "BASIC" - Includes only basic metadata about the execution. +// "BASIC" - Includes only basic metadata about the execution. The // -// Following fields are returned: name, start_time, end_time, duration, -// state and workflow_revision_id. +// following fields are returned: name, start_time, end_time, duration, +// state, and workflow_revision_id. // // "FULL" - Includes all data. func (c *ProjectsLocationsWorkflowsExecutionsListCall) View(view string) *ProjectsLocationsWorkflowsExecutionsListCall { @@ -1438,7 +1441,7 @@ func (c *ProjectsLocationsWorkflowsExecutionsListCall) Do(opts ...googleapi.Call // "type": "string" // }, // "orderBy": { - // "description": "Optional. The orderding applied to the [Executions.ListExecutions] results. By default the ordering is based on descending start time. The following fields are supported for order by: executionID, startTime, endTime, duration, state, and workflowRevisionID.", + // "description": "Optional. The ordering applied to the [Executions.ListExecutions] results. By default the ordering is based on descending start time. The following fields are supported for order by: executionID, startTime, endTime, duration, state, and workflowRevisionID.", // "location": "query", // "type": "string" // }, @@ -1449,7 +1452,7 @@ func (c *ProjectsLocationsWorkflowsExecutionsListCall) Do(opts ...googleapi.Call // "type": "integer" // }, // "pageToken": { - // "description": "A page token, received from a previous `ListExecutions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListExecutions` must match the call that provided the page token.", + // "description": "A page token, received from a previous `ListExecutions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListExecutions` must match the call that provided the page token. Note that pagination is applied to dynamic data. The list of executions returned can change between page requests.", // "location": "query", // "type": "string" // }, @@ -1469,7 +1472,7 @@ func (c *ProjectsLocationsWorkflowsExecutionsListCall) Do(opts ...googleapi.Call // ], // "enumDescriptions": [ // "The default / unset value.", - // "Includes only basic metadata about the execution. Following fields are returned: name, start_time, end_time, duration, state and workflow_revision_id.", + // "Includes only basic metadata about the execution. The following fields are returned: name, start_time, end_time, duration, state, and workflow_revision_id.", // "Includes all data." // ], // "location": "query",