Drive Labels API . labels

Instance Methods

locks()

Returns the locks Resource.

permissions()

Returns the permissions Resource.

revisions()

Returns the revisions Resource.

close()

Close httplib2 connections.

create(body=None, languageCode=None, useAdminAccess=None, x__xgafv=None)

Creates a new Label.

delete(name, useAdminAccess=None, writeControl_requiredRevisionId=None, x__xgafv=None)

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.

delta(name, body=None, x__xgafv=None)

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(name, body=None, x__xgafv=None)

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`.

enable(name, body=None, x__xgafv=None)

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.

get(name, languageCode=None, useAdminAccess=None, view=None, x__xgafv=None)

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.

list(customer=None, languageCode=None, minimumRole=None, pageSize=None, pageToken=None, publishedOnly=None, useAdminAccess=None, view=None, x__xgafv=None)

List labels.

list_next()

Retrieves the next page of results.

publish(name, body=None, x__xgafv=None)

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.

updateLabelCopyMode(name, body=None, x__xgafv=None)

Updates a Label's `CopyMode`. Changes to this policy are not revisioned, do not require publishing, and take effect immediately.

updatePermissions(parent, body=None, useAdminAccess=None, x__xgafv=None)

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.

Method Details

close()
Close httplib2 connections.
create(body=None, languageCode=None, useAdminAccess=None, x__xgafv=None)
Creates a new Label.

Args:
  body: object, The request body.
    The object takes the form of:

{ # A label defines a taxonomy that can be applied to Drive items in order to organize and search across items. Labels can be simple strings, or can contain fields that describe additional metadata that can be further used to organize and search Drive items.
  "appliedCapabilities": { # The capabilities a user has on this label's applied metadata. # Output only. The capabilities related to this label on applied metadata.
    "canApply": True or False, # Whether the user can apply this label to items.
    "canRead": True or False, # Whether the user can read applied metadata related to this label.
    "canRemove": True or False, # Whether the user can remove this label from items.
  },
  "appliedLabelPolicy": { # Behavior of this label when it's applied to Drive items. # Output only. Behavior of this label when it's applied to Drive items.
    "copyMode": "A String", # Indicates how the applied label and field values should be copied when a Drive item is copied.
  },
  "createTime": "A String", # Output only. The time this label was created.
  "creator": { # Information about a user. # Output only. The user who created this label.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "customer": "A String", # Output only. The customer this label belongs to. For example: "customers/123abc789."
  "disableTime": "A String", # Output only. The time this label was disabled. This value has no meaning when the label is not disabled.
  "disabler": { # Information about a user. # Output only. The user who disabled this label. This value has no meaning when the label is not disabled.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "displayHints": { # UI display hints for rendering the label. # Output only. UI display hints for rendering the label.
    "disabled": True or False, # Whether the label should be shown in the UI as disabled.
    "hiddenInSearch": True or False, # This label should be hidden in the search menu when searching for Drive items.
    "priority": "A String", # Order to display label in a list.
    "shownInApply": True or False, # This label should be shown in the apply menu when applying values to a Drive item.
  },
  "fields": [ # List of fields in descending priority order.
    { # 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.
      "appliedCapabilities": { # The capabilities related to this field on applied metadata. # Output only. The capabilities this user has on this field and its value when the label is applied on Drive items.
        "canRead": True or False, # Whether the user can read related applied metadata on items.
        "canSearch": True or False, # Whether the user can search for Drive items referencing this field.
        "canWrite": True or False, # Whether the user can set this field on Drive items.
      },
      "createTime": "A String", # Output only. The time this field was created.
      "creator": { # Information about a user. # Output only. The user who created this field.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "dateOptions": { # Options for the date field type. # Date field options.
        "dateFormat": "A String", # Output only. ICU date format.
        "dateFormatType": "A String", # Localized date formatting option. Field values are rendered in this format according to their locale.
        "maxValue": { # 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 # Output only. Maximum valid value (year, month, day).
          "day": 42, # 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.
          "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
        "minValue": { # 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 # Output only. Minimum valid value (year, month, day).
          "day": 42, # 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.
          "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
      },
      "disableTime": "A String", # Output only. The time this field was disabled. This value has no meaning when the field is not disabled.
      "disabler": { # Information about a user. # Output only. The user who disabled this field. This value has no meaning when the field is not disabled.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "displayHints": { # UI display hints for rendering a field. # Output only. UI display hints for rendering a field.
        "disabled": True or False, # Whether the field should be shown in the UI as disabled.
        "hiddenInSearch": True or False, # This field should be hidden in the search menu when searching for Drive items.
        "required": True or False, # Whether the field should be shown as required in the UI.
        "shownInApply": True or False, # This field should be shown in the apply menu when applying values to a Drive item.
      },
      "id": "A 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])+`
      "integerOptions": { # Options for the Integer field type. # Integer field options.
        "maxValue": "A String", # Output only. The maximum valid value for the integer field.
        "minValue": "A String", # Output only. The minimum valid value for the integer field.
      },
      "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. The lifecycle of this field.
        "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
          "hideInSearch": True or False, # 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.
          "showInApply": True or False, # 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.
        },
        "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
        "state": "A String", # Output only. The state of the object associated with this lifecycle.
      },
      "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this field.
        "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
      },
      "properties": { # The basic properties of the field. # The basic properties of the field.
        "displayName": "A String", # Required. The display text to show in the UI identifying this field.
        "insertBeforeField": "A 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": True or False, # Whether the field should be marked as required.
      },
      "publisher": { # Information about a user. # Output only. The user who published this field. This value has no meaning when the field is not published.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "queryKey": "A 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".
      "schemaCapabilities": { # The capabilities related to this field when editing the field. # Output only. The capabilities this user has when editing this field.
        "canDelete": True or False, # Whether the user can delete this field. The user must have permission and the field must be deprecated.
        "canDisable": True or False, # Whether the user can disable this field. The user must have permission and this field must not already be disabled.
        "canEnable": True or False, # Whether the user can enable this field. The user must have permission and this field must be disabled.
        "canUpdate": True or False, # Whether the user can change this field.
      },
      "selectionOptions": { # Options for the selection field type. # Selection field options.
        "choices": [ # The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.
          { # Selection field choice.
            "appliedCapabilities": { # The capabilities related to this choice on applied metadata. # Output only. The capabilities related to this choice on applied metadata.
              "canRead": True or False, # Whether the user can read related applied metadata on items.
              "canSearch": True or False, # Whether the user can use this choice in search queries.
              "canSelect": True or False, # Whether the user can select this choice on an item.
            },
            "createTime": "A String", # Output only. The time this choice was created.
            "creator": { # Information about a user. # Output only. The user who created this choice.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
            "disableTime": "A String", # Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
            "disabler": { # Information about a user. # Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
            "displayHints": { # UI display hints for rendering an option. # Output only. UI display hints for rendering a choice.
              "badgeColors": { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The colors to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                "backgroundColor": { # 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(''); }; // ... # Output only. Badge background that pairs with the foreground.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "foregroundColor": { # 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(''); }; // ... # Output only. Badge foreground that pairs with the background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "soloColor": { # 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(''); }; // ... # Output only. Color that can be used for text without a background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              "badgePriority": "A String", # 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.
              "darkBadgeColors": { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The dark-mode color to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                "backgroundColor": { # 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(''); }; // ... # Output only. Badge background that pairs with the foreground.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "foregroundColor": { # 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(''); }; // ... # Output only. Badge foreground that pairs with the background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "soloColor": { # 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(''); }; // ... # Output only. Color that can be used for text without a background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              "disabled": True or False, # Whether the option should be shown in the UI as disabled.
              "hiddenInSearch": True or False, # This option should be hidden in the search menu when searching for Drive items.
              "shownInApply": True or False, # This option should be shown in the apply menu when applying values to a Drive item.
            },
            "id": "A String", # The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
            "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. Lifecycle of the choice.
              "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
                "hideInSearch": True or False, # 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.
                "showInApply": True or False, # 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.
              },
              "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
              "state": "A String", # Output only. The state of the object associated with this lifecycle.
            },
            "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this choice.
              "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
            },
            "properties": { # Basic properties of the choice. # Basic properties of the choice.
              "badgeConfig": { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a "badged label".
                "color": { # 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(''); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "priorityOverride": "A String", # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
              },
              "description": "A String", # The description of this label.
              "displayName": "A String", # Required. The display text to show in the UI identifying this field.
              "insertBeforeChoice": "A String", # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
            },
            "publishTime": "A String", # Output only. The time this choice was published. This value has no meaning when the choice is not published.
            "publisher": { # Information about a user. # Output only. The user who published this choice. This value has no meaning when the choice is not published.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
            "schemaCapabilities": { # The capabilities related to this choice when editing the choice. # Output only. The capabilities related to this option when editing the option.
              "canDelete": True or False, # Whether the user can delete this choice.
              "canDisable": True or False, # Whether the user can disable this choice.
              "canEnable": True or False, # Whether the user can enable this choice.
              "canUpdate": True or False, # Whether the user can update this choice.
            },
            "updateTime": "A String", # Output only. The time this choice was updated last.
            "updater": { # Information about a user. # Output only. The user who updated this choice last.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
          },
        ],
        "listOptions": { # Options for a multi-valued variant of an associated field type. # When specified, indicates this field supports a list of values. Once the field is published, this cannot be changed.
          "maxEntries": 42, # Maximum number of entries permitted.
        },
      },
      "textOptions": { # Options for the Text field type. # Text field options.
        "maxLength": 42, # Output only. The maximum valid length of values for the text field.
        "minLength": 42, # Output only. The minimum valid length of values for the text field.
      },
      "updateTime": "A String", # Output only. The time this field was updated.
      "updater": { # Information about a user. # Output only. The user who modified this field.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "userOptions": { # Options for the user field type. # User field options.
        "listOptions": { # Options for a multi-valued variant of an associated field type. # When specified, indicates that this field supports a list of values. Once the field is published, this cannot be changed.
          "maxEntries": 42, # Maximum number of entries permitted.
        },
      },
    },
  ],
  "id": "A String", # Output only. Globally unique identifier of this label. ID makes up part of the label `name`, but unlike `name`, ID is consistent between revisions. Matches the regex: `([a-zA-Z0-9])+`
  "labelType": "A String", # Required. The type of label.
  "learnMoreUri": "A String", # Custom URL to present to users to allow them to learn more about this label and how it should be used.
  "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. The lifecycle state of the label including whether it's published, deprecated, and has draft changes.
    "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
      "hideInSearch": True or False, # 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.
      "showInApply": True or False, # 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.
    },
    "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
    "state": "A String", # Output only. The state of the object associated with this lifecycle.
  },
  "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this label.
    "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
  },
  "name": "A String", # Output only. Resource name of the label. Will be in the form of either: `labels/{id}` or `labels/{id}@{revision_id}` depending on the request. See `id` and `revision_id` below.
  "properties": { # Basic properties of the label. # Required. The basic properties of the label.
    "description": "A String", # The description of the label.
    "title": "A String", # Required. Title of the label.
  },
  "publishTime": "A String", # Output only. The time this label was published. This value has no meaning when the label is not published.
  "publisher": { # Information about a user. # Output only. The user who published this label. This value has no meaning when the label is not published.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "revisionCreateTime": "A String", # Output only. The time this label revision was created.
  "revisionCreator": { # Information about a user. # Output only. The user who created this label revision.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "revisionId": "A String", # Output only. Revision ID of the label. Revision ID might be part of the label `name` depending on the request issued. A new revision is created whenever revisioned properties of a label are changed. Matches the regex: `([a-zA-Z0-9])+`
  "schemaCapabilities": { # The capabilities related to this label when editing the label. # Output only. The capabilities the user has on this label.
    "canDelete": True or False, # Whether the user can delete this label. The user must have permission and the label must be disabled.
    "canDisable": True or False, # Whether the user can disable this label. The user must have permission and this label must not already be disabled.
    "canEnable": True or False, # Whether the user can enable this label. The user must have permission and this label must be disabled.
    "canUpdate": True or False, # Whether the user can change this label.
  },
}

  languageCode: string, The BCP-47 language code to use for evaluating localized Field labels in response. When not specified, values in the default configured language will be used.
  useAdminAccess: boolean, Set to `true` in order to use the user's admin privileges. The server will verify the user is an admin before allowing access.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A label defines a taxonomy that can be applied to Drive items in order to organize and search across items. Labels can be simple strings, or can contain fields that describe additional metadata that can be further used to organize and search Drive items.
  "appliedCapabilities": { # The capabilities a user has on this label's applied metadata. # Output only. The capabilities related to this label on applied metadata.
    "canApply": True or False, # Whether the user can apply this label to items.
    "canRead": True or False, # Whether the user can read applied metadata related to this label.
    "canRemove": True or False, # Whether the user can remove this label from items.
  },
  "appliedLabelPolicy": { # Behavior of this label when it's applied to Drive items. # Output only. Behavior of this label when it's applied to Drive items.
    "copyMode": "A String", # Indicates how the applied label and field values should be copied when a Drive item is copied.
  },
  "createTime": "A String", # Output only. The time this label was created.
  "creator": { # Information about a user. # Output only. The user who created this label.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "customer": "A String", # Output only. The customer this label belongs to. For example: "customers/123abc789."
  "disableTime": "A String", # Output only. The time this label was disabled. This value has no meaning when the label is not disabled.
  "disabler": { # Information about a user. # Output only. The user who disabled this label. This value has no meaning when the label is not disabled.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "displayHints": { # UI display hints for rendering the label. # Output only. UI display hints for rendering the label.
    "disabled": True or False, # Whether the label should be shown in the UI as disabled.
    "hiddenInSearch": True or False, # This label should be hidden in the search menu when searching for Drive items.
    "priority": "A String", # Order to display label in a list.
    "shownInApply": True or False, # This label should be shown in the apply menu when applying values to a Drive item.
  },
  "fields": [ # List of fields in descending priority order.
    { # 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.
      "appliedCapabilities": { # The capabilities related to this field on applied metadata. # Output only. The capabilities this user has on this field and its value when the label is applied on Drive items.
        "canRead": True or False, # Whether the user can read related applied metadata on items.
        "canSearch": True or False, # Whether the user can search for Drive items referencing this field.
        "canWrite": True or False, # Whether the user can set this field on Drive items.
      },
      "createTime": "A String", # Output only. The time this field was created.
      "creator": { # Information about a user. # Output only. The user who created this field.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "dateOptions": { # Options for the date field type. # Date field options.
        "dateFormat": "A String", # Output only. ICU date format.
        "dateFormatType": "A String", # Localized date formatting option. Field values are rendered in this format according to their locale.
        "maxValue": { # 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 # Output only. Maximum valid value (year, month, day).
          "day": 42, # 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.
          "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
        "minValue": { # 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 # Output only. Minimum valid value (year, month, day).
          "day": 42, # 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.
          "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
      },
      "disableTime": "A String", # Output only. The time this field was disabled. This value has no meaning when the field is not disabled.
      "disabler": { # Information about a user. # Output only. The user who disabled this field. This value has no meaning when the field is not disabled.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "displayHints": { # UI display hints for rendering a field. # Output only. UI display hints for rendering a field.
        "disabled": True or False, # Whether the field should be shown in the UI as disabled.
        "hiddenInSearch": True or False, # This field should be hidden in the search menu when searching for Drive items.
        "required": True or False, # Whether the field should be shown as required in the UI.
        "shownInApply": True or False, # This field should be shown in the apply menu when applying values to a Drive item.
      },
      "id": "A 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])+`
      "integerOptions": { # Options for the Integer field type. # Integer field options.
        "maxValue": "A String", # Output only. The maximum valid value for the integer field.
        "minValue": "A String", # Output only. The minimum valid value for the integer field.
      },
      "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. The lifecycle of this field.
        "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
          "hideInSearch": True or False, # 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.
          "showInApply": True or False, # 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.
        },
        "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
        "state": "A String", # Output only. The state of the object associated with this lifecycle.
      },
      "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this field.
        "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
      },
      "properties": { # The basic properties of the field. # The basic properties of the field.
        "displayName": "A String", # Required. The display text to show in the UI identifying this field.
        "insertBeforeField": "A 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": True or False, # Whether the field should be marked as required.
      },
      "publisher": { # Information about a user. # Output only. The user who published this field. This value has no meaning when the field is not published.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "queryKey": "A 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".
      "schemaCapabilities": { # The capabilities related to this field when editing the field. # Output only. The capabilities this user has when editing this field.
        "canDelete": True or False, # Whether the user can delete this field. The user must have permission and the field must be deprecated.
        "canDisable": True or False, # Whether the user can disable this field. The user must have permission and this field must not already be disabled.
        "canEnable": True or False, # Whether the user can enable this field. The user must have permission and this field must be disabled.
        "canUpdate": True or False, # Whether the user can change this field.
      },
      "selectionOptions": { # Options for the selection field type. # Selection field options.
        "choices": [ # The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.
          { # Selection field choice.
            "appliedCapabilities": { # The capabilities related to this choice on applied metadata. # Output only. The capabilities related to this choice on applied metadata.
              "canRead": True or False, # Whether the user can read related applied metadata on items.
              "canSearch": True or False, # Whether the user can use this choice in search queries.
              "canSelect": True or False, # Whether the user can select this choice on an item.
            },
            "createTime": "A String", # Output only. The time this choice was created.
            "creator": { # Information about a user. # Output only. The user who created this choice.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
            "disableTime": "A String", # Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
            "disabler": { # Information about a user. # Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
            "displayHints": { # UI display hints for rendering an option. # Output only. UI display hints for rendering a choice.
              "badgeColors": { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The colors to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                "backgroundColor": { # 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(''); }; // ... # Output only. Badge background that pairs with the foreground.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "foregroundColor": { # 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(''); }; // ... # Output only. Badge foreground that pairs with the background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "soloColor": { # 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(''); }; // ... # Output only. Color that can be used for text without a background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              "badgePriority": "A String", # 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.
              "darkBadgeColors": { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The dark-mode color to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                "backgroundColor": { # 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(''); }; // ... # Output only. Badge background that pairs with the foreground.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "foregroundColor": { # 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(''); }; // ... # Output only. Badge foreground that pairs with the background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "soloColor": { # 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(''); }; // ... # Output only. Color that can be used for text without a background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              "disabled": True or False, # Whether the option should be shown in the UI as disabled.
              "hiddenInSearch": True or False, # This option should be hidden in the search menu when searching for Drive items.
              "shownInApply": True or False, # This option should be shown in the apply menu when applying values to a Drive item.
            },
            "id": "A String", # The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
            "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. Lifecycle of the choice.
              "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
                "hideInSearch": True or False, # 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.
                "showInApply": True or False, # 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.
              },
              "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
              "state": "A String", # Output only. The state of the object associated with this lifecycle.
            },
            "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this choice.
              "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
            },
            "properties": { # Basic properties of the choice. # Basic properties of the choice.
              "badgeConfig": { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a "badged label".
                "color": { # 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(''); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "priorityOverride": "A String", # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
              },
              "description": "A String", # The description of this label.
              "displayName": "A String", # Required. The display text to show in the UI identifying this field.
              "insertBeforeChoice": "A String", # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
            },
            "publishTime": "A String", # Output only. The time this choice was published. This value has no meaning when the choice is not published.
            "publisher": { # Information about a user. # Output only. The user who published this choice. This value has no meaning when the choice is not published.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
            "schemaCapabilities": { # The capabilities related to this choice when editing the choice. # Output only. The capabilities related to this option when editing the option.
              "canDelete": True or False, # Whether the user can delete this choice.
              "canDisable": True or False, # Whether the user can disable this choice.
              "canEnable": True or False, # Whether the user can enable this choice.
              "canUpdate": True or False, # Whether the user can update this choice.
            },
            "updateTime": "A String", # Output only. The time this choice was updated last.
            "updater": { # Information about a user. # Output only. The user who updated this choice last.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
          },
        ],
        "listOptions": { # Options for a multi-valued variant of an associated field type. # When specified, indicates this field supports a list of values. Once the field is published, this cannot be changed.
          "maxEntries": 42, # Maximum number of entries permitted.
        },
      },
      "textOptions": { # Options for the Text field type. # Text field options.
        "maxLength": 42, # Output only. The maximum valid length of values for the text field.
        "minLength": 42, # Output only. The minimum valid length of values for the text field.
      },
      "updateTime": "A String", # Output only. The time this field was updated.
      "updater": { # Information about a user. # Output only. The user who modified this field.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "userOptions": { # Options for the user field type. # User field options.
        "listOptions": { # Options for a multi-valued variant of an associated field type. # When specified, indicates that this field supports a list of values. Once the field is published, this cannot be changed.
          "maxEntries": 42, # Maximum number of entries permitted.
        },
      },
    },
  ],
  "id": "A String", # Output only. Globally unique identifier of this label. ID makes up part of the label `name`, but unlike `name`, ID is consistent between revisions. Matches the regex: `([a-zA-Z0-9])+`
  "labelType": "A String", # Required. The type of label.
  "learnMoreUri": "A String", # Custom URL to present to users to allow them to learn more about this label and how it should be used.
  "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. The lifecycle state of the label including whether it's published, deprecated, and has draft changes.
    "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
      "hideInSearch": True or False, # 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.
      "showInApply": True or False, # 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.
    },
    "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
    "state": "A String", # Output only. The state of the object associated with this lifecycle.
  },
  "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this label.
    "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
  },
  "name": "A String", # Output only. Resource name of the label. Will be in the form of either: `labels/{id}` or `labels/{id}@{revision_id}` depending on the request. See `id` and `revision_id` below.
  "properties": { # Basic properties of the label. # Required. The basic properties of the label.
    "description": "A String", # The description of the label.
    "title": "A String", # Required. Title of the label.
  },
  "publishTime": "A String", # Output only. The time this label was published. This value has no meaning when the label is not published.
  "publisher": { # Information about a user. # Output only. The user who published this label. This value has no meaning when the label is not published.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "revisionCreateTime": "A String", # Output only. The time this label revision was created.
  "revisionCreator": { # Information about a user. # Output only. The user who created this label revision.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "revisionId": "A String", # Output only. Revision ID of the label. Revision ID might be part of the label `name` depending on the request issued. A new revision is created whenever revisioned properties of a label are changed. Matches the regex: `([a-zA-Z0-9])+`
  "schemaCapabilities": { # The capabilities related to this label when editing the label. # Output only. The capabilities the user has on this label.
    "canDelete": True or False, # Whether the user can delete this label. The user must have permission and the label must be disabled.
    "canDisable": True or False, # Whether the user can disable this label. The user must have permission and this label must not already be disabled.
    "canEnable": True or False, # Whether the user can enable this label. The user must have permission and this label must be disabled.
    "canUpdate": True or False, # Whether the user can change this label.
  },
}
delete(name, useAdminAccess=None, writeControl_requiredRevisionId=None, x__xgafv=None)
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.

Args:
  name: string, Required. Label resource name. (required)
  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.
  writeControl_requiredRevisionId: string, The revision_id of the label that the write request will be applied to. If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}
delta(name, body=None, x__xgafv=None)
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.

Args:
  name: string, Required. The resource name of the Label to update. (required)
  body: object, The request body.
    The object takes the form of:

{ # The set of requests for updating aspects of a Label. If any request is not valid, no requests will be applied.
  "languageCode": "A String", # The BCP-47 language code to use for evaluating localized Field labels when `include_label_in_response` is `true`.
  "requests": [ # A list of updates to apply to the Label. Requests will be applied in the order they are specified.
    { # A single kind of update to apply to a Label.
      "createField": { # Request to create a Field within a Label. # Creates a new Field.
        "field": { # 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. # Required. Field to create.
          "appliedCapabilities": { # The capabilities related to this field on applied metadata. # Output only. The capabilities this user has on this field and its value when the label is applied on Drive items.
            "canRead": True or False, # Whether the user can read related applied metadata on items.
            "canSearch": True or False, # Whether the user can search for Drive items referencing this field.
            "canWrite": True or False, # Whether the user can set this field on Drive items.
          },
          "createTime": "A String", # Output only. The time this field was created.
          "creator": { # Information about a user. # Output only. The user who created this field.
            "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
          },
          "dateOptions": { # Options for the date field type. # Date field options.
            "dateFormat": "A String", # Output only. ICU date format.
            "dateFormatType": "A String", # Localized date formatting option. Field values are rendered in this format according to their locale.
            "maxValue": { # 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 # Output only. Maximum valid value (year, month, day).
              "day": 42, # 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.
              "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
              "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
            },
            "minValue": { # 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 # Output only. Minimum valid value (year, month, day).
              "day": 42, # 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.
              "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
              "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
            },
          },
          "disableTime": "A String", # Output only. The time this field was disabled. This value has no meaning when the field is not disabled.
          "disabler": { # Information about a user. # Output only. The user who disabled this field. This value has no meaning when the field is not disabled.
            "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
          },
          "displayHints": { # UI display hints for rendering a field. # Output only. UI display hints for rendering a field.
            "disabled": True or False, # Whether the field should be shown in the UI as disabled.
            "hiddenInSearch": True or False, # This field should be hidden in the search menu when searching for Drive items.
            "required": True or False, # Whether the field should be shown as required in the UI.
            "shownInApply": True or False, # This field should be shown in the apply menu when applying values to a Drive item.
          },
          "id": "A 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])+`
          "integerOptions": { # Options for the Integer field type. # Integer field options.
            "maxValue": "A String", # Output only. The maximum valid value for the integer field.
            "minValue": "A String", # Output only. The minimum valid value for the integer field.
          },
          "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. The lifecycle of this field.
            "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
              "hideInSearch": True or False, # 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.
              "showInApply": True or False, # 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.
            },
            "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
            "state": "A String", # Output only. The state of the object associated with this lifecycle.
          },
          "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this field.
            "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
          },
          "properties": { # The basic properties of the field. # The basic properties of the field.
            "displayName": "A String", # Required. The display text to show in the UI identifying this field.
            "insertBeforeField": "A 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": True or False, # Whether the field should be marked as required.
          },
          "publisher": { # Information about a user. # Output only. The user who published this field. This value has no meaning when the field is not published.
            "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
          },
          "queryKey": "A 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".
          "schemaCapabilities": { # The capabilities related to this field when editing the field. # Output only. The capabilities this user has when editing this field.
            "canDelete": True or False, # Whether the user can delete this field. The user must have permission and the field must be deprecated.
            "canDisable": True or False, # Whether the user can disable this field. The user must have permission and this field must not already be disabled.
            "canEnable": True or False, # Whether the user can enable this field. The user must have permission and this field must be disabled.
            "canUpdate": True or False, # Whether the user can change this field.
          },
          "selectionOptions": { # Options for the selection field type. # Selection field options.
            "choices": [ # The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.
              { # Selection field choice.
                "appliedCapabilities": { # The capabilities related to this choice on applied metadata. # Output only. The capabilities related to this choice on applied metadata.
                  "canRead": True or False, # Whether the user can read related applied metadata on items.
                  "canSearch": True or False, # Whether the user can use this choice in search queries.
                  "canSelect": True or False, # Whether the user can select this choice on an item.
                },
                "createTime": "A String", # Output only. The time this choice was created.
                "creator": { # Information about a user. # Output only. The user who created this choice.
                  "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
                },
                "disableTime": "A String", # Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
                "disabler": { # Information about a user. # Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
                  "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
                },
                "displayHints": { # UI display hints for rendering an option. # Output only. UI display hints for rendering a choice.
                  "badgeColors": { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The colors to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                    "backgroundColor": { # 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(''); }; // ... # Output only. Badge background that pairs with the foreground.
                      "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                    "foregroundColor": { # 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(''); }; // ... # Output only. Badge foreground that pairs with the background.
                      "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                    "soloColor": { # 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(''); }; // ... # Output only. Color that can be used for text without a background.
                      "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                  },
                  "badgePriority": "A String", # 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.
                  "darkBadgeColors": { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The dark-mode color to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                    "backgroundColor": { # 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(''); }; // ... # Output only. Badge background that pairs with the foreground.
                      "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                    "foregroundColor": { # 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(''); }; // ... # Output only. Badge foreground that pairs with the background.
                      "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                    "soloColor": { # 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(''); }; // ... # Output only. Color that can be used for text without a background.
                      "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                  },
                  "disabled": True or False, # Whether the option should be shown in the UI as disabled.
                  "hiddenInSearch": True or False, # This option should be hidden in the search menu when searching for Drive items.
                  "shownInApply": True or False, # This option should be shown in the apply menu when applying values to a Drive item.
                },
                "id": "A String", # The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
                "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. Lifecycle of the choice.
                  "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
                    "hideInSearch": True or False, # 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.
                    "showInApply": True or False, # 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.
                  },
                  "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
                  "state": "A String", # Output only. The state of the object associated with this lifecycle.
                },
                "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this choice.
                  "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
                },
                "properties": { # Basic properties of the choice. # Basic properties of the choice.
                  "badgeConfig": { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a "badged label".
                    "color": { # 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(''); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
                      "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                    "priorityOverride": "A String", # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
                  },
                  "description": "A String", # The description of this label.
                  "displayName": "A String", # Required. The display text to show in the UI identifying this field.
                  "insertBeforeChoice": "A String", # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
                },
                "publishTime": "A String", # Output only. The time this choice was published. This value has no meaning when the choice is not published.
                "publisher": { # Information about a user. # Output only. The user who published this choice. This value has no meaning when the choice is not published.
                  "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
                },
                "schemaCapabilities": { # The capabilities related to this choice when editing the choice. # Output only. The capabilities related to this option when editing the option.
                  "canDelete": True or False, # Whether the user can delete this choice.
                  "canDisable": True or False, # Whether the user can disable this choice.
                  "canEnable": True or False, # Whether the user can enable this choice.
                  "canUpdate": True or False, # Whether the user can update this choice.
                },
                "updateTime": "A String", # Output only. The time this choice was updated last.
                "updater": { # Information about a user. # Output only. The user who updated this choice last.
                  "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
                },
              },
            ],
            "listOptions": { # Options for a multi-valued variant of an associated field type. # When specified, indicates this field supports a list of values. Once the field is published, this cannot be changed.
              "maxEntries": 42, # Maximum number of entries permitted.
            },
          },
          "textOptions": { # Options for the Text field type. # Text field options.
            "maxLength": 42, # Output only. The maximum valid length of values for the text field.
            "minLength": 42, # Output only. The minimum valid length of values for the text field.
          },
          "updateTime": "A String", # Output only. The time this field was updated.
          "updater": { # Information about a user. # Output only. The user who modified this field.
            "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
          },
          "userOptions": { # Options for the user field type. # User field options.
            "listOptions": { # Options for a multi-valued variant of an associated field type. # When specified, indicates that this field supports a list of values. Once the field is published, this cannot be changed.
              "maxEntries": 42, # Maximum number of entries permitted.
            },
          },
        },
      },
      "createSelectionChoice": { # Request to create a Selection Choice. # Creates Choice within a Selection field.
        "choice": { # Selection field choice. # Required. The Choice to create.
          "appliedCapabilities": { # The capabilities related to this choice on applied metadata. # Output only. The capabilities related to this choice on applied metadata.
            "canRead": True or False, # Whether the user can read related applied metadata on items.
            "canSearch": True or False, # Whether the user can use this choice in search queries.
            "canSelect": True or False, # Whether the user can select this choice on an item.
          },
          "createTime": "A String", # Output only. The time this choice was created.
          "creator": { # Information about a user. # Output only. The user who created this choice.
            "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
          },
          "disableTime": "A String", # Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
          "disabler": { # Information about a user. # Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
            "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
          },
          "displayHints": { # UI display hints for rendering an option. # Output only. UI display hints for rendering a choice.
            "badgeColors": { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The colors to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
              "backgroundColor": { # 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(''); }; // ... # Output only. Badge background that pairs with the foreground.
                "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
              },
              "foregroundColor": { # 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(''); }; // ... # Output only. Badge foreground that pairs with the background.
                "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
              },
              "soloColor": { # 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(''); }; // ... # Output only. Color that can be used for text without a background.
                "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
              },
            },
            "badgePriority": "A String", # 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.
            "darkBadgeColors": { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The dark-mode color to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
              "backgroundColor": { # 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(''); }; // ... # Output only. Badge background that pairs with the foreground.
                "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
              },
              "foregroundColor": { # 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(''); }; // ... # Output only. Badge foreground that pairs with the background.
                "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
              },
              "soloColor": { # 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(''); }; // ... # Output only. Color that can be used for text without a background.
                "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
              },
            },
            "disabled": True or False, # Whether the option should be shown in the UI as disabled.
            "hiddenInSearch": True or False, # This option should be hidden in the search menu when searching for Drive items.
            "shownInApply": True or False, # This option should be shown in the apply menu when applying values to a Drive item.
          },
          "id": "A String", # The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
          "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. Lifecycle of the choice.
            "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
              "hideInSearch": True or False, # 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.
              "showInApply": True or False, # 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.
            },
            "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
            "state": "A String", # Output only. The state of the object associated with this lifecycle.
          },
          "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this choice.
            "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
          },
          "properties": { # Basic properties of the choice. # Basic properties of the choice.
            "badgeConfig": { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a "badged label".
              "color": { # 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(''); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
                "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
              },
              "priorityOverride": "A String", # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
            },
            "description": "A String", # The description of this label.
            "displayName": "A String", # Required. The display text to show in the UI identifying this field.
            "insertBeforeChoice": "A String", # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
          },
          "publishTime": "A String", # Output only. The time this choice was published. This value has no meaning when the choice is not published.
          "publisher": { # Information about a user. # Output only. The user who published this choice. This value has no meaning when the choice is not published.
            "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
          },
          "schemaCapabilities": { # The capabilities related to this choice when editing the choice. # Output only. The capabilities related to this option when editing the option.
            "canDelete": True or False, # Whether the user can delete this choice.
            "canDisable": True or False, # Whether the user can disable this choice.
            "canEnable": True or False, # Whether the user can enable this choice.
            "canUpdate": True or False, # Whether the user can update this choice.
          },
          "updateTime": "A String", # Output only. The time this choice was updated last.
          "updater": { # Information about a user. # Output only. The user who updated this choice last.
            "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
          },
        },
        "fieldId": "A String", # Required. The Selection Field in which a Choice will be created.
      },
      "deleteField": { # Request to delete the Field. # Deletes a Field from the label.
        "id": "A String", # Required. ID of the Field to delete.
      },
      "deleteSelectionChoice": { # Request to delete a Choice. # Delete a Choice within a Selection Field.
        "fieldId": "A String", # Required. The Selection Field from which a Choice will be deleted.
        "id": "A String", # Required. Choice to delete.
      },
      "disableField": { # Request to disable the Field. # Disables the Field.
        "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # Required. Field Disabled Policy.
          "hideInSearch": True or False, # 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.
          "showInApply": True or False, # 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.
        },
        "id": "A String", # Required. Key of the Field to disable.
        "updateMask": "A String", # 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 short-hand for updating every field.
      },
      "disableSelectionChoice": { # Request to disable a Choice. # Disable a Choice within a Selection Field.
        "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # Required. The disabled policy to update.
          "hideInSearch": True or False, # 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.
          "showInApply": True or False, # 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.
        },
        "fieldId": "A String", # Required. The Selection Field in which a Choice will be disabled.
        "id": "A String", # Required. Choice to disable.
        "updateMask": "A String", # 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 short-hand for updating every field.
      },
      "enableField": { # Request to enable the Field. # Enables the Field.
        "id": "A String", # Required. ID of the Field to enable.
      },
      "enableSelectionChoice": { # Request to enable a Choice. # Enable a Choice within a Selection Field.
        "fieldId": "A String", # Required. The Selection Field in which a Choice will be enabled.
        "id": "A String", # Required. Choice to enable.
      },
      "updateField": { # Request to update Field properties. # Updates basic properties of a Field.
        "id": "A String", # Required. The Field to update.
        "properties": { # The basic properties of the field. # Required. Basic Field properties.
          "displayName": "A String", # Required. The display text to show in the UI identifying this field.
          "insertBeforeField": "A 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": True or False, # Whether the field should be marked as required.
        },
        "updateMask": "A String", # 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 short-hand for updating every field.
      },
      "updateFieldType": { # Request to change the type of a Field. # Update Field type and/or type options.
        "dateOptions": { # Options for the date field type. # Update field to Date.
          "dateFormat": "A String", # Output only. ICU date format.
          "dateFormatType": "A String", # Localized date formatting option. Field values are rendered in this format according to their locale.
          "maxValue": { # 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 # Output only. Maximum valid value (year, month, day).
            "day": 42, # 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.
            "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
            "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
          },
          "minValue": { # 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 # Output only. Minimum valid value (year, month, day).
            "day": 42, # 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.
            "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
            "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
          },
        },
        "id": "A String", # Required. The Field to update.
        "integerOptions": { # Options for the Integer field type. # Update field to Integer.
          "maxValue": "A String", # Output only. The maximum valid value for the integer field.
          "minValue": "A String", # Output only. The minimum valid value for the integer field.
        },
        "selectionOptions": { # Options for the selection field type. # Update field to Selection.
          "choices": [ # The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.
            { # Selection field choice.
              "appliedCapabilities": { # The capabilities related to this choice on applied metadata. # Output only. The capabilities related to this choice on applied metadata.
                "canRead": True or False, # Whether the user can read related applied metadata on items.
                "canSearch": True or False, # Whether the user can use this choice in search queries.
                "canSelect": True or False, # Whether the user can select this choice on an item.
              },
              "createTime": "A String", # Output only. The time this choice was created.
              "creator": { # Information about a user. # Output only. The user who created this choice.
                "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
              },
              "disableTime": "A String", # Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
              "disabler": { # Information about a user. # Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
                "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
              },
              "displayHints": { # UI display hints for rendering an option. # Output only. UI display hints for rendering a choice.
                "badgeColors": { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The colors to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                  "backgroundColor": { # 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(''); }; // ... # Output only. Badge background that pairs with the foreground.
                    "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                  "foregroundColor": { # 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(''); }; // ... # Output only. Badge foreground that pairs with the background.
                    "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                  "soloColor": { # 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(''); }; // ... # Output only. Color that can be used for text without a background.
                    "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                },
                "badgePriority": "A String", # 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.
                "darkBadgeColors": { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The dark-mode color to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                  "backgroundColor": { # 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(''); }; // ... # Output only. Badge background that pairs with the foreground.
                    "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                  "foregroundColor": { # 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(''); }; // ... # Output only. Badge foreground that pairs with the background.
                    "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                  "soloColor": { # 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(''); }; // ... # Output only. Color that can be used for text without a background.
                    "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                },
                "disabled": True or False, # Whether the option should be shown in the UI as disabled.
                "hiddenInSearch": True or False, # This option should be hidden in the search menu when searching for Drive items.
                "shownInApply": True or False, # This option should be shown in the apply menu when applying values to a Drive item.
              },
              "id": "A String", # The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
              "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. Lifecycle of the choice.
                "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
                  "hideInSearch": True or False, # 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.
                  "showInApply": True or False, # 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.
                },
                "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
                "state": "A String", # Output only. The state of the object associated with this lifecycle.
              },
              "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this choice.
                "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
              },
              "properties": { # Basic properties of the choice. # Basic properties of the choice.
                "badgeConfig": { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a "badged label".
                  "color": { # 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(''); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
                    "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                  "priorityOverride": "A String", # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
                },
                "description": "A String", # The description of this label.
                "displayName": "A String", # Required. The display text to show in the UI identifying this field.
                "insertBeforeChoice": "A String", # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
              },
              "publishTime": "A String", # Output only. The time this choice was published. This value has no meaning when the choice is not published.
              "publisher": { # Information about a user. # Output only. The user who published this choice. This value has no meaning when the choice is not published.
                "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
              },
              "schemaCapabilities": { # The capabilities related to this choice when editing the choice. # Output only. The capabilities related to this option when editing the option.
                "canDelete": True or False, # Whether the user can delete this choice.
                "canDisable": True or False, # Whether the user can disable this choice.
                "canEnable": True or False, # Whether the user can enable this choice.
                "canUpdate": True or False, # Whether the user can update this choice.
              },
              "updateTime": "A String", # Output only. The time this choice was updated last.
              "updater": { # Information about a user. # Output only. The user who updated this choice last.
                "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
              },
            },
          ],
          "listOptions": { # Options for a multi-valued variant of an associated field type. # When specified, indicates this field supports a list of values. Once the field is published, this cannot be changed.
            "maxEntries": 42, # Maximum number of entries permitted.
          },
        },
        "textOptions": { # Options for the Text field type. # Update field to Text.
          "maxLength": 42, # Output only. The maximum valid length of values for the text field.
          "minLength": 42, # Output only. The minimum valid length of values for the text field.
        },
        "updateMask": "A String", # 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 short-hand for updating every field.
        "userOptions": { # Options for the user field type. # Update field to User.
          "listOptions": { # Options for a multi-valued variant of an associated field type. # When specified, indicates that this field supports a list of values. Once the field is published, this cannot be changed.
            "maxEntries": 42, # Maximum number of entries permitted.
          },
        },
      },
      "updateLabel": { # Updates basic properties of a Label. # Updates the Label properties.
        "properties": { # Basic properties of the label. # Required. Label properties to update.
          "description": "A String", # The description of the label.
          "title": "A String", # Required. Title of the label.
        },
        "updateMask": "A String", # 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 short-hand for updating every field.
      },
      "updateSelectionChoiceProperties": { # Request to update a Choice properties. # Update a Choice properties within a Selection Field.
        "fieldId": "A String", # Required. The Selection Field to update.
        "id": "A String", # Required. The Choice to update.
        "properties": { # Basic properties of the choice. # Required. The Choice properties to update.
          "badgeConfig": { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a "badged label".
            "color": { # 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(''); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
              "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
              "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
              "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
            },
            "priorityOverride": "A String", # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
          },
          "description": "A String", # The description of this label.
          "displayName": "A String", # Required. The display text to show in the UI identifying this field.
          "insertBeforeChoice": "A String", # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
        },
        "updateMask": "A String", # 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 short-hand for updating every field.
      },
    },
  ],
  "useAdminAccess": True or False, # 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": "A String", # When specified, only certain fields belonging to the indicated view will be returned.
  "writeControl": { # Provides control over how write requests are executed. When not specified, the last write wins. # Provides control over how write requests are executed.
    "requiredRevisionId": "A String", # The revision_id of the label that the write request will be applied to. If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error.
  },
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response for Label update.
  "responses": [ # The reply of the updates. This maps 1:1 with the updates, although responses to some requests may be empty.
    { # A single response from an update.
      "createField": { # Response following Field create. # Creates a new Field.
        "id": "A String", # The field of the created field. When left blank in a create request, a key will be autogenerated and can be identified here.
        "priority": 42, # The priority of the created field. The priority may change from what was specified to assure contiguous priorities between fields (1-n).
      },
      "createSelectionChoice": { # Response following Selection Choice create. # Creates a new selection list option to add to a Selection Field.
        "fieldId": "A String", # The server-generated id of the field.
        "id": "A String", # The server-generated ID of the created choice within the Field
      },
      "deleteField": { # Response following Field delete. # Deletes a Field from the label.
      },
      "deleteSelectionChoice": { # Response following Choice delete. # Deletes a Choice from a Selection Field.
      },
      "disableField": { # Response following Field disable. # Disables Field.
      },
      "disableSelectionChoice": { # Response following Choice disable. # Disables a Choice within a Selection Field.
      },
      "enableField": { # Response following Field enable. # Enables Field.
      },
      "enableSelectionChoice": { # Response following Choice enable. # Enables a Choice within a Selection Field.
      },
      "updateField": { # Response following update to Field properties. # Updates basic properties of a Field.
        "priority": 42, # The priority of the updated field. The priority may change from what was specified to assure contiguous priorities between fields (1-n).
      },
      "updateFieldType": { # Response following update to Field type. # Update Field type and/or type options.
      },
      "updateLabel": { # Response following update to Label properties. # Updated basic properties of a Label.
      },
      "updateSelectionChoiceProperties": { # Response following update to Selection Choice properties. # Updates a Choice within a Selection Field.
        "priority": 42, # The priority of the updated choice. The priority may change from what was specified to assure contiguous priorities between choices (1-n).
      },
    },
  ],
  "updatedLabel": { # A label defines a taxonomy that can be applied to Drive items in order to organize and search across items. Labels can be simple strings, or can contain fields that describe additional metadata that can be further used to organize and search Drive items. # The label after updates were applied. This is only set if [BatchUpdateLabelResponse2.include_label_in_response] is `true` and there were no errors.
    "appliedCapabilities": { # The capabilities a user has on this label's applied metadata. # Output only. The capabilities related to this label on applied metadata.
      "canApply": True or False, # Whether the user can apply this label to items.
      "canRead": True or False, # Whether the user can read applied metadata related to this label.
      "canRemove": True or False, # Whether the user can remove this label from items.
    },
    "appliedLabelPolicy": { # Behavior of this label when it's applied to Drive items. # Output only. Behavior of this label when it's applied to Drive items.
      "copyMode": "A String", # Indicates how the applied label and field values should be copied when a Drive item is copied.
    },
    "createTime": "A String", # Output only. The time this label was created.
    "creator": { # Information about a user. # Output only. The user who created this label.
      "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
    },
    "customer": "A String", # Output only. The customer this label belongs to. For example: "customers/123abc789."
    "disableTime": "A String", # Output only. The time this label was disabled. This value has no meaning when the label is not disabled.
    "disabler": { # Information about a user. # Output only. The user who disabled this label. This value has no meaning when the label is not disabled.
      "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
    },
    "displayHints": { # UI display hints for rendering the label. # Output only. UI display hints for rendering the label.
      "disabled": True or False, # Whether the label should be shown in the UI as disabled.
      "hiddenInSearch": True or False, # This label should be hidden in the search menu when searching for Drive items.
      "priority": "A String", # Order to display label in a list.
      "shownInApply": True or False, # This label should be shown in the apply menu when applying values to a Drive item.
    },
    "fields": [ # List of fields in descending priority order.
      { # 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.
        "appliedCapabilities": { # The capabilities related to this field on applied metadata. # Output only. The capabilities this user has on this field and its value when the label is applied on Drive items.
          "canRead": True or False, # Whether the user can read related applied metadata on items.
          "canSearch": True or False, # Whether the user can search for Drive items referencing this field.
          "canWrite": True or False, # Whether the user can set this field on Drive items.
        },
        "createTime": "A String", # Output only. The time this field was created.
        "creator": { # Information about a user. # Output only. The user who created this field.
          "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
        },
        "dateOptions": { # Options for the date field type. # Date field options.
          "dateFormat": "A String", # Output only. ICU date format.
          "dateFormatType": "A String", # Localized date formatting option. Field values are rendered in this format according to their locale.
          "maxValue": { # 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 # Output only. Maximum valid value (year, month, day).
            "day": 42, # 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.
            "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
            "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
          },
          "minValue": { # 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 # Output only. Minimum valid value (year, month, day).
            "day": 42, # 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.
            "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
            "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
          },
        },
        "disableTime": "A String", # Output only. The time this field was disabled. This value has no meaning when the field is not disabled.
        "disabler": { # Information about a user. # Output only. The user who disabled this field. This value has no meaning when the field is not disabled.
          "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
        },
        "displayHints": { # UI display hints for rendering a field. # Output only. UI display hints for rendering a field.
          "disabled": True or False, # Whether the field should be shown in the UI as disabled.
          "hiddenInSearch": True or False, # This field should be hidden in the search menu when searching for Drive items.
          "required": True or False, # Whether the field should be shown as required in the UI.
          "shownInApply": True or False, # This field should be shown in the apply menu when applying values to a Drive item.
        },
        "id": "A 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])+`
        "integerOptions": { # Options for the Integer field type. # Integer field options.
          "maxValue": "A String", # Output only. The maximum valid value for the integer field.
          "minValue": "A String", # Output only. The minimum valid value for the integer field.
        },
        "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. The lifecycle of this field.
          "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
            "hideInSearch": True or False, # 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.
            "showInApply": True or False, # 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.
          },
          "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
          "state": "A String", # Output only. The state of the object associated with this lifecycle.
        },
        "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this field.
          "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
        },
        "properties": { # The basic properties of the field. # The basic properties of the field.
          "displayName": "A String", # Required. The display text to show in the UI identifying this field.
          "insertBeforeField": "A 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": True or False, # Whether the field should be marked as required.
        },
        "publisher": { # Information about a user. # Output only. The user who published this field. This value has no meaning when the field is not published.
          "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
        },
        "queryKey": "A 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".
        "schemaCapabilities": { # The capabilities related to this field when editing the field. # Output only. The capabilities this user has when editing this field.
          "canDelete": True or False, # Whether the user can delete this field. The user must have permission and the field must be deprecated.
          "canDisable": True or False, # Whether the user can disable this field. The user must have permission and this field must not already be disabled.
          "canEnable": True or False, # Whether the user can enable this field. The user must have permission and this field must be disabled.
          "canUpdate": True or False, # Whether the user can change this field.
        },
        "selectionOptions": { # Options for the selection field type. # Selection field options.
          "choices": [ # The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.
            { # Selection field choice.
              "appliedCapabilities": { # The capabilities related to this choice on applied metadata. # Output only. The capabilities related to this choice on applied metadata.
                "canRead": True or False, # Whether the user can read related applied metadata on items.
                "canSearch": True or False, # Whether the user can use this choice in search queries.
                "canSelect": True or False, # Whether the user can select this choice on an item.
              },
              "createTime": "A String", # Output only. The time this choice was created.
              "creator": { # Information about a user. # Output only. The user who created this choice.
                "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
              },
              "disableTime": "A String", # Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
              "disabler": { # Information about a user. # Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
                "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
              },
              "displayHints": { # UI display hints for rendering an option. # Output only. UI display hints for rendering a choice.
                "badgeColors": { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The colors to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                  "backgroundColor": { # 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(''); }; // ... # Output only. Badge background that pairs with the foreground.
                    "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                  "foregroundColor": { # 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(''); }; // ... # Output only. Badge foreground that pairs with the background.
                    "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                  "soloColor": { # 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(''); }; // ... # Output only. Color that can be used for text without a background.
                    "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                },
                "badgePriority": "A String", # 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.
                "darkBadgeColors": { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The dark-mode color to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                  "backgroundColor": { # 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(''); }; // ... # Output only. Badge background that pairs with the foreground.
                    "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                  "foregroundColor": { # 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(''); }; // ... # Output only. Badge foreground that pairs with the background.
                    "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                  "soloColor": { # 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(''); }; // ... # Output only. Color that can be used for text without a background.
                    "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                },
                "disabled": True or False, # Whether the option should be shown in the UI as disabled.
                "hiddenInSearch": True or False, # This option should be hidden in the search menu when searching for Drive items.
                "shownInApply": True or False, # This option should be shown in the apply menu when applying values to a Drive item.
              },
              "id": "A String", # The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
              "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. Lifecycle of the choice.
                "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
                  "hideInSearch": True or False, # 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.
                  "showInApply": True or False, # 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.
                },
                "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
                "state": "A String", # Output only. The state of the object associated with this lifecycle.
              },
              "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this choice.
                "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
              },
              "properties": { # Basic properties of the choice. # Basic properties of the choice.
                "badgeConfig": { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a "badged label".
                  "color": { # 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(''); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
                    "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                  "priorityOverride": "A String", # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
                },
                "description": "A String", # The description of this label.
                "displayName": "A String", # Required. The display text to show in the UI identifying this field.
                "insertBeforeChoice": "A String", # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
              },
              "publishTime": "A String", # Output only. The time this choice was published. This value has no meaning when the choice is not published.
              "publisher": { # Information about a user. # Output only. The user who published this choice. This value has no meaning when the choice is not published.
                "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
              },
              "schemaCapabilities": { # The capabilities related to this choice when editing the choice. # Output only. The capabilities related to this option when editing the option.
                "canDelete": True or False, # Whether the user can delete this choice.
                "canDisable": True or False, # Whether the user can disable this choice.
                "canEnable": True or False, # Whether the user can enable this choice.
                "canUpdate": True or False, # Whether the user can update this choice.
              },
              "updateTime": "A String", # Output only. The time this choice was updated last.
              "updater": { # Information about a user. # Output only. The user who updated this choice last.
                "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
              },
            },
          ],
          "listOptions": { # Options for a multi-valued variant of an associated field type. # When specified, indicates this field supports a list of values. Once the field is published, this cannot be changed.
            "maxEntries": 42, # Maximum number of entries permitted.
          },
        },
        "textOptions": { # Options for the Text field type. # Text field options.
          "maxLength": 42, # Output only. The maximum valid length of values for the text field.
          "minLength": 42, # Output only. The minimum valid length of values for the text field.
        },
        "updateTime": "A String", # Output only. The time this field was updated.
        "updater": { # Information about a user. # Output only. The user who modified this field.
          "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
        },
        "userOptions": { # Options for the user field type. # User field options.
          "listOptions": { # Options for a multi-valued variant of an associated field type. # When specified, indicates that this field supports a list of values. Once the field is published, this cannot be changed.
            "maxEntries": 42, # Maximum number of entries permitted.
          },
        },
      },
    ],
    "id": "A String", # Output only. Globally unique identifier of this label. ID makes up part of the label `name`, but unlike `name`, ID is consistent between revisions. Matches the regex: `([a-zA-Z0-9])+`
    "labelType": "A String", # Required. The type of label.
    "learnMoreUri": "A String", # Custom URL to present to users to allow them to learn more about this label and how it should be used.
    "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. The lifecycle state of the label including whether it's published, deprecated, and has draft changes.
      "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
        "hideInSearch": True or False, # 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.
        "showInApply": True or False, # 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.
      },
      "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
      "state": "A String", # Output only. The state of the object associated with this lifecycle.
    },
    "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this label.
      "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
    },
    "name": "A String", # Output only. Resource name of the label. Will be in the form of either: `labels/{id}` or `labels/{id}@{revision_id}` depending on the request. See `id` and `revision_id` below.
    "properties": { # Basic properties of the label. # Required. The basic properties of the label.
      "description": "A String", # The description of the label.
      "title": "A String", # Required. Title of the label.
    },
    "publishTime": "A String", # Output only. The time this label was published. This value has no meaning when the label is not published.
    "publisher": { # Information about a user. # Output only. The user who published this label. This value has no meaning when the label is not published.
      "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
    },
    "revisionCreateTime": "A String", # Output only. The time this label revision was created.
    "revisionCreator": { # Information about a user. # Output only. The user who created this label revision.
      "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
    },
    "revisionId": "A String", # Output only. Revision ID of the label. Revision ID might be part of the label `name` depending on the request issued. A new revision is created whenever revisioned properties of a label are changed. Matches the regex: `([a-zA-Z0-9])+`
    "schemaCapabilities": { # The capabilities related to this label when editing the label. # Output only. The capabilities the user has on this label.
      "canDelete": True or False, # Whether the user can delete this label. The user must have permission and the label must be disabled.
      "canDisable": True or False, # Whether the user can disable this label. The user must have permission and this label must not already be disabled.
      "canEnable": True or False, # Whether the user can enable this label. The user must have permission and this label must be disabled.
      "canUpdate": True or False, # Whether the user can change this label.
    },
  },
}
disable(name, body=None, x__xgafv=None)
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`.

Args:
  name: string, Required. Label resource name. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request to deprecate a published Label.
  "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # Disabled policy to use.
    "hideInSearch": True or False, # 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.
    "showInApply": True or False, # 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.
  },
  "languageCode": "A String", # The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language will be used.
  "updateMask": "A String", # 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 short-hand for updating every field.
  "useAdminAccess": True or False, # 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.
  "writeControl": { # Provides control over how write requests are executed. When not specified, the last write wins. # Provides control over how write requests are executed. Defaults to unset, which means last write wins.
    "requiredRevisionId": "A String", # The revision_id of the label that the write request will be applied to. If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error.
  },
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A label defines a taxonomy that can be applied to Drive items in order to organize and search across items. Labels can be simple strings, or can contain fields that describe additional metadata that can be further used to organize and search Drive items.
  "appliedCapabilities": { # The capabilities a user has on this label's applied metadata. # Output only. The capabilities related to this label on applied metadata.
    "canApply": True or False, # Whether the user can apply this label to items.
    "canRead": True or False, # Whether the user can read applied metadata related to this label.
    "canRemove": True or False, # Whether the user can remove this label from items.
  },
  "appliedLabelPolicy": { # Behavior of this label when it's applied to Drive items. # Output only. Behavior of this label when it's applied to Drive items.
    "copyMode": "A String", # Indicates how the applied label and field values should be copied when a Drive item is copied.
  },
  "createTime": "A String", # Output only. The time this label was created.
  "creator": { # Information about a user. # Output only. The user who created this label.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "customer": "A String", # Output only. The customer this label belongs to. For example: "customers/123abc789."
  "disableTime": "A String", # Output only. The time this label was disabled. This value has no meaning when the label is not disabled.
  "disabler": { # Information about a user. # Output only. The user who disabled this label. This value has no meaning when the label is not disabled.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "displayHints": { # UI display hints for rendering the label. # Output only. UI display hints for rendering the label.
    "disabled": True or False, # Whether the label should be shown in the UI as disabled.
    "hiddenInSearch": True or False, # This label should be hidden in the search menu when searching for Drive items.
    "priority": "A String", # Order to display label in a list.
    "shownInApply": True or False, # This label should be shown in the apply menu when applying values to a Drive item.
  },
  "fields": [ # List of fields in descending priority order.
    { # 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.
      "appliedCapabilities": { # The capabilities related to this field on applied metadata. # Output only. The capabilities this user has on this field and its value when the label is applied on Drive items.
        "canRead": True or False, # Whether the user can read related applied metadata on items.
        "canSearch": True or False, # Whether the user can search for Drive items referencing this field.
        "canWrite": True or False, # Whether the user can set this field on Drive items.
      },
      "createTime": "A String", # Output only. The time this field was created.
      "creator": { # Information about a user. # Output only. The user who created this field.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "dateOptions": { # Options for the date field type. # Date field options.
        "dateFormat": "A String", # Output only. ICU date format.
        "dateFormatType": "A String", # Localized date formatting option. Field values are rendered in this format according to their locale.
        "maxValue": { # 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 # Output only. Maximum valid value (year, month, day).
          "day": 42, # 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.
          "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
        "minValue": { # 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 # Output only. Minimum valid value (year, month, day).
          "day": 42, # 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.
          "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
      },
      "disableTime": "A String", # Output only. The time this field was disabled. This value has no meaning when the field is not disabled.
      "disabler": { # Information about a user. # Output only. The user who disabled this field. This value has no meaning when the field is not disabled.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "displayHints": { # UI display hints for rendering a field. # Output only. UI display hints for rendering a field.
        "disabled": True or False, # Whether the field should be shown in the UI as disabled.
        "hiddenInSearch": True or False, # This field should be hidden in the search menu when searching for Drive items.
        "required": True or False, # Whether the field should be shown as required in the UI.
        "shownInApply": True or False, # This field should be shown in the apply menu when applying values to a Drive item.
      },
      "id": "A 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])+`
      "integerOptions": { # Options for the Integer field type. # Integer field options.
        "maxValue": "A String", # Output only. The maximum valid value for the integer field.
        "minValue": "A String", # Output only. The minimum valid value for the integer field.
      },
      "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. The lifecycle of this field.
        "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
          "hideInSearch": True or False, # 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.
          "showInApply": True or False, # 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.
        },
        "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
        "state": "A String", # Output only. The state of the object associated with this lifecycle.
      },
      "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this field.
        "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
      },
      "properties": { # The basic properties of the field. # The basic properties of the field.
        "displayName": "A String", # Required. The display text to show in the UI identifying this field.
        "insertBeforeField": "A 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": True or False, # Whether the field should be marked as required.
      },
      "publisher": { # Information about a user. # Output only. The user who published this field. This value has no meaning when the field is not published.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "queryKey": "A 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".
      "schemaCapabilities": { # The capabilities related to this field when editing the field. # Output only. The capabilities this user has when editing this field.
        "canDelete": True or False, # Whether the user can delete this field. The user must have permission and the field must be deprecated.
        "canDisable": True or False, # Whether the user can disable this field. The user must have permission and this field must not already be disabled.
        "canEnable": True or False, # Whether the user can enable this field. The user must have permission and this field must be disabled.
        "canUpdate": True or False, # Whether the user can change this field.
      },
      "selectionOptions": { # Options for the selection field type. # Selection field options.
        "choices": [ # The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.
          { # Selection field choice.
            "appliedCapabilities": { # The capabilities related to this choice on applied metadata. # Output only. The capabilities related to this choice on applied metadata.
              "canRead": True or False, # Whether the user can read related applied metadata on items.
              "canSearch": True or False, # Whether the user can use this choice in search queries.
              "canSelect": True or False, # Whether the user can select this choice on an item.
            },
            "createTime": "A String", # Output only. The time this choice was created.
            "creator": { # Information about a user. # Output only. The user who created this choice.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
            "disableTime": "A String", # Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
            "disabler": { # Information about a user. # Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
            "displayHints": { # UI display hints for rendering an option. # Output only. UI display hints for rendering a choice.
              "badgeColors": { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The colors to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                "backgroundColor": { # 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(''); }; // ... # Output only. Badge background that pairs with the foreground.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "foregroundColor": { # 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(''); }; // ... # Output only. Badge foreground that pairs with the background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "soloColor": { # 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(''); }; // ... # Output only. Color that can be used for text without a background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              "badgePriority": "A String", # 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.
              "darkBadgeColors": { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The dark-mode color to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                "backgroundColor": { # 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(''); }; // ... # Output only. Badge background that pairs with the foreground.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "foregroundColor": { # 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(''); }; // ... # Output only. Badge foreground that pairs with the background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "soloColor": { # 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(''); }; // ... # Output only. Color that can be used for text without a background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              "disabled": True or False, # Whether the option should be shown in the UI as disabled.
              "hiddenInSearch": True or False, # This option should be hidden in the search menu when searching for Drive items.
              "shownInApply": True or False, # This option should be shown in the apply menu when applying values to a Drive item.
            },
            "id": "A String", # The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
            "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. Lifecycle of the choice.
              "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
                "hideInSearch": True or False, # 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.
                "showInApply": True or False, # 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.
              },
              "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
              "state": "A String", # Output only. The state of the object associated with this lifecycle.
            },
            "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this choice.
              "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
            },
            "properties": { # Basic properties of the choice. # Basic properties of the choice.
              "badgeConfig": { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a "badged label".
                "color": { # 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(''); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "priorityOverride": "A String", # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
              },
              "description": "A String", # The description of this label.
              "displayName": "A String", # Required. The display text to show in the UI identifying this field.
              "insertBeforeChoice": "A String", # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
            },
            "publishTime": "A String", # Output only. The time this choice was published. This value has no meaning when the choice is not published.
            "publisher": { # Information about a user. # Output only. The user who published this choice. This value has no meaning when the choice is not published.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
            "schemaCapabilities": { # The capabilities related to this choice when editing the choice. # Output only. The capabilities related to this option when editing the option.
              "canDelete": True or False, # Whether the user can delete this choice.
              "canDisable": True or False, # Whether the user can disable this choice.
              "canEnable": True or False, # Whether the user can enable this choice.
              "canUpdate": True or False, # Whether the user can update this choice.
            },
            "updateTime": "A String", # Output only. The time this choice was updated last.
            "updater": { # Information about a user. # Output only. The user who updated this choice last.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
          },
        ],
        "listOptions": { # Options for a multi-valued variant of an associated field type. # When specified, indicates this field supports a list of values. Once the field is published, this cannot be changed.
          "maxEntries": 42, # Maximum number of entries permitted.
        },
      },
      "textOptions": { # Options for the Text field type. # Text field options.
        "maxLength": 42, # Output only. The maximum valid length of values for the text field.
        "minLength": 42, # Output only. The minimum valid length of values for the text field.
      },
      "updateTime": "A String", # Output only. The time this field was updated.
      "updater": { # Information about a user. # Output only. The user who modified this field.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "userOptions": { # Options for the user field type. # User field options.
        "listOptions": { # Options for a multi-valued variant of an associated field type. # When specified, indicates that this field supports a list of values. Once the field is published, this cannot be changed.
          "maxEntries": 42, # Maximum number of entries permitted.
        },
      },
    },
  ],
  "id": "A String", # Output only. Globally unique identifier of this label. ID makes up part of the label `name`, but unlike `name`, ID is consistent between revisions. Matches the regex: `([a-zA-Z0-9])+`
  "labelType": "A String", # Required. The type of label.
  "learnMoreUri": "A String", # Custom URL to present to users to allow them to learn more about this label and how it should be used.
  "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. The lifecycle state of the label including whether it's published, deprecated, and has draft changes.
    "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
      "hideInSearch": True or False, # 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.
      "showInApply": True or False, # 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.
    },
    "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
    "state": "A String", # Output only. The state of the object associated with this lifecycle.
  },
  "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this label.
    "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
  },
  "name": "A String", # Output only. Resource name of the label. Will be in the form of either: `labels/{id}` or `labels/{id}@{revision_id}` depending on the request. See `id` and `revision_id` below.
  "properties": { # Basic properties of the label. # Required. The basic properties of the label.
    "description": "A String", # The description of the label.
    "title": "A String", # Required. Title of the label.
  },
  "publishTime": "A String", # Output only. The time this label was published. This value has no meaning when the label is not published.
  "publisher": { # Information about a user. # Output only. The user who published this label. This value has no meaning when the label is not published.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "revisionCreateTime": "A String", # Output only. The time this label revision was created.
  "revisionCreator": { # Information about a user. # Output only. The user who created this label revision.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "revisionId": "A String", # Output only. Revision ID of the label. Revision ID might be part of the label `name` depending on the request issued. A new revision is created whenever revisioned properties of a label are changed. Matches the regex: `([a-zA-Z0-9])+`
  "schemaCapabilities": { # The capabilities related to this label when editing the label. # Output only. The capabilities the user has on this label.
    "canDelete": True or False, # Whether the user can delete this label. The user must have permission and the label must be disabled.
    "canDisable": True or False, # Whether the user can disable this label. The user must have permission and this label must not already be disabled.
    "canEnable": True or False, # Whether the user can enable this label. The user must have permission and this label must be disabled.
    "canUpdate": True or False, # Whether the user can change this label.
  },
}
enable(name, body=None, x__xgafv=None)
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.

Args:
  name: string, Required. Label resource name. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request to enable a label.
  "languageCode": "A String", # The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language will be used.
  "useAdminAccess": True or False, # 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.
  "writeControl": { # Provides control over how write requests are executed. When not specified, the last write wins. # Provides control over how write requests are executed. Defaults to unset, which means last write wins.
    "requiredRevisionId": "A String", # The revision_id of the label that the write request will be applied to. If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error.
  },
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A label defines a taxonomy that can be applied to Drive items in order to organize and search across items. Labels can be simple strings, or can contain fields that describe additional metadata that can be further used to organize and search Drive items.
  "appliedCapabilities": { # The capabilities a user has on this label's applied metadata. # Output only. The capabilities related to this label on applied metadata.
    "canApply": True or False, # Whether the user can apply this label to items.
    "canRead": True or False, # Whether the user can read applied metadata related to this label.
    "canRemove": True or False, # Whether the user can remove this label from items.
  },
  "appliedLabelPolicy": { # Behavior of this label when it's applied to Drive items. # Output only. Behavior of this label when it's applied to Drive items.
    "copyMode": "A String", # Indicates how the applied label and field values should be copied when a Drive item is copied.
  },
  "createTime": "A String", # Output only. The time this label was created.
  "creator": { # Information about a user. # Output only. The user who created this label.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "customer": "A String", # Output only. The customer this label belongs to. For example: "customers/123abc789."
  "disableTime": "A String", # Output only. The time this label was disabled. This value has no meaning when the label is not disabled.
  "disabler": { # Information about a user. # Output only. The user who disabled this label. This value has no meaning when the label is not disabled.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "displayHints": { # UI display hints for rendering the label. # Output only. UI display hints for rendering the label.
    "disabled": True or False, # Whether the label should be shown in the UI as disabled.
    "hiddenInSearch": True or False, # This label should be hidden in the search menu when searching for Drive items.
    "priority": "A String", # Order to display label in a list.
    "shownInApply": True or False, # This label should be shown in the apply menu when applying values to a Drive item.
  },
  "fields": [ # List of fields in descending priority order.
    { # 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.
      "appliedCapabilities": { # The capabilities related to this field on applied metadata. # Output only. The capabilities this user has on this field and its value when the label is applied on Drive items.
        "canRead": True or False, # Whether the user can read related applied metadata on items.
        "canSearch": True or False, # Whether the user can search for Drive items referencing this field.
        "canWrite": True or False, # Whether the user can set this field on Drive items.
      },
      "createTime": "A String", # Output only. The time this field was created.
      "creator": { # Information about a user. # Output only. The user who created this field.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "dateOptions": { # Options for the date field type. # Date field options.
        "dateFormat": "A String", # Output only. ICU date format.
        "dateFormatType": "A String", # Localized date formatting option. Field values are rendered in this format according to their locale.
        "maxValue": { # 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 # Output only. Maximum valid value (year, month, day).
          "day": 42, # 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.
          "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
        "minValue": { # 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 # Output only. Minimum valid value (year, month, day).
          "day": 42, # 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.
          "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
      },
      "disableTime": "A String", # Output only. The time this field was disabled. This value has no meaning when the field is not disabled.
      "disabler": { # Information about a user. # Output only. The user who disabled this field. This value has no meaning when the field is not disabled.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "displayHints": { # UI display hints for rendering a field. # Output only. UI display hints for rendering a field.
        "disabled": True or False, # Whether the field should be shown in the UI as disabled.
        "hiddenInSearch": True or False, # This field should be hidden in the search menu when searching for Drive items.
        "required": True or False, # Whether the field should be shown as required in the UI.
        "shownInApply": True or False, # This field should be shown in the apply menu when applying values to a Drive item.
      },
      "id": "A 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])+`
      "integerOptions": { # Options for the Integer field type. # Integer field options.
        "maxValue": "A String", # Output only. The maximum valid value for the integer field.
        "minValue": "A String", # Output only. The minimum valid value for the integer field.
      },
      "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. The lifecycle of this field.
        "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
          "hideInSearch": True or False, # 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.
          "showInApply": True or False, # 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.
        },
        "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
        "state": "A String", # Output only. The state of the object associated with this lifecycle.
      },
      "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this field.
        "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
      },
      "properties": { # The basic properties of the field. # The basic properties of the field.
        "displayName": "A String", # Required. The display text to show in the UI identifying this field.
        "insertBeforeField": "A 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": True or False, # Whether the field should be marked as required.
      },
      "publisher": { # Information about a user. # Output only. The user who published this field. This value has no meaning when the field is not published.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "queryKey": "A 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".
      "schemaCapabilities": { # The capabilities related to this field when editing the field. # Output only. The capabilities this user has when editing this field.
        "canDelete": True or False, # Whether the user can delete this field. The user must have permission and the field must be deprecated.
        "canDisable": True or False, # Whether the user can disable this field. The user must have permission and this field must not already be disabled.
        "canEnable": True or False, # Whether the user can enable this field. The user must have permission and this field must be disabled.
        "canUpdate": True or False, # Whether the user can change this field.
      },
      "selectionOptions": { # Options for the selection field type. # Selection field options.
        "choices": [ # The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.
          { # Selection field choice.
            "appliedCapabilities": { # The capabilities related to this choice on applied metadata. # Output only. The capabilities related to this choice on applied metadata.
              "canRead": True or False, # Whether the user can read related applied metadata on items.
              "canSearch": True or False, # Whether the user can use this choice in search queries.
              "canSelect": True or False, # Whether the user can select this choice on an item.
            },
            "createTime": "A String", # Output only. The time this choice was created.
            "creator": { # Information about a user. # Output only. The user who created this choice.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
            "disableTime": "A String", # Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
            "disabler": { # Information about a user. # Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
            "displayHints": { # UI display hints for rendering an option. # Output only. UI display hints for rendering a choice.
              "badgeColors": { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The colors to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                "backgroundColor": { # 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(''); }; // ... # Output only. Badge background that pairs with the foreground.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "foregroundColor": { # 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(''); }; // ... # Output only. Badge foreground that pairs with the background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "soloColor": { # 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(''); }; // ... # Output only. Color that can be used for text without a background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              "badgePriority": "A String", # 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.
              "darkBadgeColors": { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The dark-mode color to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                "backgroundColor": { # 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(''); }; // ... # Output only. Badge background that pairs with the foreground.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "foregroundColor": { # 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(''); }; // ... # Output only. Badge foreground that pairs with the background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "soloColor": { # 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(''); }; // ... # Output only. Color that can be used for text without a background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              "disabled": True or False, # Whether the option should be shown in the UI as disabled.
              "hiddenInSearch": True or False, # This option should be hidden in the search menu when searching for Drive items.
              "shownInApply": True or False, # This option should be shown in the apply menu when applying values to a Drive item.
            },
            "id": "A String", # The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
            "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. Lifecycle of the choice.
              "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
                "hideInSearch": True or False, # 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.
                "showInApply": True or False, # 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.
              },
              "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
              "state": "A String", # Output only. The state of the object associated with this lifecycle.
            },
            "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this choice.
              "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
            },
            "properties": { # Basic properties of the choice. # Basic properties of the choice.
              "badgeConfig": { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a "badged label".
                "color": { # 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(''); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "priorityOverride": "A String", # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
              },
              "description": "A String", # The description of this label.
              "displayName": "A String", # Required. The display text to show in the UI identifying this field.
              "insertBeforeChoice": "A String", # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
            },
            "publishTime": "A String", # Output only. The time this choice was published. This value has no meaning when the choice is not published.
            "publisher": { # Information about a user. # Output only. The user who published this choice. This value has no meaning when the choice is not published.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
            "schemaCapabilities": { # The capabilities related to this choice when editing the choice. # Output only. The capabilities related to this option when editing the option.
              "canDelete": True or False, # Whether the user can delete this choice.
              "canDisable": True or False, # Whether the user can disable this choice.
              "canEnable": True or False, # Whether the user can enable this choice.
              "canUpdate": True or False, # Whether the user can update this choice.
            },
            "updateTime": "A String", # Output only. The time this choice was updated last.
            "updater": { # Information about a user. # Output only. The user who updated this choice last.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
          },
        ],
        "listOptions": { # Options for a multi-valued variant of an associated field type. # When specified, indicates this field supports a list of values. Once the field is published, this cannot be changed.
          "maxEntries": 42, # Maximum number of entries permitted.
        },
      },
      "textOptions": { # Options for the Text field type. # Text field options.
        "maxLength": 42, # Output only. The maximum valid length of values for the text field.
        "minLength": 42, # Output only. The minimum valid length of values for the text field.
      },
      "updateTime": "A String", # Output only. The time this field was updated.
      "updater": { # Information about a user. # Output only. The user who modified this field.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "userOptions": { # Options for the user field type. # User field options.
        "listOptions": { # Options for a multi-valued variant of an associated field type. # When specified, indicates that this field supports a list of values. Once the field is published, this cannot be changed.
          "maxEntries": 42, # Maximum number of entries permitted.
        },
      },
    },
  ],
  "id": "A String", # Output only. Globally unique identifier of this label. ID makes up part of the label `name`, but unlike `name`, ID is consistent between revisions. Matches the regex: `([a-zA-Z0-9])+`
  "labelType": "A String", # Required. The type of label.
  "learnMoreUri": "A String", # Custom URL to present to users to allow them to learn more about this label and how it should be used.
  "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. The lifecycle state of the label including whether it's published, deprecated, and has draft changes.
    "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
      "hideInSearch": True or False, # 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.
      "showInApply": True or False, # 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.
    },
    "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
    "state": "A String", # Output only. The state of the object associated with this lifecycle.
  },
  "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this label.
    "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
  },
  "name": "A String", # Output only. Resource name of the label. Will be in the form of either: `labels/{id}` or `labels/{id}@{revision_id}` depending on the request. See `id` and `revision_id` below.
  "properties": { # Basic properties of the label. # Required. The basic properties of the label.
    "description": "A String", # The description of the label.
    "title": "A String", # Required. Title of the label.
  },
  "publishTime": "A String", # Output only. The time this label was published. This value has no meaning when the label is not published.
  "publisher": { # Information about a user. # Output only. The user who published this label. This value has no meaning when the label is not published.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "revisionCreateTime": "A String", # Output only. The time this label revision was created.
  "revisionCreator": { # Information about a user. # Output only. The user who created this label revision.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "revisionId": "A String", # Output only. Revision ID of the label. Revision ID might be part of the label `name` depending on the request issued. A new revision is created whenever revisioned properties of a label are changed. Matches the regex: `([a-zA-Z0-9])+`
  "schemaCapabilities": { # The capabilities related to this label when editing the label. # Output only. The capabilities the user has on this label.
    "canDelete": True or False, # Whether the user can delete this label. The user must have permission and the label must be disabled.
    "canDisable": True or False, # Whether the user can disable this label. The user must have permission and this label must not already be disabled.
    "canEnable": True or False, # Whether the user can enable this label. The user must have permission and this label must be disabled.
    "canUpdate": True or False, # Whether the user can change this label.
  },
}
get(name, languageCode=None, useAdminAccess=None, view=None, x__xgafv=None)
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.

Args:
  name: string, 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}` (required)
  languageCode: string, The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language are used.
  useAdminAccess: boolean, Set to `true` in order to use the user's admin credentials. The server verifies that the user is an admin for the label before allowing access.
  view: string, When specified, only certain fields belonging to the indicated view are returned.
    Allowed values
      LABEL_VIEW_BASIC - Implies the field mask: `name,id,revision_id,label_type,properties.*`
      LABEL_VIEW_FULL - All possible fields.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A label defines a taxonomy that can be applied to Drive items in order to organize and search across items. Labels can be simple strings, or can contain fields that describe additional metadata that can be further used to organize and search Drive items.
  "appliedCapabilities": { # The capabilities a user has on this label's applied metadata. # Output only. The capabilities related to this label on applied metadata.
    "canApply": True or False, # Whether the user can apply this label to items.
    "canRead": True or False, # Whether the user can read applied metadata related to this label.
    "canRemove": True or False, # Whether the user can remove this label from items.
  },
  "appliedLabelPolicy": { # Behavior of this label when it's applied to Drive items. # Output only. Behavior of this label when it's applied to Drive items.
    "copyMode": "A String", # Indicates how the applied label and field values should be copied when a Drive item is copied.
  },
  "createTime": "A String", # Output only. The time this label was created.
  "creator": { # Information about a user. # Output only. The user who created this label.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "customer": "A String", # Output only. The customer this label belongs to. For example: "customers/123abc789."
  "disableTime": "A String", # Output only. The time this label was disabled. This value has no meaning when the label is not disabled.
  "disabler": { # Information about a user. # Output only. The user who disabled this label. This value has no meaning when the label is not disabled.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "displayHints": { # UI display hints for rendering the label. # Output only. UI display hints for rendering the label.
    "disabled": True or False, # Whether the label should be shown in the UI as disabled.
    "hiddenInSearch": True or False, # This label should be hidden in the search menu when searching for Drive items.
    "priority": "A String", # Order to display label in a list.
    "shownInApply": True or False, # This label should be shown in the apply menu when applying values to a Drive item.
  },
  "fields": [ # List of fields in descending priority order.
    { # 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.
      "appliedCapabilities": { # The capabilities related to this field on applied metadata. # Output only. The capabilities this user has on this field and its value when the label is applied on Drive items.
        "canRead": True or False, # Whether the user can read related applied metadata on items.
        "canSearch": True or False, # Whether the user can search for Drive items referencing this field.
        "canWrite": True or False, # Whether the user can set this field on Drive items.
      },
      "createTime": "A String", # Output only. The time this field was created.
      "creator": { # Information about a user. # Output only. The user who created this field.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "dateOptions": { # Options for the date field type. # Date field options.
        "dateFormat": "A String", # Output only. ICU date format.
        "dateFormatType": "A String", # Localized date formatting option. Field values are rendered in this format according to their locale.
        "maxValue": { # 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 # Output only. Maximum valid value (year, month, day).
          "day": 42, # 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.
          "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
        "minValue": { # 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 # Output only. Minimum valid value (year, month, day).
          "day": 42, # 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.
          "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
      },
      "disableTime": "A String", # Output only. The time this field was disabled. This value has no meaning when the field is not disabled.
      "disabler": { # Information about a user. # Output only. The user who disabled this field. This value has no meaning when the field is not disabled.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "displayHints": { # UI display hints for rendering a field. # Output only. UI display hints for rendering a field.
        "disabled": True or False, # Whether the field should be shown in the UI as disabled.
        "hiddenInSearch": True or False, # This field should be hidden in the search menu when searching for Drive items.
        "required": True or False, # Whether the field should be shown as required in the UI.
        "shownInApply": True or False, # This field should be shown in the apply menu when applying values to a Drive item.
      },
      "id": "A 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])+`
      "integerOptions": { # Options for the Integer field type. # Integer field options.
        "maxValue": "A String", # Output only. The maximum valid value for the integer field.
        "minValue": "A String", # Output only. The minimum valid value for the integer field.
      },
      "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. The lifecycle of this field.
        "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
          "hideInSearch": True or False, # 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.
          "showInApply": True or False, # 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.
        },
        "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
        "state": "A String", # Output only. The state of the object associated with this lifecycle.
      },
      "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this field.
        "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
      },
      "properties": { # The basic properties of the field. # The basic properties of the field.
        "displayName": "A String", # Required. The display text to show in the UI identifying this field.
        "insertBeforeField": "A 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": True or False, # Whether the field should be marked as required.
      },
      "publisher": { # Information about a user. # Output only. The user who published this field. This value has no meaning when the field is not published.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "queryKey": "A 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".
      "schemaCapabilities": { # The capabilities related to this field when editing the field. # Output only. The capabilities this user has when editing this field.
        "canDelete": True or False, # Whether the user can delete this field. The user must have permission and the field must be deprecated.
        "canDisable": True or False, # Whether the user can disable this field. The user must have permission and this field must not already be disabled.
        "canEnable": True or False, # Whether the user can enable this field. The user must have permission and this field must be disabled.
        "canUpdate": True or False, # Whether the user can change this field.
      },
      "selectionOptions": { # Options for the selection field type. # Selection field options.
        "choices": [ # The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.
          { # Selection field choice.
            "appliedCapabilities": { # The capabilities related to this choice on applied metadata. # Output only. The capabilities related to this choice on applied metadata.
              "canRead": True or False, # Whether the user can read related applied metadata on items.
              "canSearch": True or False, # Whether the user can use this choice in search queries.
              "canSelect": True or False, # Whether the user can select this choice on an item.
            },
            "createTime": "A String", # Output only. The time this choice was created.
            "creator": { # Information about a user. # Output only. The user who created this choice.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
            "disableTime": "A String", # Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
            "disabler": { # Information about a user. # Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
            "displayHints": { # UI display hints for rendering an option. # Output only. UI display hints for rendering a choice.
              "badgeColors": { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The colors to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                "backgroundColor": { # 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(''); }; // ... # Output only. Badge background that pairs with the foreground.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "foregroundColor": { # 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(''); }; // ... # Output only. Badge foreground that pairs with the background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "soloColor": { # 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(''); }; // ... # Output only. Color that can be used for text without a background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              "badgePriority": "A String", # 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.
              "darkBadgeColors": { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The dark-mode color to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                "backgroundColor": { # 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(''); }; // ... # Output only. Badge background that pairs with the foreground.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "foregroundColor": { # 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(''); }; // ... # Output only. Badge foreground that pairs with the background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "soloColor": { # 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(''); }; // ... # Output only. Color that can be used for text without a background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              "disabled": True or False, # Whether the option should be shown in the UI as disabled.
              "hiddenInSearch": True or False, # This option should be hidden in the search menu when searching for Drive items.
              "shownInApply": True or False, # This option should be shown in the apply menu when applying values to a Drive item.
            },
            "id": "A String", # The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
            "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. Lifecycle of the choice.
              "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
                "hideInSearch": True or False, # 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.
                "showInApply": True or False, # 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.
              },
              "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
              "state": "A String", # Output only. The state of the object associated with this lifecycle.
            },
            "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this choice.
              "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
            },
            "properties": { # Basic properties of the choice. # Basic properties of the choice.
              "badgeConfig": { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a "badged label".
                "color": { # 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(''); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "priorityOverride": "A String", # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
              },
              "description": "A String", # The description of this label.
              "displayName": "A String", # Required. The display text to show in the UI identifying this field.
              "insertBeforeChoice": "A String", # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
            },
            "publishTime": "A String", # Output only. The time this choice was published. This value has no meaning when the choice is not published.
            "publisher": { # Information about a user. # Output only. The user who published this choice. This value has no meaning when the choice is not published.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
            "schemaCapabilities": { # The capabilities related to this choice when editing the choice. # Output only. The capabilities related to this option when editing the option.
              "canDelete": True or False, # Whether the user can delete this choice.
              "canDisable": True or False, # Whether the user can disable this choice.
              "canEnable": True or False, # Whether the user can enable this choice.
              "canUpdate": True or False, # Whether the user can update this choice.
            },
            "updateTime": "A String", # Output only. The time this choice was updated last.
            "updater": { # Information about a user. # Output only. The user who updated this choice last.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
          },
        ],
        "listOptions": { # Options for a multi-valued variant of an associated field type. # When specified, indicates this field supports a list of values. Once the field is published, this cannot be changed.
          "maxEntries": 42, # Maximum number of entries permitted.
        },
      },
      "textOptions": { # Options for the Text field type. # Text field options.
        "maxLength": 42, # Output only. The maximum valid length of values for the text field.
        "minLength": 42, # Output only. The minimum valid length of values for the text field.
      },
      "updateTime": "A String", # Output only. The time this field was updated.
      "updater": { # Information about a user. # Output only. The user who modified this field.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "userOptions": { # Options for the user field type. # User field options.
        "listOptions": { # Options for a multi-valued variant of an associated field type. # When specified, indicates that this field supports a list of values. Once the field is published, this cannot be changed.
          "maxEntries": 42, # Maximum number of entries permitted.
        },
      },
    },
  ],
  "id": "A String", # Output only. Globally unique identifier of this label. ID makes up part of the label `name`, but unlike `name`, ID is consistent between revisions. Matches the regex: `([a-zA-Z0-9])+`
  "labelType": "A String", # Required. The type of label.
  "learnMoreUri": "A String", # Custom URL to present to users to allow them to learn more about this label and how it should be used.
  "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. The lifecycle state of the label including whether it's published, deprecated, and has draft changes.
    "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
      "hideInSearch": True or False, # 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.
      "showInApply": True or False, # 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.
    },
    "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
    "state": "A String", # Output only. The state of the object associated with this lifecycle.
  },
  "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this label.
    "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
  },
  "name": "A String", # Output only. Resource name of the label. Will be in the form of either: `labels/{id}` or `labels/{id}@{revision_id}` depending on the request. See `id` and `revision_id` below.
  "properties": { # Basic properties of the label. # Required. The basic properties of the label.
    "description": "A String", # The description of the label.
    "title": "A String", # Required. Title of the label.
  },
  "publishTime": "A String", # Output only. The time this label was published. This value has no meaning when the label is not published.
  "publisher": { # Information about a user. # Output only. The user who published this label. This value has no meaning when the label is not published.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "revisionCreateTime": "A String", # Output only. The time this label revision was created.
  "revisionCreator": { # Information about a user. # Output only. The user who created this label revision.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "revisionId": "A String", # Output only. Revision ID of the label. Revision ID might be part of the label `name` depending on the request issued. A new revision is created whenever revisioned properties of a label are changed. Matches the regex: `([a-zA-Z0-9])+`
  "schemaCapabilities": { # The capabilities related to this label when editing the label. # Output only. The capabilities the user has on this label.
    "canDelete": True or False, # Whether the user can delete this label. The user must have permission and the label must be disabled.
    "canDisable": True or False, # Whether the user can disable this label. The user must have permission and this label must not already be disabled.
    "canEnable": True or False, # Whether the user can enable this label. The user must have permission and this label must be disabled.
    "canUpdate": True or False, # Whether the user can change this label.
  },
}
list(customer=None, languageCode=None, minimumRole=None, pageSize=None, pageToken=None, publishedOnly=None, useAdminAccess=None, view=None, x__xgafv=None)
List labels.

Args:
  customer: string, The customer to scope this list request to. For example: "customers/abcd1234". If unset, will return all labels within the current customer.
  languageCode: string, The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language are used.
  minimumRole: string, Specifies the level of access the user must have on the returned Labels. The minimum role a user must have on a label. Defaults to `READER`.
    Allowed values
      LABEL_ROLE_UNSPECIFIED - Unknown role.
      READER - A reader can read the label and associated metadata applied to Drive items.
      APPLIER - An applier can write associated metadata on Drive items in which they also have write access to. Implies `READER`.
      ORGANIZER - An organizer can pin this label in shared drives they manage and add new appliers to the label.
      EDITOR - Editors can make any update including deleting the label which also deletes the associated Drive item metadata. Implies `APPLIER`.
  pageSize: integer, Maximum number of labels to return per page. Default: 50. Max: 200.
  pageToken: string, The token of the page to return.
  publishedOnly: boolean, Whether to include only published labels in the results. * When `true`, only the current published label revisions are returned. Disabled labels are included. Returned label resource names reference the published revision (`labels/{id}/{revision_id}`). * When `false`, the current label revisions are returned, which might not be published. Returned label resource names don't reference a specific revision (`labels/{id}`).
  useAdminAccess: boolean, Set to `true` in order to use the user's admin credentials. This will return all Labels within the customer.
  view: string, When specified, only certain fields belonging to the indicated view are returned.
    Allowed values
      LABEL_VIEW_BASIC - Implies the field mask: `name,id,revision_id,label_type,properties.*`
      LABEL_VIEW_FULL - All possible fields.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response for listing Labels.
  "labels": [ # Labels.
    { # A label defines a taxonomy that can be applied to Drive items in order to organize and search across items. Labels can be simple strings, or can contain fields that describe additional metadata that can be further used to organize and search Drive items.
      "appliedCapabilities": { # The capabilities a user has on this label's applied metadata. # Output only. The capabilities related to this label on applied metadata.
        "canApply": True or False, # Whether the user can apply this label to items.
        "canRead": True or False, # Whether the user can read applied metadata related to this label.
        "canRemove": True or False, # Whether the user can remove this label from items.
      },
      "appliedLabelPolicy": { # Behavior of this label when it's applied to Drive items. # Output only. Behavior of this label when it's applied to Drive items.
        "copyMode": "A String", # Indicates how the applied label and field values should be copied when a Drive item is copied.
      },
      "createTime": "A String", # Output only. The time this label was created.
      "creator": { # Information about a user. # Output only. The user who created this label.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "customer": "A String", # Output only. The customer this label belongs to. For example: "customers/123abc789."
      "disableTime": "A String", # Output only. The time this label was disabled. This value has no meaning when the label is not disabled.
      "disabler": { # Information about a user. # Output only. The user who disabled this label. This value has no meaning when the label is not disabled.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "displayHints": { # UI display hints for rendering the label. # Output only. UI display hints for rendering the label.
        "disabled": True or False, # Whether the label should be shown in the UI as disabled.
        "hiddenInSearch": True or False, # This label should be hidden in the search menu when searching for Drive items.
        "priority": "A String", # Order to display label in a list.
        "shownInApply": True or False, # This label should be shown in the apply menu when applying values to a Drive item.
      },
      "fields": [ # List of fields in descending priority order.
        { # 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.
          "appliedCapabilities": { # The capabilities related to this field on applied metadata. # Output only. The capabilities this user has on this field and its value when the label is applied on Drive items.
            "canRead": True or False, # Whether the user can read related applied metadata on items.
            "canSearch": True or False, # Whether the user can search for Drive items referencing this field.
            "canWrite": True or False, # Whether the user can set this field on Drive items.
          },
          "createTime": "A String", # Output only. The time this field was created.
          "creator": { # Information about a user. # Output only. The user who created this field.
            "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
          },
          "dateOptions": { # Options for the date field type. # Date field options.
            "dateFormat": "A String", # Output only. ICU date format.
            "dateFormatType": "A String", # Localized date formatting option. Field values are rendered in this format according to their locale.
            "maxValue": { # 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 # Output only. Maximum valid value (year, month, day).
              "day": 42, # 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.
              "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
              "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
            },
            "minValue": { # 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 # Output only. Minimum valid value (year, month, day).
              "day": 42, # 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.
              "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
              "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
            },
          },
          "disableTime": "A String", # Output only. The time this field was disabled. This value has no meaning when the field is not disabled.
          "disabler": { # Information about a user. # Output only. The user who disabled this field. This value has no meaning when the field is not disabled.
            "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
          },
          "displayHints": { # UI display hints for rendering a field. # Output only. UI display hints for rendering a field.
            "disabled": True or False, # Whether the field should be shown in the UI as disabled.
            "hiddenInSearch": True or False, # This field should be hidden in the search menu when searching for Drive items.
            "required": True or False, # Whether the field should be shown as required in the UI.
            "shownInApply": True or False, # This field should be shown in the apply menu when applying values to a Drive item.
          },
          "id": "A 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])+`
          "integerOptions": { # Options for the Integer field type. # Integer field options.
            "maxValue": "A String", # Output only. The maximum valid value for the integer field.
            "minValue": "A String", # Output only. The minimum valid value for the integer field.
          },
          "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. The lifecycle of this field.
            "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
              "hideInSearch": True or False, # 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.
              "showInApply": True or False, # 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.
            },
            "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
            "state": "A String", # Output only. The state of the object associated with this lifecycle.
          },
          "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this field.
            "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
          },
          "properties": { # The basic properties of the field. # The basic properties of the field.
            "displayName": "A String", # Required. The display text to show in the UI identifying this field.
            "insertBeforeField": "A 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": True or False, # Whether the field should be marked as required.
          },
          "publisher": { # Information about a user. # Output only. The user who published this field. This value has no meaning when the field is not published.
            "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
          },
          "queryKey": "A 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".
          "schemaCapabilities": { # The capabilities related to this field when editing the field. # Output only. The capabilities this user has when editing this field.
            "canDelete": True or False, # Whether the user can delete this field. The user must have permission and the field must be deprecated.
            "canDisable": True or False, # Whether the user can disable this field. The user must have permission and this field must not already be disabled.
            "canEnable": True or False, # Whether the user can enable this field. The user must have permission and this field must be disabled.
            "canUpdate": True or False, # Whether the user can change this field.
          },
          "selectionOptions": { # Options for the selection field type. # Selection field options.
            "choices": [ # The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.
              { # Selection field choice.
                "appliedCapabilities": { # The capabilities related to this choice on applied metadata. # Output only. The capabilities related to this choice on applied metadata.
                  "canRead": True or False, # Whether the user can read related applied metadata on items.
                  "canSearch": True or False, # Whether the user can use this choice in search queries.
                  "canSelect": True or False, # Whether the user can select this choice on an item.
                },
                "createTime": "A String", # Output only. The time this choice was created.
                "creator": { # Information about a user. # Output only. The user who created this choice.
                  "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
                },
                "disableTime": "A String", # Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
                "disabler": { # Information about a user. # Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
                  "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
                },
                "displayHints": { # UI display hints for rendering an option. # Output only. UI display hints for rendering a choice.
                  "badgeColors": { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The colors to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                    "backgroundColor": { # 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(''); }; // ... # Output only. Badge background that pairs with the foreground.
                      "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                    "foregroundColor": { # 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(''); }; // ... # Output only. Badge foreground that pairs with the background.
                      "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                    "soloColor": { # 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(''); }; // ... # Output only. Color that can be used for text without a background.
                      "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                  },
                  "badgePriority": "A String", # 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.
                  "darkBadgeColors": { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The dark-mode color to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                    "backgroundColor": { # 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(''); }; // ... # Output only. Badge background that pairs with the foreground.
                      "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                    "foregroundColor": { # 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(''); }; // ... # Output only. Badge foreground that pairs with the background.
                      "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                    "soloColor": { # 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(''); }; // ... # Output only. Color that can be used for text without a background.
                      "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                  },
                  "disabled": True or False, # Whether the option should be shown in the UI as disabled.
                  "hiddenInSearch": True or False, # This option should be hidden in the search menu when searching for Drive items.
                  "shownInApply": True or False, # This option should be shown in the apply menu when applying values to a Drive item.
                },
                "id": "A String", # The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
                "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. Lifecycle of the choice.
                  "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
                    "hideInSearch": True or False, # 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.
                    "showInApply": True or False, # 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.
                  },
                  "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
                  "state": "A String", # Output only. The state of the object associated with this lifecycle.
                },
                "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this choice.
                  "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
                },
                "properties": { # Basic properties of the choice. # Basic properties of the choice.
                  "badgeConfig": { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a "badged label".
                    "color": { # 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(''); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
                      "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                    "priorityOverride": "A String", # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
                  },
                  "description": "A String", # The description of this label.
                  "displayName": "A String", # Required. The display text to show in the UI identifying this field.
                  "insertBeforeChoice": "A String", # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
                },
                "publishTime": "A String", # Output only. The time this choice was published. This value has no meaning when the choice is not published.
                "publisher": { # Information about a user. # Output only. The user who published this choice. This value has no meaning when the choice is not published.
                  "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
                },
                "schemaCapabilities": { # The capabilities related to this choice when editing the choice. # Output only. The capabilities related to this option when editing the option.
                  "canDelete": True or False, # Whether the user can delete this choice.
                  "canDisable": True or False, # Whether the user can disable this choice.
                  "canEnable": True or False, # Whether the user can enable this choice.
                  "canUpdate": True or False, # Whether the user can update this choice.
                },
                "updateTime": "A String", # Output only. The time this choice was updated last.
                "updater": { # Information about a user. # Output only. The user who updated this choice last.
                  "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
                },
              },
            ],
            "listOptions": { # Options for a multi-valued variant of an associated field type. # When specified, indicates this field supports a list of values. Once the field is published, this cannot be changed.
              "maxEntries": 42, # Maximum number of entries permitted.
            },
          },
          "textOptions": { # Options for the Text field type. # Text field options.
            "maxLength": 42, # Output only. The maximum valid length of values for the text field.
            "minLength": 42, # Output only. The minimum valid length of values for the text field.
          },
          "updateTime": "A String", # Output only. The time this field was updated.
          "updater": { # Information about a user. # Output only. The user who modified this field.
            "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
          },
          "userOptions": { # Options for the user field type. # User field options.
            "listOptions": { # Options for a multi-valued variant of an associated field type. # When specified, indicates that this field supports a list of values. Once the field is published, this cannot be changed.
              "maxEntries": 42, # Maximum number of entries permitted.
            },
          },
        },
      ],
      "id": "A String", # Output only. Globally unique identifier of this label. ID makes up part of the label `name`, but unlike `name`, ID is consistent between revisions. Matches the regex: `([a-zA-Z0-9])+`
      "labelType": "A String", # Required. The type of label.
      "learnMoreUri": "A String", # Custom URL to present to users to allow them to learn more about this label and how it should be used.
      "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. The lifecycle state of the label including whether it's published, deprecated, and has draft changes.
        "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
          "hideInSearch": True or False, # 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.
          "showInApply": True or False, # 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.
        },
        "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
        "state": "A String", # Output only. The state of the object associated with this lifecycle.
      },
      "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this label.
        "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
      },
      "name": "A String", # Output only. Resource name of the label. Will be in the form of either: `labels/{id}` or `labels/{id}@{revision_id}` depending on the request. See `id` and `revision_id` below.
      "properties": { # Basic properties of the label. # Required. The basic properties of the label.
        "description": "A String", # The description of the label.
        "title": "A String", # Required. Title of the label.
      },
      "publishTime": "A String", # Output only. The time this label was published. This value has no meaning when the label is not published.
      "publisher": { # Information about a user. # Output only. The user who published this label. This value has no meaning when the label is not published.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "revisionCreateTime": "A String", # Output only. The time this label revision was created.
      "revisionCreator": { # Information about a user. # Output only. The user who created this label revision.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "revisionId": "A String", # Output only. Revision ID of the label. Revision ID might be part of the label `name` depending on the request issued. A new revision is created whenever revisioned properties of a label are changed. Matches the regex: `([a-zA-Z0-9])+`
      "schemaCapabilities": { # The capabilities related to this label when editing the label. # Output only. The capabilities the user has on this label.
        "canDelete": True or False, # Whether the user can delete this label. The user must have permission and the label must be disabled.
        "canDisable": True or False, # Whether the user can disable this label. The user must have permission and this label must not already be disabled.
        "canEnable": True or False, # Whether the user can enable this label. The user must have permission and this label must be disabled.
        "canUpdate": True or False, # Whether the user can change this label.
      },
    },
  ],
  "nextPageToken": "A String", # The token of the next page in the response.
}
list_next()
Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call 'execute()' on to request the next
          page. Returns None if there are no more items in the collection.
        
publish(name, body=None, x__xgafv=None)
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.

Args:
  name: string, Required. Label resource name. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request to publish a label.
  "languageCode": "A String", # The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language will be used.
  "useAdminAccess": True or False, # 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.
  "writeControl": { # Provides control over how write requests are executed. When not specified, the last write wins. # Provides control over how write requests are executed. Defaults to unset, which means last write wins.
    "requiredRevisionId": "A String", # The revision_id of the label that the write request will be applied to. If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error.
  },
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A label defines a taxonomy that can be applied to Drive items in order to organize and search across items. Labels can be simple strings, or can contain fields that describe additional metadata that can be further used to organize and search Drive items.
  "appliedCapabilities": { # The capabilities a user has on this label's applied metadata. # Output only. The capabilities related to this label on applied metadata.
    "canApply": True or False, # Whether the user can apply this label to items.
    "canRead": True or False, # Whether the user can read applied metadata related to this label.
    "canRemove": True or False, # Whether the user can remove this label from items.
  },
  "appliedLabelPolicy": { # Behavior of this label when it's applied to Drive items. # Output only. Behavior of this label when it's applied to Drive items.
    "copyMode": "A String", # Indicates how the applied label and field values should be copied when a Drive item is copied.
  },
  "createTime": "A String", # Output only. The time this label was created.
  "creator": { # Information about a user. # Output only. The user who created this label.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "customer": "A String", # Output only. The customer this label belongs to. For example: "customers/123abc789."
  "disableTime": "A String", # Output only. The time this label was disabled. This value has no meaning when the label is not disabled.
  "disabler": { # Information about a user. # Output only. The user who disabled this label. This value has no meaning when the label is not disabled.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "displayHints": { # UI display hints for rendering the label. # Output only. UI display hints for rendering the label.
    "disabled": True or False, # Whether the label should be shown in the UI as disabled.
    "hiddenInSearch": True or False, # This label should be hidden in the search menu when searching for Drive items.
    "priority": "A String", # Order to display label in a list.
    "shownInApply": True or False, # This label should be shown in the apply menu when applying values to a Drive item.
  },
  "fields": [ # List of fields in descending priority order.
    { # 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.
      "appliedCapabilities": { # The capabilities related to this field on applied metadata. # Output only. The capabilities this user has on this field and its value when the label is applied on Drive items.
        "canRead": True or False, # Whether the user can read related applied metadata on items.
        "canSearch": True or False, # Whether the user can search for Drive items referencing this field.
        "canWrite": True or False, # Whether the user can set this field on Drive items.
      },
      "createTime": "A String", # Output only. The time this field was created.
      "creator": { # Information about a user. # Output only. The user who created this field.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "dateOptions": { # Options for the date field type. # Date field options.
        "dateFormat": "A String", # Output only. ICU date format.
        "dateFormatType": "A String", # Localized date formatting option. Field values are rendered in this format according to their locale.
        "maxValue": { # 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 # Output only. Maximum valid value (year, month, day).
          "day": 42, # 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.
          "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
        "minValue": { # 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 # Output only. Minimum valid value (year, month, day).
          "day": 42, # 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.
          "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
      },
      "disableTime": "A String", # Output only. The time this field was disabled. This value has no meaning when the field is not disabled.
      "disabler": { # Information about a user. # Output only. The user who disabled this field. This value has no meaning when the field is not disabled.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "displayHints": { # UI display hints for rendering a field. # Output only. UI display hints for rendering a field.
        "disabled": True or False, # Whether the field should be shown in the UI as disabled.
        "hiddenInSearch": True or False, # This field should be hidden in the search menu when searching for Drive items.
        "required": True or False, # Whether the field should be shown as required in the UI.
        "shownInApply": True or False, # This field should be shown in the apply menu when applying values to a Drive item.
      },
      "id": "A 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])+`
      "integerOptions": { # Options for the Integer field type. # Integer field options.
        "maxValue": "A String", # Output only. The maximum valid value for the integer field.
        "minValue": "A String", # Output only. The minimum valid value for the integer field.
      },
      "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. The lifecycle of this field.
        "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
          "hideInSearch": True or False, # 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.
          "showInApply": True or False, # 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.
        },
        "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
        "state": "A String", # Output only. The state of the object associated with this lifecycle.
      },
      "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this field.
        "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
      },
      "properties": { # The basic properties of the field. # The basic properties of the field.
        "displayName": "A String", # Required. The display text to show in the UI identifying this field.
        "insertBeforeField": "A 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": True or False, # Whether the field should be marked as required.
      },
      "publisher": { # Information about a user. # Output only. The user who published this field. This value has no meaning when the field is not published.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "queryKey": "A 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".
      "schemaCapabilities": { # The capabilities related to this field when editing the field. # Output only. The capabilities this user has when editing this field.
        "canDelete": True or False, # Whether the user can delete this field. The user must have permission and the field must be deprecated.
        "canDisable": True or False, # Whether the user can disable this field. The user must have permission and this field must not already be disabled.
        "canEnable": True or False, # Whether the user can enable this field. The user must have permission and this field must be disabled.
        "canUpdate": True or False, # Whether the user can change this field.
      },
      "selectionOptions": { # Options for the selection field type. # Selection field options.
        "choices": [ # The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.
          { # Selection field choice.
            "appliedCapabilities": { # The capabilities related to this choice on applied metadata. # Output only. The capabilities related to this choice on applied metadata.
              "canRead": True or False, # Whether the user can read related applied metadata on items.
              "canSearch": True or False, # Whether the user can use this choice in search queries.
              "canSelect": True or False, # Whether the user can select this choice on an item.
            },
            "createTime": "A String", # Output only. The time this choice was created.
            "creator": { # Information about a user. # Output only. The user who created this choice.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
            "disableTime": "A String", # Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
            "disabler": { # Information about a user. # Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
            "displayHints": { # UI display hints for rendering an option. # Output only. UI display hints for rendering a choice.
              "badgeColors": { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The colors to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                "backgroundColor": { # 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(''); }; // ... # Output only. Badge background that pairs with the foreground.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "foregroundColor": { # 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(''); }; // ... # Output only. Badge foreground that pairs with the background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "soloColor": { # 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(''); }; // ... # Output only. Color that can be used for text without a background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              "badgePriority": "A String", # 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.
              "darkBadgeColors": { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The dark-mode color to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                "backgroundColor": { # 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(''); }; // ... # Output only. Badge background that pairs with the foreground.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "foregroundColor": { # 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(''); }; // ... # Output only. Badge foreground that pairs with the background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "soloColor": { # 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(''); }; // ... # Output only. Color that can be used for text without a background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              "disabled": True or False, # Whether the option should be shown in the UI as disabled.
              "hiddenInSearch": True or False, # This option should be hidden in the search menu when searching for Drive items.
              "shownInApply": True or False, # This option should be shown in the apply menu when applying values to a Drive item.
            },
            "id": "A String", # The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
            "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. Lifecycle of the choice.
              "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
                "hideInSearch": True or False, # 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.
                "showInApply": True or False, # 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.
              },
              "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
              "state": "A String", # Output only. The state of the object associated with this lifecycle.
            },
            "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this choice.
              "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
            },
            "properties": { # Basic properties of the choice. # Basic properties of the choice.
              "badgeConfig": { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a "badged label".
                "color": { # 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(''); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "priorityOverride": "A String", # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
              },
              "description": "A String", # The description of this label.
              "displayName": "A String", # Required. The display text to show in the UI identifying this field.
              "insertBeforeChoice": "A String", # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
            },
            "publishTime": "A String", # Output only. The time this choice was published. This value has no meaning when the choice is not published.
            "publisher": { # Information about a user. # Output only. The user who published this choice. This value has no meaning when the choice is not published.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
            "schemaCapabilities": { # The capabilities related to this choice when editing the choice. # Output only. The capabilities related to this option when editing the option.
              "canDelete": True or False, # Whether the user can delete this choice.
              "canDisable": True or False, # Whether the user can disable this choice.
              "canEnable": True or False, # Whether the user can enable this choice.
              "canUpdate": True or False, # Whether the user can update this choice.
            },
            "updateTime": "A String", # Output only. The time this choice was updated last.
            "updater": { # Information about a user. # Output only. The user who updated this choice last.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
          },
        ],
        "listOptions": { # Options for a multi-valued variant of an associated field type. # When specified, indicates this field supports a list of values. Once the field is published, this cannot be changed.
          "maxEntries": 42, # Maximum number of entries permitted.
        },
      },
      "textOptions": { # Options for the Text field type. # Text field options.
        "maxLength": 42, # Output only. The maximum valid length of values for the text field.
        "minLength": 42, # Output only. The minimum valid length of values for the text field.
      },
      "updateTime": "A String", # Output only. The time this field was updated.
      "updater": { # Information about a user. # Output only. The user who modified this field.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "userOptions": { # Options for the user field type. # User field options.
        "listOptions": { # Options for a multi-valued variant of an associated field type. # When specified, indicates that this field supports a list of values. Once the field is published, this cannot be changed.
          "maxEntries": 42, # Maximum number of entries permitted.
        },
      },
    },
  ],
  "id": "A String", # Output only. Globally unique identifier of this label. ID makes up part of the label `name`, but unlike `name`, ID is consistent between revisions. Matches the regex: `([a-zA-Z0-9])+`
  "labelType": "A String", # Required. The type of label.
  "learnMoreUri": "A String", # Custom URL to present to users to allow them to learn more about this label and how it should be used.
  "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. The lifecycle state of the label including whether it's published, deprecated, and has draft changes.
    "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
      "hideInSearch": True or False, # 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.
      "showInApply": True or False, # 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.
    },
    "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
    "state": "A String", # Output only. The state of the object associated with this lifecycle.
  },
  "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this label.
    "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
  },
  "name": "A String", # Output only. Resource name of the label. Will be in the form of either: `labels/{id}` or `labels/{id}@{revision_id}` depending on the request. See `id` and `revision_id` below.
  "properties": { # Basic properties of the label. # Required. The basic properties of the label.
    "description": "A String", # The description of the label.
    "title": "A String", # Required. Title of the label.
  },
  "publishTime": "A String", # Output only. The time this label was published. This value has no meaning when the label is not published.
  "publisher": { # Information about a user. # Output only. The user who published this label. This value has no meaning when the label is not published.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "revisionCreateTime": "A String", # Output only. The time this label revision was created.
  "revisionCreator": { # Information about a user. # Output only. The user who created this label revision.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "revisionId": "A String", # Output only. Revision ID of the label. Revision ID might be part of the label `name` depending on the request issued. A new revision is created whenever revisioned properties of a label are changed. Matches the regex: `([a-zA-Z0-9])+`
  "schemaCapabilities": { # The capabilities related to this label when editing the label. # Output only. The capabilities the user has on this label.
    "canDelete": True or False, # Whether the user can delete this label. The user must have permission and the label must be disabled.
    "canDisable": True or False, # Whether the user can disable this label. The user must have permission and this label must not already be disabled.
    "canEnable": True or False, # Whether the user can enable this label. The user must have permission and this label must be disabled.
    "canUpdate": True or False, # Whether the user can change this label.
  },
}
updateLabelCopyMode(name, body=None, x__xgafv=None)
Updates a Label's `CopyMode`. Changes to this policy are not revisioned, do not require publishing, and take effect immediately.

Args:
  name: string, Required. The resource name of the Label to update. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request to update the `CopyMode` of the given Label. Changes to this policy are not revisioned, do not require publishing, and take effect immediately. \
  "copyMode": "A String", # Required. Indicates how the applied Label, and Field values should be copied when a Drive item is copied.
  "languageCode": "A String", # The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language will be used.
  "useAdminAccess": True or False, # 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": "A String", # When specified, only certain fields belonging to the indicated view will be returned.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A label defines a taxonomy that can be applied to Drive items in order to organize and search across items. Labels can be simple strings, or can contain fields that describe additional metadata that can be further used to organize and search Drive items.
  "appliedCapabilities": { # The capabilities a user has on this label's applied metadata. # Output only. The capabilities related to this label on applied metadata.
    "canApply": True or False, # Whether the user can apply this label to items.
    "canRead": True or False, # Whether the user can read applied metadata related to this label.
    "canRemove": True or False, # Whether the user can remove this label from items.
  },
  "appliedLabelPolicy": { # Behavior of this label when it's applied to Drive items. # Output only. Behavior of this label when it's applied to Drive items.
    "copyMode": "A String", # Indicates how the applied label and field values should be copied when a Drive item is copied.
  },
  "createTime": "A String", # Output only. The time this label was created.
  "creator": { # Information about a user. # Output only. The user who created this label.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "customer": "A String", # Output only. The customer this label belongs to. For example: "customers/123abc789."
  "disableTime": "A String", # Output only. The time this label was disabled. This value has no meaning when the label is not disabled.
  "disabler": { # Information about a user. # Output only. The user who disabled this label. This value has no meaning when the label is not disabled.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "displayHints": { # UI display hints for rendering the label. # Output only. UI display hints for rendering the label.
    "disabled": True or False, # Whether the label should be shown in the UI as disabled.
    "hiddenInSearch": True or False, # This label should be hidden in the search menu when searching for Drive items.
    "priority": "A String", # Order to display label in a list.
    "shownInApply": True or False, # This label should be shown in the apply menu when applying values to a Drive item.
  },
  "fields": [ # List of fields in descending priority order.
    { # 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.
      "appliedCapabilities": { # The capabilities related to this field on applied metadata. # Output only. The capabilities this user has on this field and its value when the label is applied on Drive items.
        "canRead": True or False, # Whether the user can read related applied metadata on items.
        "canSearch": True or False, # Whether the user can search for Drive items referencing this field.
        "canWrite": True or False, # Whether the user can set this field on Drive items.
      },
      "createTime": "A String", # Output only. The time this field was created.
      "creator": { # Information about a user. # Output only. The user who created this field.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "dateOptions": { # Options for the date field type. # Date field options.
        "dateFormat": "A String", # Output only. ICU date format.
        "dateFormatType": "A String", # Localized date formatting option. Field values are rendered in this format according to their locale.
        "maxValue": { # 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 # Output only. Maximum valid value (year, month, day).
          "day": 42, # 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.
          "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
        "minValue": { # 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 # Output only. Minimum valid value (year, month, day).
          "day": 42, # 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.
          "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
      },
      "disableTime": "A String", # Output only. The time this field was disabled. This value has no meaning when the field is not disabled.
      "disabler": { # Information about a user. # Output only. The user who disabled this field. This value has no meaning when the field is not disabled.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "displayHints": { # UI display hints for rendering a field. # Output only. UI display hints for rendering a field.
        "disabled": True or False, # Whether the field should be shown in the UI as disabled.
        "hiddenInSearch": True or False, # This field should be hidden in the search menu when searching for Drive items.
        "required": True or False, # Whether the field should be shown as required in the UI.
        "shownInApply": True or False, # This field should be shown in the apply menu when applying values to a Drive item.
      },
      "id": "A 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])+`
      "integerOptions": { # Options for the Integer field type. # Integer field options.
        "maxValue": "A String", # Output only. The maximum valid value for the integer field.
        "minValue": "A String", # Output only. The minimum valid value for the integer field.
      },
      "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. The lifecycle of this field.
        "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
          "hideInSearch": True or False, # 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.
          "showInApply": True or False, # 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.
        },
        "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
        "state": "A String", # Output only. The state of the object associated with this lifecycle.
      },
      "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this field.
        "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
      },
      "properties": { # The basic properties of the field. # The basic properties of the field.
        "displayName": "A String", # Required. The display text to show in the UI identifying this field.
        "insertBeforeField": "A 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": True or False, # Whether the field should be marked as required.
      },
      "publisher": { # Information about a user. # Output only. The user who published this field. This value has no meaning when the field is not published.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "queryKey": "A 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".
      "schemaCapabilities": { # The capabilities related to this field when editing the field. # Output only. The capabilities this user has when editing this field.
        "canDelete": True or False, # Whether the user can delete this field. The user must have permission and the field must be deprecated.
        "canDisable": True or False, # Whether the user can disable this field. The user must have permission and this field must not already be disabled.
        "canEnable": True or False, # Whether the user can enable this field. The user must have permission and this field must be disabled.
        "canUpdate": True or False, # Whether the user can change this field.
      },
      "selectionOptions": { # Options for the selection field type. # Selection field options.
        "choices": [ # The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.
          { # Selection field choice.
            "appliedCapabilities": { # The capabilities related to this choice on applied metadata. # Output only. The capabilities related to this choice on applied metadata.
              "canRead": True or False, # Whether the user can read related applied metadata on items.
              "canSearch": True or False, # Whether the user can use this choice in search queries.
              "canSelect": True or False, # Whether the user can select this choice on an item.
            },
            "createTime": "A String", # Output only. The time this choice was created.
            "creator": { # Information about a user. # Output only. The user who created this choice.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
            "disableTime": "A String", # Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
            "disabler": { # Information about a user. # Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
            "displayHints": { # UI display hints for rendering an option. # Output only. UI display hints for rendering a choice.
              "badgeColors": { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The colors to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                "backgroundColor": { # 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(''); }; // ... # Output only. Badge background that pairs with the foreground.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "foregroundColor": { # 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(''); }; // ... # Output only. Badge foreground that pairs with the background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "soloColor": { # 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(''); }; // ... # Output only. Color that can be used for text without a background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              "badgePriority": "A String", # 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.
              "darkBadgeColors": { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The dark-mode color to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                "backgroundColor": { # 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(''); }; // ... # Output only. Badge background that pairs with the foreground.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "foregroundColor": { # 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(''); }; // ... # Output only. Badge foreground that pairs with the background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "soloColor": { # 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(''); }; // ... # Output only. Color that can be used for text without a background.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              "disabled": True or False, # Whether the option should be shown in the UI as disabled.
              "hiddenInSearch": True or False, # This option should be hidden in the search menu when searching for Drive items.
              "shownInApply": True or False, # This option should be shown in the apply menu when applying values to a Drive item.
            },
            "id": "A String", # The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
            "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. Lifecycle of the choice.
              "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
                "hideInSearch": True or False, # 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.
                "showInApply": True or False, # 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.
              },
              "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
              "state": "A String", # Output only. The state of the object associated with this lifecycle.
            },
            "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this choice.
              "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
            },
            "properties": { # Basic properties of the choice. # Basic properties of the choice.
              "badgeConfig": { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a "badged label".
                "color": { # 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(''); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
                  "alpha": 3.14, # 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": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                "priorityOverride": "A String", # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
              },
              "description": "A String", # The description of this label.
              "displayName": "A String", # Required. The display text to show in the UI identifying this field.
              "insertBeforeChoice": "A String", # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
            },
            "publishTime": "A String", # Output only. The time this choice was published. This value has no meaning when the choice is not published.
            "publisher": { # Information about a user. # Output only. The user who published this choice. This value has no meaning when the choice is not published.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
            "schemaCapabilities": { # The capabilities related to this choice when editing the choice. # Output only. The capabilities related to this option when editing the option.
              "canDelete": True or False, # Whether the user can delete this choice.
              "canDisable": True or False, # Whether the user can disable this choice.
              "canEnable": True or False, # Whether the user can enable this choice.
              "canUpdate": True or False, # Whether the user can update this choice.
            },
            "updateTime": "A String", # Output only. The time this choice was updated last.
            "updater": { # Information about a user. # Output only. The user who updated this choice last.
              "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
            },
          },
        ],
        "listOptions": { # Options for a multi-valued variant of an associated field type. # When specified, indicates this field supports a list of values. Once the field is published, this cannot be changed.
          "maxEntries": 42, # Maximum number of entries permitted.
        },
      },
      "textOptions": { # Options for the Text field type. # Text field options.
        "maxLength": 42, # Output only. The maximum valid length of values for the text field.
        "minLength": 42, # Output only. The minimum valid length of values for the text field.
      },
      "updateTime": "A String", # Output only. The time this field was updated.
      "updater": { # Information about a user. # Output only. The user who modified this field.
        "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
      },
      "userOptions": { # Options for the user field type. # User field options.
        "listOptions": { # Options for a multi-valued variant of an associated field type. # When specified, indicates that this field supports a list of values. Once the field is published, this cannot be changed.
          "maxEntries": 42, # Maximum number of entries permitted.
        },
      },
    },
  ],
  "id": "A String", # Output only. Globally unique identifier of this label. ID makes up part of the label `name`, but unlike `name`, ID is consistent between revisions. Matches the regex: `([a-zA-Z0-9])+`
  "labelType": "A String", # Required. The type of label.
  "learnMoreUri": "A String", # Custom URL to present to users to allow them to learn more about this label and how it should be used.
  "lifecycle": { # The lifecycle state of an object, such as label, field, or choice. 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 are not 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. # Output only. The lifecycle state of the label including whether it's published, deprecated, and has draft changes.
    "disabledPolicy": { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
      "hideInSearch": True or False, # 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.
      "showInApply": True or False, # 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.
    },
    "hasUnpublishedChanges": True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
    "state": "A String", # Output only. The state of the object associated with this lifecycle.
  },
  "lockStatus": { # Contains information about whether a label component should be considered locked. # Output only. The LockStatus of this label.
    "locked": True or False, # Output only. Indicates whether this label component is the (direct) target of a LabelLock. A label component can be implicitly locked even if it's not the direct target of a LabelLock, in which case this field is set to false.
  },
  "name": "A String", # Output only. Resource name of the label. Will be in the form of either: `labels/{id}` or `labels/{id}@{revision_id}` depending on the request. See `id` and `revision_id` below.
  "properties": { # Basic properties of the label. # Required. The basic properties of the label.
    "description": "A String", # The description of the label.
    "title": "A String", # Required. Title of the label.
  },
  "publishTime": "A String", # Output only. The time this label was published. This value has no meaning when the label is not published.
  "publisher": { # Information about a user. # Output only. The user who published this label. This value has no meaning when the label is not published.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "revisionCreateTime": "A String", # Output only. The time this label revision was created.
  "revisionCreator": { # Information about a user. # Output only. The user who created this label revision.
    "person": "A String", # The identifier for this user that can be used with the People API to get more information. For example, people/12345678.
  },
  "revisionId": "A String", # Output only. Revision ID of the label. Revision ID might be part of the label `name` depending on the request issued. A new revision is created whenever revisioned properties of a label are changed. Matches the regex: `([a-zA-Z0-9])+`
  "schemaCapabilities": { # The capabilities related to this label when editing the label. # Output only. The capabilities the user has on this label.
    "canDelete": True or False, # Whether the user can delete this label. The user must have permission and the label must be disabled.
    "canDisable": True or False, # Whether the user can disable this label. The user must have permission and this label must not already be disabled.
    "canEnable": True or False, # Whether the user can enable this label. The user must have permission and this label must be disabled.
    "canUpdate": True or False, # Whether the user can change this label.
  },
}
updatePermissions(parent, body=None, useAdminAccess=None, x__xgafv=None)
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.

Args:
  parent: string, Required. The parent Label resource name. (required)
  body: object, The request body.
    The object takes the form of:

{ # The permission that applies to a principal (user, group, audience) on a label.
  "audience": "A String", # Audience to grant a role to. The magic value of `audiences/default` may be used to apply the role to the default audience in the context of the organization that owns the Label.
  "email": "A String", # Specifies the email address for a user or group pricinpal. Not populated for audience principals. User and Group permissions may only be inserted using email address. On update requests, if email address is specified, no principal should be specified.
  "group": "A String", # Group resource name.
  "name": "A String", # Resource name of this permission.
  "person": "A String", # Person resource name.
  "role": "A String", # The role the principal should have.
}

  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.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The permission that applies to a principal (user, group, audience) on a label.
  "audience": "A String", # Audience to grant a role to. The magic value of `audiences/default` may be used to apply the role to the default audience in the context of the organization that owns the Label.
  "email": "A String", # Specifies the email address for a user or group pricinpal. Not populated for audience principals. User and Group permissions may only be inserted using email address. On update requests, if email address is specified, no principal should be specified.
  "group": "A String", # Group resource name.
  "name": "A String", # Resource name of this permission.
  "person": "A String", # Person resource name.
  "role": "A String", # The role the principal should have.
}