com.amazonaws.services.codecommit.model

## Class BranchInfo

- java.lang.Object
- - com.amazonaws.services.codecommit.model.BranchInfo

All Implemented Interfaces:
  Serializable, Cloneable

    public class BranchInfo
    extends Object
    implements Serializable, Cloneable

Returns information about a branch.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`BranchInfo()`

### Method Summary

All Methods Instance Methods Concrete Methods
`BranchInfo` `clone()`
`boolean` `equals(Object obj)`
`String` `getBranchName()` The name of the branch.
`String` `getCommitId()` The ID of the last commit made to the branch.
`int` `hashCode()`
`void` `setBranchName(String branchName)` The name of the branch.
`void` `setCommitId(String commitId)` The ID of the last commit made to the branch.
`String` `toString()` Returns a string representation of this object; useful for testing and debugging.
`BranchInfo` `withBranchName(String branchName)` The name of the branch.
`BranchInfo` `withCommitId(String commitId)` The ID of the last commit made to the branch.

### Methods inherited from class java.lang.Object

`finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### BranchInfo

    public BranchInfo()

### Method Detail

#### setBranchName

    public void setBranchName(String branchName)

The name of the branch.

Parameters:
  `branchName` - The name of the branch.

#### getBranchName

    public String getBranchName()

The name of the branch.

Returns:
  The name of the branch.

#### withBranchName

    public BranchInfo withBranchName(String branchName)

The name of the branch.

Parameters:
  `branchName` - The name of the branch.
Returns:
  Returns a reference to this object so that method calls can be chained together.

#### setCommitId

    public void setCommitId(String commitId)

The ID of the last commit made to the branch.

Parameters:
  `commitId` - The ID of the last commit made to the branch.

#### getCommitId

    public String getCommitId()

The ID of the last commit made to the branch.

Returns:
  The ID of the last commit made to the branch.

#### withCommitId

    public BranchInfo withCommitId(String commitId)

The ID of the last commit made to the branch.

Parameters:
  `commitId` - The ID of the last commit made to the branch.
Returns:
  Returns a reference to this object so that method calls can be chained together.

#### toString

    public String toString()

Returns a string representation of this object; useful for testing and debugging.

Overrides:
  `toString` in class `Object`
Returns:
  A string representation of this object.
See Also:
  `Object.toString()`

#### equals

    public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### clone

    public BranchInfo clone()

Overrides:
  `clone` in class `Object`