---
title: "POST /v2/{+name}:delta"
method: POST
path: "/v2/{+name}:delta"
tags: ["labels"]
---

# POST /v2/{+name}:delta

`POST /v2/{+name}:delta`

Updates a single label by applying a set of update requests resulting in a new draft revision. For more information, see [Update a label](https://developers.google.com/workspace/drive/labels/guides/update-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.

## Path parameters

- `name` string, required

## Request body

- GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest — The set of requests for updating aspects of a label. If any request isn't valid, no requests will be applied.
  - `writeControl` GoogleAppsDriveLabelsV2WriteControl — Provides control over how write requests are executed. When not specified, the last write wins.
    - `requiredRevisionId` string — The revision ID of the label that the write request will be applied to. If this isn't the latest revision of the label, the request will not be processed and will return a 400 Bad Request error.
  - `requests` GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestRequest[] — A list of updates to apply to the label. Requests will be applied in the order they are specified.
    - `updateField` GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldPropertiesRequest — Request to update field properties.
      - `properties` GoogleAppsDriveLabelsV2FieldProperties — The basic properties of the field.
        - `displayName` string — Required. The display text to show in the UI identifying this field.
        - `insertBeforeField` string — Input only. Insert or move this field before the indicated field. If empty, the field is placed at the end of the list.
        - `required` boolean — Whether the field should be marked as required.
      - `updateMask` string, google-fieldmask — 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 a short-hand for updating every field.
      - `id` string — Required. The field to update.
    - `enableField` GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableFieldRequest — Request to enable the field.
      - `id` string — Required. ID of the field to enable.
    - `deleteSelectionChoice` GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteSelectionChoiceRequest — Request to delete a choice.
      - `id` string — Required. Choice to delete.
      - `fieldId` string — Required. The selection field from which a choice will be deleted.
    - `createSelectionChoice` GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateSelectionChoiceRequest — Request to create a selection choice.
      - `fieldId` string — Required. The selection field in which a choice will be created.
      - `choice` GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice — Selection field choice.
        - `publisher` GoogleAppsDriveLabelsV2UserInfo — Information about a user.
          - `person` string — The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
        - `creator` GoogleAppsDriveLabelsV2UserInfo — Information about a user.
          - `person` string — The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
        - `lifecycle` GoogleAppsDriveLabelsV2Lifecycle — The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). 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 aren't 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.
          - `disabledPolicy` GoogleAppsDriveLabelsV2LifecycleDisabledPolicy — The policy that governs how to treat a disabled label, field, or selection choice in different contexts.
            - `showInApply` boolean — 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.
            - `hideInSearch` boolean — 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.
          - `state` 'STATE_UNSPECIFIED' | 'UNPUBLISHED_DRAFT' | 'PUBLISHED' | 'DISABLED' | 'DELETED' — Output only. The state of the object associated with this lifecycle.
          - `hasUnpublishedChanges` boolean — Output only. Whether the object associated with this lifecycle has unpublished changes.
        - `id` string — The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
        - `displayHints` GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceDisplayHints — UI display hints for rendering an option.
          - `badgePriority` string, int64 — 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.
          - `hiddenInSearch` boolean — This option should be hidden in the search menu when searching for Drive items.
          - `darkBadgeColors` GoogleAppsDriveLabelsV2BadgeColors — The color derived from BadgeConfig and changed to the closest recommended supported color.
            - `soloColor` GoogleTypeColor — Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and 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 have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. 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:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 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 << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...
              - …
            - `backgroundColor` GoogleTypeColor — Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and 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 have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. 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:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 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 << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...
              - …
            - `foregroundColor` GoogleTypeColor — Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and 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 have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. 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:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 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 << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...
              - …
          - `shownInApply` boolean — This option should be shown in the apply menu when applying values to a Drive item.
          - `badgeColors` GoogleAppsDriveLabelsV2BadgeColors — The color derived from BadgeConfig and changed to the closest recommended supported color.
            - `soloColor` GoogleTypeColor — Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and 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 have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. 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:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 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 << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...
              - …
            - `backgroundColor` GoogleTypeColor — Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and 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 have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. 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:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 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 << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...
              - …
            - `foregroundColor` GoogleTypeColor — Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and 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 have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. 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:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 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 << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...
              - …
          - `disabled` boolean — Whether the option should be shown in the UI as disabled.
        - `publishTime` string, google-datetime — Output only. The time this choice was published. This value has no meaning when the choice is not published.
        - `disableTime` string, google-datetime — Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
        - `updater` GoogleAppsDriveLabelsV2UserInfo — Information about a user.
          - `person` string — The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
        - `schemaCapabilities` GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceSchemaCapabilities — The capabilities related to this choice when editing the choice.
          - `canUpdate` boolean — Whether the user can update this choice.
          - `canDelete` boolean — Whether the user can delete this choice.
          - `canEnable` boolean — Whether the user can enable this choice.
          - `canDisable` boolean — Whether the user can disable this choice.
        - `updateTime` string, google-datetime — Output only. The time this choice was updated last.
        - `disabler` GoogleAppsDriveLabelsV2UserInfo — Information about a user.
          - `person` string — The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
        - `lockStatus` GoogleAppsDriveLabelsV2LockStatus — Contains information about whether a label component should be considered locked.
          - `locked` boolean — Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it's not the direct target of a label lock, in which case this field is set to false.
        - `createTime` string, google-datetime — Output only. The time this choice was created.
        - `properties` GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties — Basic properties of the choice.
          - `badgeConfig` GoogleAppsDriveLabelsV2BadgeConfig — Badge status of the label.
            - `color` GoogleTypeColor — Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and 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 have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. 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:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 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 << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...
              - …
            - `priorityOverride` string, int64 — Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
          - `displayName` string — Required. The display text to show in the UI identifying this field.
          - `insertBeforeChoice` string — Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
          - `description` string — The description of this label.
        - `appliedCapabilities` GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceAppliedCapabilities — The capabilities related to this choice on applied metadata.
          - `canSearch` boolean — Whether the user can use this choice in search queries.
          - `canSelect` boolean — Whether the user can select this choice on an item.
          - `canRead` boolean — Whether the user can read related applied metadata on items.
    - `createField` GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateFieldRequest — Request to create a field within a label.
      - `field` 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.
        - `publisher` GoogleAppsDriveLabelsV2UserInfo — Information about a user.
          - `person` string — The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
        - `queryKey` string — 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".
        - `lifecycle` GoogleAppsDriveLabelsV2Lifecycle — The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). 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 aren't 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.
          - `disabledPolicy` GoogleAppsDriveLabelsV2LifecycleDisabledPolicy — The policy that governs how to treat a disabled label, field, or selection choice in different contexts.
            - `showInApply` boolean — 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.
            - `hideInSearch` boolean — 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.
          - `state` 'STATE_UNSPECIFIED' | 'UNPUBLISHED_DRAFT' | 'PUBLISHED' | 'DISABLED' | 'DELETED' — Output only. The state of the object associated with this lifecycle.
          - `hasUnpublishedChanges` boolean — Output only. Whether the object associated with this lifecycle has unpublished changes.
        - `dateOptions` GoogleAppsDriveLabelsV2FieldDateOptions — Options for the date field type.
          - `dateFormat` string — Output only. ICU date format.
          - `dateFormatType` 'DATE_FORMAT_UNSPECIFIED' | 'LONG_DATE' | 'SHORT_DATE' — Localized date formatting option. Field values are rendered in this format according to their locale.
          - `minValue` 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
            - `month` integer — Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
            - `day` integer — 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.
            - `year` integer — Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
          - `maxValue` 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
            - `month` integer — Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
            - `day` integer — 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.
            - `year` integer — Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        - `creator` GoogleAppsDriveLabelsV2UserInfo — Information about a user.
          - `person` string — The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
        - `integerOptions` GoogleAppsDriveLabelsV2FieldIntegerOptions — Options for the Integer field type.
          - `maxValue` string, int64 — Output only. The maximum valid value for the integer field.
          - `minValue` string, int64 — Output only. The minimum valid value for the integer field.
        - `id` string — Output only. The key of a field, unique within a label or library. This value is autogenerated. Matches the regex: `([a-zA-Z0-9])+`.
        - `displayHints` GoogleAppsDriveLabelsV2FieldDisplayHints — UI display hints for rendering a field.
          - `shownInApply` boolean — This field should be shown in the apply menu when applying values to a Drive item.
          - `disabled` boolean — Whether the field should be shown in the UI as disabled.
          - `required` boolean — Whether the field should be shown as required in the UI.
          - `hiddenInSearch` boolean — This field should be hidden in the search menu when searching for Drive items.
        - `selectionOptions` GoogleAppsDriveLabelsV2FieldSelectionOptions — Options for the selection field type.
          - `choices` GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice[] — The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.
            - `publisher` GoogleAppsDriveLabelsV2UserInfo — Information about a user.
              - …
            - `creator` GoogleAppsDriveLabelsV2UserInfo — Information about a user.
              - …
            - `lifecycle` GoogleAppsDriveLabelsV2Lifecycle — The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). 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 aren't 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.
              - …
            - `id` string — The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
            - `displayHints` GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceDisplayHints — UI display hints for rendering an option.
              - …
            - `publishTime` string, google-datetime — Output only. The time this choice was published. This value has no meaning when the choice is not published.
            - `disableTime` string, google-datetime — Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
            - `updater` GoogleAppsDriveLabelsV2UserInfo — Information about a user.
              - …
            - `schemaCapabilities` GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceSchemaCapabilities — The capabilities related to this choice when editing the choice.
              - …
            - `updateTime` string, google-datetime — Output only. The time this choice was updated last.
            - `disabler` GoogleAppsDriveLabelsV2UserInfo — Information about a user.
              - …
            - `lockStatus` GoogleAppsDriveLabelsV2LockStatus — Contains information about whether a label component should be considered locked.
              - …
            - `createTime` string, google-datetime — Output only. The time this choice was created.
            - `properties` GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties — Basic properties of the choice.
              - …
            - `appliedCapabilities` GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceAppliedCapabilities — The capabilities related to this choice on applied metadata.
              - …
          - `listOptions` GoogleAppsDriveLabelsV2FieldListOptions — Options for a multi-valued variant of an associated field type.
            - `maxEntries` integer — Maximum number of entries permitted.
        - `disableTime` string, google-datetime — Output only. The time this field was disabled. This value has no meaning when the field is not disabled.
        - `updater` GoogleAppsDriveLabelsV2UserInfo — Information about a user.
          - `person` string — The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
        - `schemaCapabilities` GoogleAppsDriveLabelsV2FieldSchemaCapabilities — The capabilities related to this field when editing the field.
          - `canDisable` boolean — Whether the user can disable this field. The user must have permission and this field must not already be disabled.
          - `canDelete` boolean — Whether the user can delete this field. The user must have permission and the field must be deprecated.
          - `canEnable` boolean — Whether the user can enable this field. The user must have permission and this field must be disabled.
          - `canUpdate` boolean — Whether the user can change this field.
        - `updateTime` string, google-datetime — Output only. The time this field was updated.
        - `disabler` GoogleAppsDriveLabelsV2UserInfo — Information about a user.
          - `person` string — The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
        - `lockStatus` GoogleAppsDriveLabelsV2LockStatus — Contains information about whether a label component should be considered locked.
          - `locked` boolean — Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it's not the direct target of a label lock, in which case this field is set to false.
        - `userOptions` GoogleAppsDriveLabelsV2FieldUserOptions — Options for the user field type.
          - `listOptions` GoogleAppsDriveLabelsV2FieldListOptions — Options for a multi-valued variant of an associated field type.
            - `maxEntries` integer — Maximum number of entries permitted.
        - `createTime` string, google-datetime — Output only. The time this field was created.
        - `textOptions` GoogleAppsDriveLabelsV2FieldTextOptions — Options for the Text field type.
          - `minLength` integer — Output only. The minimum valid length of values for the text field.
          - `maxLength` integer — Output only. The maximum valid length of values for the text field.
        - `properties` GoogleAppsDriveLabelsV2FieldProperties — The basic properties of the field.
          - `displayName` string — Required. The display text to show in the UI identifying this field.
          - `insertBeforeField` string — Input only. Insert or move this field before the indicated field. If empty, the field is placed at the end of the list.
          - `required` boolean — Whether the field should be marked as required.
        - `appliedCapabilities` GoogleAppsDriveLabelsV2FieldAppliedCapabilities — The capabilities related to this field on applied metadata.
          - `canRead` boolean — Whether the user can read related applied metadata on items.
          - `canWrite` boolean — Whether the user can set this field on Drive items.
          - `canSearch` boolean — Whether the user can search for Drive items referencing this field.
    - `disableField` GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableFieldRequest — Request to disable the field.
      - `updateMask` string, google-fieldmask — 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 a short-hand for updating every field.
      - `id` string — Required. Key of the field to disable.
      - `disabledPolicy` GoogleAppsDriveLabelsV2LifecycleDisabledPolicy — The policy that governs how to treat a disabled label, field, or selection choice in different contexts.
        - `showInApply` boolean — 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.
        - `hideInSearch` boolean — 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.
    - `enableSelectionChoice` GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableSelectionChoiceRequest — Request to enable a choice.
      - `id` string — Required. Choice to enable.
      - `fieldId` string — Required. The selection field in which a choice will be enabled.
    - `deleteField` GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteFieldRequest — Request to delete the field.
      - `id` string — Required. ID of the field to delete.
    - `updateSelectionChoiceProperties` GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateSelectionChoicePropertiesRequest — Request to update a choice property.
      - `fieldId` string — Required. The selection field to update.
      - `updateMask` string, google-fieldmask — 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 a short-hand for updating every field.
      - `id` string — Required. The choice to update.
      - `properties` GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties — Basic properties of the choice.
        - `badgeConfig` GoogleAppsDriveLabelsV2BadgeConfig — Badge status of the label.
          - `color` GoogleTypeColor — Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and 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 have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. 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:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 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 << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...
            - `alpha` number, float — The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
            - `blue` number, float — The amount of blue in the color as a value in the interval [0, 1].
            - `red` number, float — The amount of red in the color as a value in the interval [0, 1].
            - `green` number, float — The amount of green in the color as a value in the interval [0, 1].
          - `priorityOverride` string, int64 — Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
        - `displayName` string — Required. The display text to show in the UI identifying this field.
        - `insertBeforeChoice` string — Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
        - `description` string — The description of this label.
    - `updateLabel` GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateLabelPropertiesRequest — Updates basic properties of a label.
      - `updateMask` string, google-fieldmask — 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 a short-hand for updating every field.
      - `properties` GoogleAppsDriveLabelsV2LabelProperties — Basic properties of the label.
        - `title` string — Required. Title of the label.
        - `description` string — The description of the label.
    - `updateFieldType` GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldTypeRequest — Request to change the type of a field.
      - `dateOptions` GoogleAppsDriveLabelsV2FieldDateOptions — Options for the date field type.
        - `dateFormat` string — Output only. ICU date format.
        - `dateFormatType` 'DATE_FORMAT_UNSPECIFIED' | 'LONG_DATE' | 'SHORT_DATE' — Localized date formatting option. Field values are rendered in this format according to their locale.
        - `minValue` 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
          - `month` integer — Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          - `day` integer — 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.
          - `year` integer — Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        - `maxValue` 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
          - `month` integer — Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          - `day` integer — 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.
          - `year` integer — Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
      - `userOptions` GoogleAppsDriveLabelsV2FieldUserOptions — Options for the user field type.
        - `listOptions` GoogleAppsDriveLabelsV2FieldListOptions — Options for a multi-valued variant of an associated field type.
          - `maxEntries` integer — Maximum number of entries permitted.
      - `updateMask` string, google-fieldmask — 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 a short-hand for updating every field.
      - `textOptions` GoogleAppsDriveLabelsV2FieldTextOptions — Options for the Text field type.
        - `minLength` integer — Output only. The minimum valid length of values for the text field.
        - `maxLength` integer — Output only. The maximum valid length of values for the text field.
      - `selectionOptions` GoogleAppsDriveLabelsV2FieldSelectionOptions — Options for the selection field type.
        - `choices` GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice[] — The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.
          - `publisher` GoogleAppsDriveLabelsV2UserInfo — Information about a user.
            - `person` string — The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
          - `creator` GoogleAppsDriveLabelsV2UserInfo — Information about a user.
            - `person` string — The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
          - `lifecycle` GoogleAppsDriveLabelsV2Lifecycle — The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). 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 aren't 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.
            - `disabledPolicy` GoogleAppsDriveLabelsV2LifecycleDisabledPolicy — The policy that governs how to treat a disabled label, field, or selection choice in different contexts.
              - …
            - `state` 'STATE_UNSPECIFIED' | 'UNPUBLISHED_DRAFT' | 'PUBLISHED' | 'DISABLED' | 'DELETED' — Output only. The state of the object associated with this lifecycle.
            - `hasUnpublishedChanges` boolean — Output only. Whether the object associated with this lifecycle has unpublished changes.
          - `id` string — The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
          - `displayHints` GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceDisplayHints — UI display hints for rendering an option.
            - `badgePriority` string, int64 — 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.
            - `hiddenInSearch` boolean — This option should be hidden in the search menu when searching for Drive items.
            - `darkBadgeColors` GoogleAppsDriveLabelsV2BadgeColors — The color derived from BadgeConfig and changed to the closest recommended supported color.
              - …
            - `shownInApply` boolean — This option should be shown in the apply menu when applying values to a Drive item.
            - `badgeColors` GoogleAppsDriveLabelsV2BadgeColors — The color derived from BadgeConfig and changed to the closest recommended supported color.
              - …
            - `disabled` boolean — Whether the option should be shown in the UI as disabled.
          - `publishTime` string, google-datetime — Output only. The time this choice was published. This value has no meaning when the choice is not published.
          - `disableTime` string, google-datetime — Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
          - `updater` GoogleAppsDriveLabelsV2UserInfo — Information about a user.
            - `person` string — The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
          - `schemaCapabilities` GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceSchemaCapabilities — The capabilities related to this choice when editing the choice.
            - `canUpdate` boolean — Whether the user can update this choice.
            - `canDelete` boolean — Whether the user can delete this choice.
            - `canEnable` boolean — Whether the user can enable this choice.
            - `canDisable` boolean — Whether the user can disable this choice.
          - `updateTime` string, google-datetime — Output only. The time this choice was updated last.
          - `disabler` GoogleAppsDriveLabelsV2UserInfo — Information about a user.
            - `person` string — The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
          - `lockStatus` GoogleAppsDriveLabelsV2LockStatus — Contains information about whether a label component should be considered locked.
            - `locked` boolean — Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it's not the direct target of a label lock, in which case this field is set to false.
          - `createTime` string, google-datetime — Output only. The time this choice was created.
          - `properties` GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties — Basic properties of the choice.
            - `badgeConfig` GoogleAppsDriveLabelsV2BadgeConfig — Badge status of the label.
              - …
            - `displayName` string — Required. The display text to show in the UI identifying this field.
            - `insertBeforeChoice` string — Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
            - `description` string — The description of this label.
          - `appliedCapabilities` GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceAppliedCapabilities — The capabilities related to this choice on applied metadata.
            - `canSearch` boolean — Whether the user can use this choice in search queries.
            - `canSelect` boolean — Whether the user can select this choice on an item.
            - `canRead` boolean — Whether the user can read related applied metadata on items.
        - `listOptions` GoogleAppsDriveLabelsV2FieldListOptions — Options for a multi-valued variant of an associated field type.
          - `maxEntries` integer — Maximum number of entries permitted.
      - `id` string — Required. The field to update.
      - `integerOptions` GoogleAppsDriveLabelsV2FieldIntegerOptions — Options for the Integer field type.
        - `maxValue` string, int64 — Output only. The maximum valid value for the integer field.
        - `minValue` string, int64 — Output only. The minimum valid value for the integer field.
    - `disableSelectionChoice` GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableSelectionChoiceRequest — Request to disable a choice.
      - `updateMask` string, google-fieldmask — 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 a short-hand for updating every field.
      - `id` string — Required. Choice to disable.
      - `disabledPolicy` GoogleAppsDriveLabelsV2LifecycleDisabledPolicy — The policy that governs how to treat a disabled label, field, or selection choice in different contexts.
        - `showInApply` boolean — 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.
        - `hideInSearch` boolean — 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.
      - `fieldId` string — Required. The selection field in which a choice will be disabled.
  - `languageCode` string — The BCP-47 language code to use for evaluating localized field labels when `include_label_in_response` is `true`.
  - `useAdminAccess` boolean — 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.
  - `view` 'LABEL_VIEW_BASIC' | 'LABEL_VIEW_FULL' — When specified, only certain fields belonging to the indicated view will be returned.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/drivelabels.md) · [All operations](https://skmtc.net/google/apis/drivelabels/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/drivelabels/versions/0865f97e9c4a/schema)
