public abstract class InternalAccountUpdate
extends java.lang.Object
Account updates are done through AccountsUpdate
. This class should be used to tell
AccountsUpdate
how an account should be modified.
This class allows to prepare updates of account properties, 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 the setters in the InternalAccountUpdate.Builder
that correspond to the fields in Account
.
Modifier and Type | Class and Description |
---|---|
static class |
InternalAccountUpdate.Builder
Class to build an account update.
|
Constructor and Description |
---|
InternalAccountUpdate() |
Modifier and Type | Method and Description |
---|---|
static InternalAccountUpdate.Builder |
builder() |
abstract java.util.Optional<java.lang.Boolean> |
getActive()
Returns the new value for the active flag.
|
abstract com.google.common.collect.ImmutableSet<ExternalId> |
getCreatedExternalIds()
Returns external IDs that should be newly created for the account.
|
abstract com.google.common.collect.ImmutableSet<ExternalId> |
getDeletedExternalIds()
Returns external IDs that should be deleted for the account.
|
abstract com.google.common.collect.ImmutableSet<ProjectWatches.ProjectWatchKey> |
getDeletedProjectWatches()
Returns project watches that should be deleted for the account.
|
abstract java.util.Optional<DiffPreferencesInfo> |
getDiffPreferences()
Returns the new value for the diff preferences.
|
abstract java.util.Optional<EditPreferencesInfo> |
getEditPreferences()
Returns the new value for the edit preferences.
|
abstract java.util.Optional<java.lang.String> |
getFullName()
Returns the new value for the full name.
|
abstract java.util.Optional<GeneralPreferencesInfo> |
getGeneralPreferences()
Returns the new value for the general preferences.
|
abstract java.util.Optional<java.lang.String> |
getPreferredEmail()
Returns the new value for the preferred email.
|
abstract java.util.Optional<java.lang.String> |
getStatus()
Returns the new value for the status.
|
abstract com.google.common.collect.ImmutableSet<ExternalId> |
getUpdatedExternalIds()
Returns external IDs that should be updated for the account.
|
abstract com.google.common.collect.ImmutableMap<ProjectWatches.ProjectWatchKey,java.util.Set<ProjectWatches.NotifyType>> |
getUpdatedProjectWatches()
Returns external IDs that should be updated for the account.
|
public static InternalAccountUpdate.Builder builder()
public abstract java.util.Optional<java.lang.String> getFullName()
Optional#empty()
if the full name is not being
updated, Optional#of("")
if the full name is unset, the wrapped value is never
null
public abstract java.util.Optional<java.lang.String> getPreferredEmail()
Optional#empty()
if the preferred email
is not being updated, Optional#of("")
if the preferred email is unset, the wrapped
value is never null
public abstract java.util.Optional<java.lang.Boolean> getActive()
Optional#empty()
if the active flag is not
being updated, the wrapped value is never null
public abstract java.util.Optional<java.lang.String> getStatus()
Optional#empty()
if the status is not being
updated, Optional#of("")
if the status is unset, the wrapped value is never null
public abstract com.google.common.collect.ImmutableSet<ExternalId> getCreatedExternalIds()
public abstract com.google.common.collect.ImmutableSet<ExternalId> getUpdatedExternalIds()
public abstract com.google.common.collect.ImmutableSet<ExternalId> getDeletedExternalIds()
public abstract com.google.common.collect.ImmutableMap<ProjectWatches.ProjectWatchKey,java.util.Set<ProjectWatches.NotifyType>> getUpdatedProjectWatches()
public abstract com.google.common.collect.ImmutableSet<ProjectWatches.ProjectWatchKey> getDeletedProjectWatches()
public abstract java.util.Optional<GeneralPreferencesInfo> getGeneralPreferences()
Only preferences that are non-null in the returned GeneralPreferencesInfo should be updated.
Optional#empty()
if the general
preferences are not being updated, the wrapped value is never null
public abstract java.util.Optional<DiffPreferencesInfo> getDiffPreferences()
Only preferences that are non-null in the returned DiffPreferencesInfo should be updated.
Optional#empty()
if the diff
preferences are not being updated, the wrapped value is never null
public abstract java.util.Optional<EditPreferencesInfo> getEditPreferences()
Only preferences that are non-null in the returned DiffPreferencesInfo should be updated.
Optional#empty()
if the edit
preferences are not being updated, the wrapped value is never null