Class AccountDelta
Instances of this type are passed to AccountsUpdate
, which modifies the account
accordingly.
Updates can be applied to account properties (name, email etc.), external IDs, preferences (general, diff and edit preferences) and project watches. The account ID and the registration date cannot be updated.
For the account properties there are getters in this class and setters in the AccountDelta.Builder
that correspond to the fields in Account
.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AccountDelta.Builder
builder()
Returns the new value for the active flag.abstract com.google.common.collect.ImmutableSet<ExternalId>
Returns external IDs that should be newly created for the account.abstract com.google.common.collect.ImmutableSet<ExternalId>
Returns external IDs that should be deleted for the account.abstract com.google.common.collect.ImmutableSet<ProjectWatches.ProjectWatchKey>
Returns project watches that should be deleted for the account.abstract Optional<DiffPreferencesInfo>
Returns the new value for the diff preferences.Returns the new value for the display name.abstract Optional<EditPreferencesInfo>
Returns the new value for the edit preferences.Returns the new value for the full name.abstract Optional<GeneralPreferencesInfo>
Returns the new value for the general preferences.Returns the new value for the preferred email.Returns whether the delta for this account is deleting the account.Returns the new value for the status.abstract com.google.common.collect.ImmutableSet<ExternalId>
Returns external IDs that should be updated for the account.abstract com.google.common.collect.ImmutableMap<ProjectWatches.ProjectWatchKey,
Set<NotifyConfig.NotifyType>> Returns external IDs that should be updated for the account.boolean
-
Constructor Details
-
AccountDelta
public AccountDelta()
-
-
Method Details
-
builder
-
getFullName
Returns the new value for the full name.- Returns:
- the new value for the full name,
Optional#empty()
if the full name is not being updated,Optional#of("")
if the full name is unset, the wrapped value is nevernull
-
getDisplayName
Returns the new value for the display name.- Returns:
- the new value for the display name,
Optional#empty()
if the display name is not being updated,Optional#of("")
if the display name is unset, the wrapped value is nevernull
-
getPreferredEmail
Returns the new value for the preferred email.- Returns:
- the new value for the preferred email,
Optional#empty()
if the preferred email is not being updated,Optional#of("")
if the preferred email is unset, the wrapped value is nevernull
-
getActive
Returns the new value for the active flag.- Returns:
- the new value for the active flag,
Optional#empty()
if the active flag is not being updated, the wrapped value is nevernull
-
getStatus
Returns the new value for the status.- Returns:
- the new value for the status,
Optional#empty()
if the status is not being updated,Optional#of("")
if the status is unset, the wrapped value is nevernull
-
getCreatedExternalIds
Returns external IDs that should be newly created for the account.- Returns:
- external IDs that should be newly created for the account
-
getUpdatedExternalIds
Returns external IDs that should be updated for the account.- Returns:
- external IDs that should be updated for the account
-
getDeletedExternalIds
Returns external IDs that should be deleted for the account.- Returns:
- external IDs that should be deleted for the account
-
getUpdatedProjectWatches
public abstract com.google.common.collect.ImmutableMap<ProjectWatches.ProjectWatchKey,Set<NotifyConfig.NotifyType>> getUpdatedProjectWatches()Returns external IDs that should be updated for the account.- Returns:
- external IDs that should be updated for the account
-
getDeletedProjectWatches
public abstract com.google.common.collect.ImmutableSet<ProjectWatches.ProjectWatchKey> getDeletedProjectWatches()Returns project watches that should be deleted for the account.- Returns:
- project watches that should be deleted for the account
-
getGeneralPreferences
Returns the new value for the general preferences.Only preferences that are non-null in the returned GeneralPreferencesInfo should be updated.
- Returns:
- the new value for the general preferences,
Optional#empty()
if the general preferences are not being updated, the wrapped value is nevernull
-
getDiffPreferences
Returns the new value for the diff preferences.Only preferences that are non-null in the returned DiffPreferencesInfo should be updated.
- Returns:
- the new value for the diff preferences,
Optional#empty()
if the diff preferences are not being updated, the wrapped value is nevernull
-
getEditPreferences
Returns the new value for the edit preferences.Only preferences that are non-null in the returned DiffPreferencesInfo should be updated.
- Returns:
- the new value for the edit preferences,
Optional#empty()
if the edit preferences are not being updated, the wrapped value is nevernull
-
getShouldDeleteAccount
Returns whether the delta for this account is deleting the account.If set to true, deletion takes precedence on any other change in this delta.
- Returns:
- whether the account should be deleted.
-
hasExternalIdUpdates
public boolean hasExternalIdUpdates()
-