Class: Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/drivelabels_v2/classes.rb,
lib/google/apis/drivelabels_v2/representations.rb,
lib/google/apis/drivelabels_v2/representations.rb

Overview

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAppsDriveLabelsV2Label

Returns a new instance of GoogleAppsDriveLabelsV2Label.



1147
1148
1149
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1147

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#applied_capabilitiesGoogle::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelAppliedCapabilities

The capabilities a user has on this label's applied metadata. Corresponds to the JSON property appliedCapabilities



1025
1026
1027
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1025

def applied_capabilities
  @applied_capabilities
end

#applied_label_policyGoogle::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelAppliedLabelPolicy

Behavior of this label when it's applied to Drive items. Corresponds to the JSON property appliedLabelPolicy



1030
1031
1032
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1030

def applied_label_policy
  @applied_label_policy
end

#create_timeString

Output only. The time this label was created. Corresponds to the JSON property createTime

Returns:

  • (String)


1035
1036
1037
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1035

def create_time
  @create_time
end

#creatorGoogle::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UserInfo

Information about a user. Corresponds to the JSON property creator



1040
1041
1042
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1040

def creator
  @creator
end

#disable_timeString

Output only. The time this label was disabled. This value has no meaning when the label is not disabled. Corresponds to the JSON property disableTime

Returns:

  • (String)


1046
1047
1048
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1046

def disable_time
  @disable_time
end

#disablerGoogle::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UserInfo

Information about a user. Corresponds to the JSON property disabler



1051
1052
1053
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1051

def disabler
  @disabler
end

#display_hintsGoogle::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelDisplayHints

UI display hints for rendering the label. Corresponds to the JSON property displayHints



1056
1057
1058
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1056

def display_hints
  @display_hints
end

#fieldsArray<Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Field>

List of fields in descending priority order. Corresponds to the JSON property fields



1061
1062
1063
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1061

def fields
  @fields
end

#idString

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])+ Corresponds to the JSON property id

Returns:

  • (String)


1068
1069
1070
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1068

def id
  @id
end

#label_typeString

Required. The type of label. Corresponds to the JSON property labelType

Returns:

  • (String)


1073
1074
1075
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1073

def label_type
  @label_type
end

#learn_more_uriString

Custom URL to present to users to allow them to learn more about this label and how it should be used. Corresponds to the JSON property learnMoreUri

Returns:

  • (String)


1079
1080
1081
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1079

def learn_more_uri
  @learn_more_uri
end

#lifecycleGoogle::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Lifecycle

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. Corresponds to the JSON property lifecycle


1093
1094
1095
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1093

def lifecycle
  @lifecycle
end

#lock_statusGoogle::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LockStatus

Contains information about whether a label component should be considered locked. Corresponds to the JSON property lockStatus



1099
1100
1101
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1099

def lock_status
  @lock_status
end

#nameString

Output only. Resource name of the label. Will be in the form of either: labels/idor `labels/`id`@`revision_id depending on the request. See id and revision_id below. Corresponds to the JSON property name

Returns:

  • (String)


1106
1107
1108
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1106

def name
  @name
end

#propertiesGoogle::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelProperties

Basic properties of the label. Corresponds to the JSON property properties



1111
1112
1113
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1111

def properties
  @properties
end

#publish_timeString

Output only. The time this label was published. This value has no meaning when the label is not published. Corresponds to the JSON property publishTime

Returns:

  • (String)


1117
1118
1119
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1117

def publish_time
  @publish_time
end

#publisherGoogle::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UserInfo

Information about a user. Corresponds to the JSON property publisher



1122
1123
1124
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1122

def publisher
  @publisher
end

#revision_create_timeString

Output only. The time this label revision was created. Corresponds to the JSON property revisionCreateTime

Returns:

  • (String)


1127
1128
1129
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1127

def revision_create_time
  @revision_create_time
end

#revision_creatorGoogle::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UserInfo

Information about a user. Corresponds to the JSON property revisionCreator



1132
1133
1134
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1132

def revision_creator
  @revision_creator
end

#revision_idString

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]) + Corresponds to the JSON property revisionId

Returns:

  • (String)


1140
1141
1142
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1140

def revision_id
  @revision_id
end

#schema_capabilitiesGoogle::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelSchemaCapabilities

The capabilities related to this label when editing the label. Corresponds to the JSON property schemaCapabilities



1145
1146
1147
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1145

def schema_capabilities
  @schema_capabilities
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1152

def update!(**args)
  @applied_capabilities = args[:applied_capabilities] if args.key?(:applied_capabilities)
  @applied_label_policy = args[:applied_label_policy] if args.key?(:applied_label_policy)
  @create_time = args[:create_time] if args.key?(:create_time)
  @creator = args[:creator] if args.key?(:creator)
  @disable_time = args[:disable_time] if args.key?(:disable_time)
  @disabler = args[:disabler] if args.key?(:disabler)
  @display_hints = args[:display_hints] if args.key?(:display_hints)
  @fields = args[:fields] if args.key?(:fields)
  @id = args[:id] if args.key?(:id)
  @label_type = args[:label_type] if args.key?(:label_type)
  @learn_more_uri = args[:learn_more_uri] if args.key?(:learn_more_uri)
  @lifecycle = args[:lifecycle] if args.key?(:lifecycle)
  @lock_status = args[:lock_status] if args.key?(:lock_status)
  @name = args[:name] if args.key?(:name)
  @properties = args[:properties] if args.key?(:properties)
  @publish_time = args[:publish_time] if args.key?(:publish_time)
  @publisher = args[:publisher] if args.key?(:publisher)
  @revision_create_time = args[:revision_create_time] if args.key?(:revision_create_time)
  @revision_creator = args[:revision_creator] if args.key?(:revision_creator)
  @revision_id = args[:revision_id] if args.key?(:revision_id)
  @schema_capabilities = args[:schema_capabilities] if args.key?(:schema_capabilities)
end