Class Repository.Builder

  • Enclosing class:
    Repository

    public static class Repository.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • id

        public Repository.Builder id​(String id)
        The OCID of the repository.

        This value is unique and immutable.

        Parameters:
        id - the value to set
        Returns:
        this builder
      • name

        public Repository.Builder name​(String name)
        Name of the repository.

        Should be unique within the project. This value is mutable.

        Parameters:
        name - the value to set
        Returns:
        this builder
      • compartmentId

        public Repository.Builder compartmentId​(String compartmentId)
        The OCID of the repository’s compartment.
        Parameters:
        compartmentId - the value to set
        Returns:
        this builder
      • namespace

        public Repository.Builder namespace​(String namespace)
        Tenancy unique namespace.
        Parameters:
        namespace - the value to set
        Returns:
        this builder
      • projectId

        public Repository.Builder projectId​(String projectId)
        The OCID of the DevOps project containing the repository.
        Parameters:
        projectId - the value to set
        Returns:
        this builder
      • parentRepositoryId

        public Repository.Builder parentRepositoryId​(String parentRepositoryId)
        The OCID of the parent repository.
        Parameters:
        parentRepositoryId - the value to set
        Returns:
        this builder
      • projectName

        public Repository.Builder projectName​(String projectName)
        Unique project name in a namespace.
        Parameters:
        projectName - the value to set
        Returns:
        this builder
      • sshUrl

        public Repository.Builder sshUrl​(String sshUrl)
        SSH URL that you use to git clone, pull and push.
        Parameters:
        sshUrl - the value to set
        Returns:
        this builder
      • httpUrl

        public Repository.Builder httpUrl​(String httpUrl)
        HTTP URL that you use to git clone, pull and push.
        Parameters:
        httpUrl - the value to set
        Returns:
        this builder
      • description

        public Repository.Builder description​(String description)
        Details of the repository.

        Avoid entering confidential information.

        Parameters:
        description - the value to set
        Returns:
        this builder
      • defaultBranch

        public Repository.Builder defaultBranch​(String defaultBranch)
        The default branch of the repository.
        Parameters:
        defaultBranch - the value to set
        Returns:
        this builder
      • repositoryType

        public Repository.Builder repositoryType​(Repository.RepositoryType repositoryType)
        Type of repository: MIRRORED - Repository created by mirroring an existing repository.

        HOSTED - Repository created and hosted using OCI DevOps code repository. FORKED - Repository created by forking an existing repository.

        Parameters:
        repositoryType - the value to set
        Returns:
        this builder
      • timeCreated

        public Repository.Builder timeCreated​(Date timeCreated)
        The time the repository was created.

        Format defined by RFC3339.

        Parameters:
        timeCreated - the value to set
        Returns:
        this builder
      • timeUpdated

        public Repository.Builder timeUpdated​(Date timeUpdated)
        The time the repository was updated.

        Format defined by RFC3339.

        Parameters:
        timeUpdated - the value to set
        Returns:
        this builder
      • lifecyleDetails

        public Repository.Builder lifecyleDetails​(String lifecyleDetails)
        A message describing the current state in more detail.

        For example, can be used to provide actionable information for a resource in Failed state.

        Parameters:
        lifecyleDetails - the value to set
        Returns:
        this builder
      • branchCount

        public Repository.Builder branchCount​(Integer branchCount)
        The count of the branches present in the repository.
        Parameters:
        branchCount - the value to set
        Returns:
        this builder
      • commitCount

        public Repository.Builder commitCount​(Integer commitCount)
        The count of the commits present in the repository.
        Parameters:
        commitCount - the value to set
        Returns:
        this builder
      • sizeInBytes

        public Repository.Builder sizeInBytes​(Long sizeInBytes)
        The size of the repository in bytes.
        Parameters:
        sizeInBytes - the value to set
        Returns:
        this builder
      • triggerBuildEvents

        public Repository.Builder triggerBuildEvents​(List<Repository.TriggerBuildEvents> triggerBuildEvents)
        Trigger build events supported for this repository: PUSH - Build is triggered when a push event occurs.

        PULL_REQUEST_CREATED - Build is triggered when a pull request is created in the repository. PULL_REQUEST_UPDATED - Build is triggered when a push is made to a branch with an open pull request. COMMIT_UPDATES - Build is triggered when new commits are mirrored into a repository.

        Parameters:
        triggerBuildEvents - the value to set
        Returns:
        this builder
      • freeformTags

        public Repository.Builder freeformTags​(Map<String,​String> freeformTags)
        Simple key-value pair that is applied without any predefined name, type or scope.

        Exists for cross-compatibility only. See Resource Tags. Example: {“bar-key”: “value”}

        Parameters:
        freeformTags - the value to set
        Returns:
        this builder
      • definedTags

        public Repository.Builder definedTags​(Map<String,​Map<String,​Object>> definedTags)
        Defined tags for this resource.

        Each key is predefined and scoped to a namespace. See Resource Tags. Example: {“foo-namespace”: {“bar-key”: “value”}}

        Parameters:
        definedTags - the value to set
        Returns:
        this builder
      • systemTags

        public Repository.Builder systemTags​(Map<String,​Map<String,​Object>> systemTags)
        Usage of system tag keys.

        These predefined keys are scoped to namespaces. See Resource Tags. Example: {“orcl-cloud”: {“free-tier-retained”: “true”}}

        Parameters:
        systemTags - the value to set
        Returns:
        this builder