Class: Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Lifecycle

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

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAppsDriveLabelsV2Lifecycle

Returns a new instance of GoogleAppsDriveLabelsV2Lifecycle.



1372
1373
1374
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1372

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

Instance Attribute Details

#disabled_policyGoogle::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LifecycleDisabledPolicy

The policy that governs how to treat a disabled label, field, or selection choice in different contexts. Corresponds to the JSON property disabledPolicy



1358
1359
1360
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1358

def disabled_policy
  @disabled_policy
end

#has_unpublished_changesBoolean Also known as: has_unpublished_changes?

Output only. Whether the object associated with this lifecycle has unpublished changes. Corresponds to the JSON property hasUnpublishedChanges

Returns:

  • (Boolean)


1364
1365
1366
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1364

def has_unpublished_changes
  @has_unpublished_changes
end

#stateString

Output only. The state of the object associated with this lifecycle. Corresponds to the JSON property state

Returns:

  • (String)


1370
1371
1372
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1370

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1377
1378
1379
1380
1381
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 1377

def update!(**args)
  @disabled_policy = args[:disabled_policy] if args.key?(:disabled_policy)
  @has_unpublished_changes = args[:has_unpublished_changes] if args.key?(:has_unpublished_changes)
  @state = args[:state] if args.key?(:state)
end