Class AccountDelta


  • public abstract class AccountDelta
    extends Object
    Data holder for updates to be applied to an account.

    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.

    • Constructor Detail

      • AccountDelta

        public AccountDelta()
    • Method Detail

      • getFullName

        public abstract Optional<String> 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 never null
      • getDisplayName

        public abstract Optional<String> 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 never null
      • getPreferredEmail

        public abstract Optional<String> 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 never null
      • getActive

        public abstract Optional<Boolean> 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 never null
      • getStatus

        public abstract Optional<String> 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 never null
      • getCreatedExternalIds

        public abstract com.google.common.collect.ImmutableSet<ExternalId> getCreatedExternalIds()
        Returns external IDs that should be newly created for the account.
        Returns:
        external IDs that should be newly created for the account
      • getUpdatedExternalIds

        public abstract com.google.common.collect.ImmutableSet<ExternalId> getUpdatedExternalIds()
        Returns external IDs that should be updated for the account.
        Returns:
        external IDs that should be updated for the account
      • getDeletedExternalIds

        public abstract com.google.common.collect.ImmutableSet<ExternalId> 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

        public abstract Optional<GeneralPreferencesInfo> 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 never null
      • getDiffPreferences

        public abstract Optional<DiffPreferencesInfo> 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 never null
      • getEditPreferences

        public abstract Optional<EditPreferencesInfo> 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 never null