Labels
class Labels extends Resource (View source)
The "labels" collection of methods.
Typical usage is:
$drivelabelsService = new Google\Service\DriveLabels(...);
$labels = $drivelabelsService->labels;
Methods
Creates a new Label. (labels.create)
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. (labels.delete)
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.
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
. (labels.disable)
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. (labels.enable)
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. (labels.get)
List labels. (labels.listLabels)
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.
Updates a Label's CopyMode
. Changes to this policy are not revisioned, do
not require publishing, and take effect immediately.
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. (labels.updatePermissions)
Details
GoogleAppsDriveLabelsV2Label
create(GoogleAppsDriveLabelsV2Label $postBody, array $optParams = [])
Creates a new Label. (labels.create)
GoogleProtobufEmpty
delete(string $name, array $optParams = [])
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. (labels.delete)
GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse
delta(string $name, GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest $postBody, array $optParams = [])
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.
(labels.delta)
GoogleAppsDriveLabelsV2Label
disable(string $name, GoogleAppsDriveLabelsV2DisableLabelRequest $postBody, array $optParams = [])
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
. (labels.disable)
GoogleAppsDriveLabelsV2Label
enable(string $name, GoogleAppsDriveLabelsV2EnableLabelRequest $postBody, array $optParams = [])
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. (labels.enable)
GoogleAppsDriveLabelsV2Label
get(string $name, array $optParams = [])
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. (labels.get)
GoogleAppsDriveLabelsV2ListLabelsResponse
listLabels(array $optParams = [])
List labels. (labels.listLabels)
GoogleAppsDriveLabelsV2Label
publish(string $name, GoogleAppsDriveLabelsV2PublishLabelRequest $postBody, array $optParams = [])
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. (labels.publish)
GoogleAppsDriveLabelsV2Label
updateLabelCopyMode(string $name, GoogleAppsDriveLabelsV2UpdateLabelCopyModeRequest $postBody, array $optParams = [])
Updates a Label's CopyMode
. Changes to this policy are not revisioned, do
not require publishing, and take effect immediately.
(labels.updateLabelCopyMode)
GoogleAppsDriveLabelsV2LabelPermission
updatePermissions(string $parent, GoogleAppsDriveLabelsV2LabelPermission $postBody, array $optParams = [])
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. (labels.updatePermissions)