# The Branch object

## Attributes

- `name` (string)
  Output only. The full resource path of the branch.
   Format: projects/{project_id}/branches/{branch_id}
- `uid` (string)
  System-generated unique ID for the branch.
- `parent` (string)
  The project containing this branch (API resource hierarchy).
   Format: projects/{project_id}
  
   Note: This field indicates where the branch exists in the resource hierarchy.
   For point-in-time branching from another branch, see `status.source_branch`.
- `create_time` (string)
  A timestamp indicating when the branch was created.
- `update_time` (string)
  A timestamp indicating when the branch was last updated.
- `spec` (object)
  The spec contains the branch configuration.
  - `source_branch` (string)
    The name of the source branch from which this branch was created (data lineage for point-in-time recovery).
     If not specified, defaults to the project's default branch.
     Format: projects/{project_id}/branches/{branch_id}
  - `source_branch_lsn` (string)
    The Log Sequence Number (LSN) on the source branch from which this branch was created.
  - `source_branch_time` (string)
    The point in time on the source branch from which this branch was created.
  - `is_protected` (boolean)
    When set to true, protects the branch from deletion and reset. Associated compute endpoints and the project cannot be deleted while the branch is protected.
  - `expire_time` (string)
    Absolute expiration timestamp. When set, the branch will expire at this time.
     Mutually exclusive with `ttl` and `no_expiry`. When updating, use `spec.expiration` in the update_mask.
  - `ttl` (string)
    Relative time-to-live duration. When set, the branch will expire at creation_time + ttl.
     Mutually exclusive with `expire_time` and `no_expiry`. When updating, use `spec.expiration` in the update_mask.
  - `no_expiry` (boolean)
    Explicitly disable expiration. When set to true, the branch will not expire.
     If set to false, the request is invalid; provide either ttl or expire_time instead.
     Mutually exclusive with `expire_time` and `ttl`. When updating, use `spec.expiration` in the update_mask.
- `status` (object)
  The current status of a Branch.
  - `source_branch` (string)
    The name of the source branch from which this branch was created.
     Format: projects/{project_id}/branches/{branch_id}
  - `source_branch_lsn` (string)
    The Log Sequence Number (LSN) on the source branch from which this branch was created.
  - `source_branch_time` (string)
    The point in time on the source branch from which this branch was created.
  - `default` (boolean)
    Whether the branch is the project's default branch.
  - `is_protected` (boolean)
    Whether the branch is protected.
  - `current_state` (string)
    The branch's state, indicating if it is initializing, ready for use, or archived.
    Possible values: `STATE_UNSPECIFIED`, `INIT`, `IMPORTING`, `RESETTING`, `READY`, `ARCHIVED`
  - `pending_state` (string)
    The pending state of the branch, if a state transition is in progress.
    Possible values: `STATE_UNSPECIFIED`, `INIT`, `IMPORTING`, `RESETTING`, `READY`, `ARCHIVED`
  - `state_change_time` (string)
    A timestamp indicating when the `current_state` began.
  - `logical_size_bytes` (int64)
    The logical size of the branch.
  - `expire_time` (string)
    Absolute expiration time for the branch. Empty if expiration is disabled.
  - `branch_id` (string)
    Part of the resource name.
- `branch_id` (string)
  The part of the name, chosen by the user when the resource was created.

## Example

```json
{
  "name": "string",
  "uid": "string",
  "parent": "string",
  "create_time": "string",
  "update_time": "string",
  "spec": {
    "source_branch": "string",
    "source_branch_lsn": "string",
    "source_branch_time": "string",
    "is_protected": true,
    "expire_time": "string",
    "ttl": "string",
    "no_expiry": true
  },
  "status": {
    "source_branch": "string",
    "source_branch_lsn": "string",
    "source_branch_time": "string",
    "default": true,
    "is_protected": true,
    "current_state": "string",
    "pending_state": "string",
    "state_change_time": "string",
    "logical_size_bytes": 0,
    "expire_time": "string",
    "branch_id": "string"
  },
  "branch_id": "string"
}
```


