All Downloads are FREE. Search and download functionalities are using the official Maven repository.

target.apidocs.com.google.api.services.drivelabels.v2.DriveLabels.Labels.html Maven / Gradle / Ivy







DriveLabels.Labels (Drive Labels API v2-rev20230731-2.0.0)












com.google.api.services.drivelabels.v2

Class DriveLabels.Labels

  • Enclosing class:
    DriveLabels


    public class DriveLabels.Labels
    extends Object
    The "labels" collection of methods.
    • Constructor Detail

      • Labels

        public Labels()
    • Method Detail

      • delete

        public DriveLabels.Labels.Delete delete(String name)
                                         throws IOException
        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. Create a request for the method "labels.delete". This request holds the parameters needed by the drivelabels server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        name - Required. Label resource name.
        Returns:
        the request
        Throws:
        IOException
      • delta

        public DriveLabels.Labels.Delta delta(String name,
                                              GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest content)
                                       throws IOException
        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. Create a request for the method "labels.delta". This request holds the parameters needed by the drivelabels server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        name - Required. The resource name of the Label to update.
        content - the GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest
        Returns:
        the request
        Throws:
        IOException
      • disable

        public DriveLabels.Labels.Disable disable(String name,
                                                  GoogleAppsDriveLabelsV2DisableLabelRequest content)
                                           throws IOException
        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`. Create a request for the method "labels.disable". This request holds the parameters needed by the drivelabels server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        name - Required. Label resource name.
        content - the GoogleAppsDriveLabelsV2DisableLabelRequest
        Returns:
        the request
        Throws:
        IOException
      • enable

        public DriveLabels.Labels.Enable enable(String name,
                                                GoogleAppsDriveLabelsV2EnableLabelRequest content)
                                         throws IOException
        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. Create a request for the method "labels.enable". This request holds the parameters needed by the drivelabels server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        name - Required. Label resource name.
        content - the GoogleAppsDriveLabelsV2EnableLabelRequest
        Returns:
        the request
        Throws:
        IOException
      • get

        public DriveLabels.Labels.Get get(String name)
                                   throws IOException
        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. Create a request for the method "labels.get". This request holds the parameters needed by the drivelabels server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        name - 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}`
        Returns:
        the request
        Throws:
        IOException
      • list

        public DriveLabels.Labels.List list()
                                     throws IOException
        List labels. Create a request for the method "labels.list". This request holds the parameters needed by the drivelabels server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Returns:
        the request
        Throws:
        IOException
      • publish

        public DriveLabels.Labels.Publish publish(String name,
                                                  GoogleAppsDriveLabelsV2PublishLabelRequest content)
                                           throws IOException
        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. Create a request for the method "labels.publish". This request holds the parameters needed by the drivelabels server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        name - Required. Label resource name.
        content - the GoogleAppsDriveLabelsV2PublishLabelRequest
        Returns:
        the request
        Throws:
        IOException
      • updatePermissions

        public DriveLabels.Labels.UpdatePermissions updatePermissions(String parent,
                                                                      GoogleAppsDriveLabelsV2LabelPermission content)
                                                               throws IOException
        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. Create a request for the method "labels.updatePermissions". This request holds the parameters needed by the drivelabels server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        parent - Required. The parent Label resource name.
        content - the GoogleAppsDriveLabelsV2LabelPermission
        Returns:
        the request
        Throws:
        IOException
      • locks

        public DriveLabels.Labels.Locks locks()
        An accessor for creating requests from the Locks collection.

        The typical use is:

            DriveLabels drivelabels = new DriveLabels(...);
            DriveLabels.Locks.List request = drivelabels.locks().list(parameters ...)
         
        Returns:
        the resource collection
      • permissions

        public DriveLabels.Labels.Permissions permissions()
        An accessor for creating requests from the Permissions collection.

        The typical use is:

            DriveLabels drivelabels = new DriveLabels(...);
            DriveLabels.Permissions.List request = drivelabels.permissions().list(parameters ...)
         
        Returns:
        the resource collection
      • revisions

        public DriveLabels.Labels.Revisions revisions()
        An accessor for creating requests from the Revisions collection.

        The typical use is:

            DriveLabels drivelabels = new DriveLabels(...);
            DriveLabels.Revisions.List request = drivelabels.revisions().list(parameters ...)
         
        Returns:
        the resource collection

Copyright © 2011–2023 Google. All rights reserved.





© 2015 - 2025 Weber Informatics LLC | Privacy Policy