Class LabelsResource
The "labels" collection of methods.
Inherited Members
Namespace: Google.Apis.DriveLabels.v2
Assembly: Google.Apis.DriveLabels.v2.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(GoogleAppsDriveLabelsV2Label)
Creates a new Label.
Declaration
public virtual LabelsResource.CreateRequest Create(GoogleAppsDriveLabelsV2Label body)
Parameters
| Type | Name | Description |
|---|---|---|
| GoogleAppsDriveLabelsV2Label | body | The body of the request. |
Returns
| Type | Description |
|---|---|
| LabelsResource.CreateRequest |
Delete(string)
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.
Declaration
public virtual LabelsResource.DeleteRequest Delete(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. Label resource name. |
Returns
| Type | Description |
|---|---|
| LabelsResource.DeleteRequest |
Delta(GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest, string)
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.
Declaration
public virtual LabelsResource.DeltaRequest Delta(GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest body, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest | body | The body of the request. |
| string | name | Required. The resource name of the Label to update. |
Returns
| Type | Description |
|---|---|
| LabelsResource.DeltaRequest |
Disable(GoogleAppsDriveLabelsV2DisableLabelRequest, string)
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.
Declaration
public virtual LabelsResource.DisableRequest Disable(GoogleAppsDriveLabelsV2DisableLabelRequest body, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| GoogleAppsDriveLabelsV2DisableLabelRequest | body | The body of the request. |
| string | name | Required. Label resource name. |
Returns
| Type | Description |
|---|---|
| LabelsResource.DisableRequest |
Enable(GoogleAppsDriveLabelsV2EnableLabelRequest, string)
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.
Declaration
public virtual LabelsResource.EnableRequest Enable(GoogleAppsDriveLabelsV2EnableLabelRequest body, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| GoogleAppsDriveLabelsV2EnableLabelRequest | 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. 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.
Declaration
public virtual LabelsResource.ListRequest List()
Returns
| Type | Description |
|---|---|
| LabelsResource.ListRequest |
Publish(GoogleAppsDriveLabelsV2PublishLabelRequest, string)
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.
Declaration
public virtual LabelsResource.PublishRequest Publish(GoogleAppsDriveLabelsV2PublishLabelRequest body, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| GoogleAppsDriveLabelsV2PublishLabelRequest | body | The body of the request. |
| string | name | Required. Label resource name. |
Returns
| Type | Description |
|---|---|
| LabelsResource.PublishRequest |
UpdateLabelCopyMode(GoogleAppsDriveLabelsV2UpdateLabelCopyModeRequest, string)
Updates a Label's CopyMode. Changes to this policy are not revisioned, do not require publishing, and take
effect immediately.
Declaration
public virtual LabelsResource.UpdateLabelCopyModeRequest UpdateLabelCopyMode(GoogleAppsDriveLabelsV2UpdateLabelCopyModeRequest body, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| GoogleAppsDriveLabelsV2UpdateLabelCopyModeRequest | body | The body of the request. |
| string | name | Required. The resource name of the Label to update. |
Returns
| Type | Description |
|---|---|
| LabelsResource.UpdateLabelCopyModeRequest |
UpdatePermissions(GoogleAppsDriveLabelsV2LabelPermission, string)
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.
Declaration
public virtual LabelsResource.UpdatePermissionsRequest UpdatePermissions(GoogleAppsDriveLabelsV2LabelPermission body, string parent)
Parameters
| Type | Name | Description |
|---|---|---|
| GoogleAppsDriveLabelsV2LabelPermission | body | The body of the request. |
| string | parent | Required. The parent Label resource name. |
Returns
| Type | Description |
|---|---|
| LabelsResource.UpdatePermissionsRequest |