Class ImmutableRepositoryUpdate

  • All Implemented Interfaces:
    RepositoryUpdate

    @ParametersAreNonnullByDefault
    @Generated("org.immutables.processor.ProxyProcessor")
    @Immutable
    @CheckReturnValue
    public final class ImmutableRepositoryUpdate
    extends Object
    implements RepositoryUpdate
    Immutable implementation of RepositoryUpdate.

    Use the builder to create immutable instances: ImmutableRepositoryUpdate.builder().

    • Method Detail

      • allowUpdateBranch

        public Optional<Boolean> allowUpdateBranch()
        Either true to always allow a pull request head branch that is behind its base branch to be updated even if it is not required to be up to date before merging, or false otherwise.

        Default: false

        Specified by:
        allowUpdateBranch in interface RepositoryUpdate
      • deleteBranchOnMerge

        public Optional<Boolean> deleteBranchOnMerge()
        Either true to allow automatically deleting head branches when pull requests are merged, or false to prevent automatic deletion.

        Default: false

        Specified by:
        deleteBranchOnMerge in interface RepositoryUpdate
      • isArchived

        public Optional<Boolean> isArchived()
        Whether to archive this repository. false will unarchive a previously archived repository.

        Default: false

        Specified by:
        isArchived in interface RepositoryUpdate
      • isTemplate

        public Optional<Boolean> isTemplate()
        Either true to make this repo available as a template repository or false to prevent it. Default: false
        Specified by:
        isTemplate in interface RepositoryUpdate
      • squashMergeCommitMessage

        public Optional<String> squashMergeCommitMessage()
        The default value for a squash merge commit message:

        PR_BODY - default to the pull request's body. COMMIT_MESSAGES - default to the branch's commit messages. BLANK - default to a blank commit message. Can be one of: PR_BODY, COMMIT_MESSAGES, BLANK

        Specified by:
        squashMergeCommitMessage in interface RepositoryUpdate
      • squashMergeCommitTitle

        public Optional<String> squashMergeCommitTitle()
        squash_merge_commit_title string The default value for a squash merge commit title:

        PR_TITLE - default to the pull request's title. COMMIT_OR_PR_TITLE - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). Can be one of: PR_TITLE, COMMIT_OR_PR_TITLE

        Specified by:
        squashMergeCommitTitle in interface RepositoryUpdate
      • mergeCommitMessage

        public Optional<String> mergeCommitMessage()
        The default value for a merge commit message.

        PR_TITLE - default to the pull request's title. PR_BODY - default to the pull request's body. BLANK - default to a blank commit message.

        Specified by:
        mergeCommitMessage in interface RepositoryUpdate
      • mergeCommitTitle

        public Optional<String> mergeCommitTitle()
        The default value for a merge commit title.

        PR_TITLE - default to the pull request's title. MERGE_MESSAGE - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). Can be one of: PR_TITLE, MERGE_MESSAGE

        Specified by:
        mergeCommitTitle in interface RepositoryUpdate
      • teamId

        public Optional<Integer> teamId()
        The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. Default: false
        Specified by:
        teamId in interface RepositoryUpdate
      • webCommitSignoffRequired

        public Optional<Boolean> webCommitSignoffRequired()
        Either true to require contributors to sign off on web-based commits, or false to not require contributors to sign off on web-based commits.

        Default: false

        Specified by:
        webCommitSignoffRequired in interface RepositoryUpdate
      • withDescription

        public final ImmutableRepositoryUpdate withDescription​(String value)
        Copy the current immutable object by setting a present value for the optional description attribute.
        Parameters:
        value - The value for description
        Returns:
        A modified copy of this object
      • withDescription

        public final ImmutableRepositoryUpdate withDescription​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the description attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for description
        Returns:
        A modified copy of this object
      • withAllowAutoMerge

        public final ImmutableRepositoryUpdate withAllowAutoMerge​(boolean value)
        Copy the current immutable object by setting a present value for the optional allowAutoMerge attribute.
        Parameters:
        value - The value for allowAutoMerge
        Returns:
        A modified copy of this object
      • withAllowAutoMerge

        public final ImmutableRepositoryUpdate withAllowAutoMerge​(Optional<Boolean> optional)
        Copy the current immutable object by setting an optional value for the allowAutoMerge attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for allowAutoMerge
        Returns:
        A modified copy of this object
      • withAllowForking

        public final ImmutableRepositoryUpdate withAllowForking​(boolean value)
        Copy the current immutable object by setting a present value for the optional allowForking attribute.
        Parameters:
        value - The value for allowForking
        Returns:
        A modified copy of this object
      • withAllowForking

        public final ImmutableRepositoryUpdate withAllowForking​(Optional<Boolean> optional)
        Copy the current immutable object by setting an optional value for the allowForking attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for allowForking
        Returns:
        A modified copy of this object
      • withAllowSquashMerge

        public final ImmutableRepositoryUpdate withAllowSquashMerge​(boolean value)
        Copy the current immutable object by setting a present value for the optional allowSquashMerge attribute.
        Parameters:
        value - The value for allowSquashMerge
        Returns:
        A modified copy of this object
      • withAllowSquashMerge

        public final ImmutableRepositoryUpdate withAllowSquashMerge​(Optional<Boolean> optional)
        Copy the current immutable object by setting an optional value for the allowSquashMerge attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for allowSquashMerge
        Returns:
        A modified copy of this object
      • withAllowMergeCommit

        public final ImmutableRepositoryUpdate withAllowMergeCommit​(boolean value)
        Copy the current immutable object by setting a present value for the optional allowMergeCommit attribute.
        Parameters:
        value - The value for allowMergeCommit
        Returns:
        A modified copy of this object
      • withAllowMergeCommit

        public final ImmutableRepositoryUpdate withAllowMergeCommit​(Optional<Boolean> optional)
        Copy the current immutable object by setting an optional value for the allowMergeCommit attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for allowMergeCommit
        Returns:
        A modified copy of this object
      • withAllowRebaseMerge

        public final ImmutableRepositoryUpdate withAllowRebaseMerge​(boolean value)
        Copy the current immutable object by setting a present value for the optional allowRebaseMerge attribute.
        Parameters:
        value - The value for allowRebaseMerge
        Returns:
        A modified copy of this object
      • withAllowRebaseMerge

        public final ImmutableRepositoryUpdate withAllowRebaseMerge​(Optional<Boolean> optional)
        Copy the current immutable object by setting an optional value for the allowRebaseMerge attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for allowRebaseMerge
        Returns:
        A modified copy of this object
      • withAllowUpdateBranch

        public final ImmutableRepositoryUpdate withAllowUpdateBranch​(boolean value)
        Copy the current immutable object by setting a present value for the optional allowUpdateBranch attribute.
        Parameters:
        value - The value for allowUpdateBranch
        Returns:
        A modified copy of this object
      • withAllowUpdateBranch

        public final ImmutableRepositoryUpdate withAllowUpdateBranch​(Optional<Boolean> optional)
        Copy the current immutable object by setting an optional value for the allowUpdateBranch attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for allowUpdateBranch
        Returns:
        A modified copy of this object
      • withDefaultBranch

        public final ImmutableRepositoryUpdate withDefaultBranch​(String value)
        Copy the current immutable object by setting a present value for the optional defaultBranch attribute.
        Parameters:
        value - The value for defaultBranch
        Returns:
        A modified copy of this object
      • withDefaultBranch

        public final ImmutableRepositoryUpdate withDefaultBranch​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the defaultBranch attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for defaultBranch
        Returns:
        A modified copy of this object
      • withDeleteBranchOnMerge

        public final ImmutableRepositoryUpdate withDeleteBranchOnMerge​(boolean value)
        Copy the current immutable object by setting a present value for the optional deleteBranchOnMerge attribute.
        Parameters:
        value - The value for deleteBranchOnMerge
        Returns:
        A modified copy of this object
      • withDeleteBranchOnMerge

        public final ImmutableRepositoryUpdate withDeleteBranchOnMerge​(Optional<Boolean> optional)
        Copy the current immutable object by setting an optional value for the deleteBranchOnMerge attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for deleteBranchOnMerge
        Returns:
        A modified copy of this object
      • withHomepage

        public final ImmutableRepositoryUpdate withHomepage​(String value)
        Copy the current immutable object by setting a present value for the optional homepage attribute.
        Parameters:
        value - The value for homepage
        Returns:
        A modified copy of this object
      • withHomepage

        public final ImmutableRepositoryUpdate withHomepage​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the homepage attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for homepage
        Returns:
        A modified copy of this object
      • withHasDownloads

        public final ImmutableRepositoryUpdate withHasDownloads​(boolean value)
        Copy the current immutable object by setting a present value for the optional hasDownloads attribute.
        Parameters:
        value - The value for hasDownloads
        Returns:
        A modified copy of this object
      • withHasDownloads

        public final ImmutableRepositoryUpdate withHasDownloads​(Optional<Boolean> optional)
        Copy the current immutable object by setting an optional value for the hasDownloads attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for hasDownloads
        Returns:
        A modified copy of this object
      • withHasIssues

        public final ImmutableRepositoryUpdate withHasIssues​(boolean value)
        Copy the current immutable object by setting a present value for the optional hasIssues attribute.
        Parameters:
        value - The value for hasIssues
        Returns:
        A modified copy of this object
      • withHasIssues

        public final ImmutableRepositoryUpdate withHasIssues​(Optional<Boolean> optional)
        Copy the current immutable object by setting an optional value for the hasIssues attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for hasIssues
        Returns:
        A modified copy of this object
      • withHasWiki

        public final ImmutableRepositoryUpdate withHasWiki​(boolean value)
        Copy the current immutable object by setting a present value for the optional hasWiki attribute.
        Parameters:
        value - The value for hasWiki
        Returns:
        A modified copy of this object
      • withHasWiki

        public final ImmutableRepositoryUpdate withHasWiki​(Optional<Boolean> optional)
        Copy the current immutable object by setting an optional value for the hasWiki attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for hasWiki
        Returns:
        A modified copy of this object
      • withHasPages

        public final ImmutableRepositoryUpdate withHasPages​(boolean value)
        Copy the current immutable object by setting a present value for the optional hasPages attribute.
        Parameters:
        value - The value for hasPages
        Returns:
        A modified copy of this object
      • withHasPages

        public final ImmutableRepositoryUpdate withHasPages​(Optional<Boolean> optional)
        Copy the current immutable object by setting an optional value for the hasPages attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for hasPages
        Returns:
        A modified copy of this object
      • withHasProjects

        public final ImmutableRepositoryUpdate withHasProjects​(boolean value)
        Copy the current immutable object by setting a present value for the optional hasProjects attribute.
        Parameters:
        value - The value for hasProjects
        Returns:
        A modified copy of this object
      • withHasProjects

        public final ImmutableRepositoryUpdate withHasProjects​(Optional<Boolean> optional)
        Copy the current immutable object by setting an optional value for the hasProjects attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for hasProjects
        Returns:
        A modified copy of this object
      • withIsArchived

        public final ImmutableRepositoryUpdate withIsArchived​(boolean value)
        Copy the current immutable object by setting a present value for the optional isArchived attribute.
        Parameters:
        value - The value for isArchived
        Returns:
        A modified copy of this object
      • withIsArchived

        public final ImmutableRepositoryUpdate withIsArchived​(Optional<Boolean> optional)
        Copy the current immutable object by setting an optional value for the isArchived attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for isArchived
        Returns:
        A modified copy of this object
      • withIsPrivate

        public final ImmutableRepositoryUpdate withIsPrivate​(boolean value)
        Copy the current immutable object by setting a present value for the optional isPrivate attribute.
        Parameters:
        value - The value for isPrivate
        Returns:
        A modified copy of this object
      • withIsPrivate

        public final ImmutableRepositoryUpdate withIsPrivate​(Optional<Boolean> optional)
        Copy the current immutable object by setting an optional value for the isPrivate attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for isPrivate
        Returns:
        A modified copy of this object
      • withIsTemplate

        public final ImmutableRepositoryUpdate withIsTemplate​(boolean value)
        Copy the current immutable object by setting a present value for the optional isTemplate attribute.
        Parameters:
        value - The value for isTemplate
        Returns:
        A modified copy of this object
      • withIsTemplate

        public final ImmutableRepositoryUpdate withIsTemplate​(Optional<Boolean> optional)
        Copy the current immutable object by setting an optional value for the isTemplate attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for isTemplate
        Returns:
        A modified copy of this object
      • withSquashMergeCommitMessage

        public final ImmutableRepositoryUpdate withSquashMergeCommitMessage​(String value)
        Copy the current immutable object by setting a present value for the optional squashMergeCommitMessage attribute.
        Parameters:
        value - The value for squashMergeCommitMessage
        Returns:
        A modified copy of this object
      • withSquashMergeCommitMessage

        public final ImmutableRepositoryUpdate withSquashMergeCommitMessage​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the squashMergeCommitMessage attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for squashMergeCommitMessage
        Returns:
        A modified copy of this object
      • withSquashMergeCommitTitle

        public final ImmutableRepositoryUpdate withSquashMergeCommitTitle​(String value)
        Copy the current immutable object by setting a present value for the optional squashMergeCommitTitle attribute.
        Parameters:
        value - The value for squashMergeCommitTitle
        Returns:
        A modified copy of this object
      • withSquashMergeCommitTitle

        public final ImmutableRepositoryUpdate withSquashMergeCommitTitle​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the squashMergeCommitTitle attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for squashMergeCommitTitle
        Returns:
        A modified copy of this object
      • withMergeCommitMessage

        public final ImmutableRepositoryUpdate withMergeCommitMessage​(String value)
        Copy the current immutable object by setting a present value for the optional mergeCommitMessage attribute.
        Parameters:
        value - The value for mergeCommitMessage
        Returns:
        A modified copy of this object
      • withMergeCommitMessage

        public final ImmutableRepositoryUpdate withMergeCommitMessage​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the mergeCommitMessage attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for mergeCommitMessage
        Returns:
        A modified copy of this object
      • withMergeCommitTitle

        public final ImmutableRepositoryUpdate withMergeCommitTitle​(String value)
        Copy the current immutable object by setting a present value for the optional mergeCommitTitle attribute.
        Parameters:
        value - The value for mergeCommitTitle
        Returns:
        A modified copy of this object
      • withMergeCommitTitle

        public final ImmutableRepositoryUpdate withMergeCommitTitle​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the mergeCommitTitle attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for mergeCommitTitle
        Returns:
        A modified copy of this object
      • withTeamId

        public final ImmutableRepositoryUpdate withTeamId​(int value)
        Copy the current immutable object by setting a present value for the optional teamId attribute.
        Parameters:
        value - The value for teamId
        Returns:
        A modified copy of this object
      • withTeamId

        public final ImmutableRepositoryUpdate withTeamId​(Optional<Integer> optional)
        Copy the current immutable object by setting an optional value for the teamId attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for teamId
        Returns:
        A modified copy of this object
      • withVisibility

        public final ImmutableRepositoryUpdate withVisibility​(String value)
        Copy the current immutable object by setting a present value for the optional visibility attribute.
        Parameters:
        value - The value for visibility
        Returns:
        A modified copy of this object
      • withVisibility

        public final ImmutableRepositoryUpdate withVisibility​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the visibility attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for visibility
        Returns:
        A modified copy of this object
      • withWebCommitSignoffRequired

        public final ImmutableRepositoryUpdate withWebCommitSignoffRequired​(boolean value)
        Copy the current immutable object by setting a present value for the optional webCommitSignoffRequired attribute.
        Parameters:
        value - The value for webCommitSignoffRequired
        Returns:
        A modified copy of this object
      • withWebCommitSignoffRequired

        public final ImmutableRepositoryUpdate withWebCommitSignoffRequired​(Optional<Boolean> optional)
        Copy the current immutable object by setting an optional value for the webCommitSignoffRequired attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for webCommitSignoffRequired
        Returns:
        A modified copy of this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableRepositoryUpdate that have equal attribute values.
        Overrides:
        equals in class Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: description, allowAutoMerge, allowForking, allowSquashMerge, allowMergeCommit, allowRebaseMerge, allowUpdateBranch, defaultBranch, deleteBranchOnMerge, homepage, hasDownloads, hasIssues, hasWiki, hasPages, hasProjects, isArchived, isPrivate, isTemplate, squashMergeCommitMessage, squashMergeCommitTitle, mergeCommitMessage, mergeCommitTitle, teamId, visibility, webCommitSignoffRequired.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

        public String toString()
        Prints the immutable value RepositoryUpdate with attribute values.
        Overrides:
        toString in class Object
        Returns:
        A string representation of the value
      • copyOf

        public static ImmutableRepositoryUpdate copyOf​(RepositoryUpdate instance)
        Creates an immutable copy of a RepositoryUpdate value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
        Parameters:
        instance - The instance to copy
        Returns:
        A copied immutable RepositoryUpdate instance