Class LabelsResource
The "labels" collection of methods.
Inherited Members
Namespace: Google.Apis.DriveLabels.v2beta
Assembly: Google.Apis.DriveLabels.v2beta.dll
Syntax
public class LabelsResource
Constructors
LabelsResource(IClientService)
Constructs a new resource.
Declaration
public LabelsResource(IClientService service)
Parameters
| Type | Name | Description |
|---|---|---|
| IClientService | service |
Properties
Locks
Gets the Locks resource.
Declaration
public virtual LabelsResource.LocksResource Locks { get; }
Property Value
| Type | Description |
|---|---|
| LabelsResource.LocksResource |
Permissions
Gets the Permissions resource.
Declaration
public virtual LabelsResource.PermissionsResource Permissions { get; }
Property Value
| Type | Description |
|---|---|
| LabelsResource.PermissionsResource |
Revisions
Gets the Revisions resource.
Declaration
public virtual LabelsResource.RevisionsResource Revisions { get; }
Property Value
| Type | Description |
|---|---|
| LabelsResource.RevisionsResource |
Methods
Create(GoogleAppsDriveLabelsV2betaLabel)
Creates a label. For more information, see Create and publish a label.
Declaration
public virtual LabelsResource.CreateRequest Create(GoogleAppsDriveLabelsV2betaLabel body)
Parameters
| Type | Name | Description |
|---|---|---|
| GoogleAppsDriveLabelsV2betaLabel | body | The body of the request. |
Returns
| Type | Description |
|---|---|
| LabelsResource.CreateRequest |
Delete(string)
Permanently deletes a label and related metadata on Drive items. For more information, see Disable, enable, and delete a label. Once deleted, the label and related Drive item metadata will be deleted. Only draft labels and disabled labels may be deleted.
Declaration
public virtual LabelsResource.DeleteRequest Delete(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. Label resource name. |
Returns
| Type | Description |
|---|---|
| LabelsResource.DeleteRequest |
Delta(GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequest, string)
Updates a single label by applying a set of update requests resulting in a new draft revision. For more information, see Update a label. 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.
Declaration
public virtual LabelsResource.DeltaRequest Delta(GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequest body, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequest | body | The body of the request. |
| string | name | Required. The resource name of the label to update. |
Returns
| Type | Description |
|---|---|
| LabelsResource.DeltaRequest |
Disable(GoogleAppsDriveLabelsV2betaDisableLabelRequest, string)
Disable a published label. For more information, see Disable, enable, and delete a
label. Disabling a label
will result in a new disabled published revision based on the current published revision. If there's 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.
Declaration
public virtual LabelsResource.DisableRequest Disable(GoogleAppsDriveLabelsV2betaDisableLabelRequest body, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| GoogleAppsDriveLabelsV2betaDisableLabelRequest | body | The body of the request. |
| string | name | Required. Label resource name. |
Returns
| Type | Description |
|---|---|
| LabelsResource.DisableRequest |
Enable(GoogleAppsDriveLabelsV2betaEnableLabelRequest, string)
Enable a disabled label and restore it to its published state. For more information, see Disable, enable, and delete a label. This will result in a new published revision based on the current disabled published revision. If there's an existing disabled draft revision, a new revision will be created based on that draft and will be enabled.
Declaration
public virtual LabelsResource.EnableRequest Enable(GoogleAppsDriveLabelsV2betaEnableLabelRequest body, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| GoogleAppsDriveLabelsV2betaEnableLabelRequest | body | The body of the request. |
| string | name | Required. Label resource name. |
Returns
| Type | Description |
|---|---|
| LabelsResource.EnableRequest |
Get(string)
Get a label by its resource name. For more information, see Search for
labels. 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.
Declaration
public virtual LabelsResource.GetRequest Get(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. Label resource name. May be any of: * |
Returns
| Type | Description |
|---|---|
| LabelsResource.GetRequest |
List()
List labels. For more information, see Search for labels.
Declaration
public virtual LabelsResource.ListRequest List()
Returns
| Type | Description |
|---|---|
| LabelsResource.ListRequest |
Publish(GoogleAppsDriveLabelsV2betaPublishLabelRequest, string)
Publish all draft changes to the label. Once published, the label may not return to its draft state. For
more information, see Create and publish a
label. 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. For more information, see Label
lifecycle. 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 maximum entries.
Declaration
public virtual LabelsResource.PublishRequest Publish(GoogleAppsDriveLabelsV2betaPublishLabelRequest body, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| GoogleAppsDriveLabelsV2betaPublishLabelRequest | body | The body of the request. |
| string | name | Required. Label resource name. |
Returns
| Type | Description |
|---|---|
| LabelsResource.PublishRequest |
UpdateLabelCopyMode(GoogleAppsDriveLabelsV2betaUpdateLabelCopyModeRequest, string)
Updates a label's CopyMode. Changes to this policy aren't revisioned, don't require publishing, and take
effect immediately.
Declaration
public virtual LabelsResource.UpdateLabelCopyModeRequest UpdateLabelCopyMode(GoogleAppsDriveLabelsV2betaUpdateLabelCopyModeRequest body, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| GoogleAppsDriveLabelsV2betaUpdateLabelCopyModeRequest | body | The body of the request. |
| string | name | Required. The resource name of the label to update. |
Returns
| Type | Description |
|---|---|
| LabelsResource.UpdateLabelCopyModeRequest |
UpdateLabelEnabledAppSettings(GoogleAppsDriveLabelsV2betaUpdateLabelEnabledAppSettingsRequest, string)
Updates a label's EnabledAppSettings. Enabling a label in a Google Workspace app allows it to be used in
that app. This change isn't revisioned, doesn't require publishing, and takes effect immediately.
Declaration
public virtual LabelsResource.UpdateLabelEnabledAppSettingsRequest UpdateLabelEnabledAppSettings(GoogleAppsDriveLabelsV2betaUpdateLabelEnabledAppSettingsRequest body, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| GoogleAppsDriveLabelsV2betaUpdateLabelEnabledAppSettingsRequest | body | The body of the request. |
| string | name | Required. The resource name of the label to update. The resource name of the label to update. |
Returns
| Type | Description |
|---|---|
| LabelsResource.UpdateLabelEnabledAppSettingsRequest |
UpdatePermissions(GoogleAppsDriveLabelsV2betaLabelPermission, string)
Updates a label's permissions. If a permission for the indicated principal doesn't exist, a label permission is created, otherwise the existing permission is updated. Permissions affect the label resource as a whole, aren't revisioned, and don't require publishing.
Declaration
public virtual LabelsResource.UpdatePermissionsRequest UpdatePermissions(GoogleAppsDriveLabelsV2betaLabelPermission body, string parent)
Parameters
| Type | Name | Description |
|---|---|---|
| GoogleAppsDriveLabelsV2betaLabelPermission | body | The body of the request. |
| string | parent | Required. The parent label resource name. |
Returns
| Type | Description |
|---|---|
| LabelsResource.UpdatePermissionsRequest |