Class CheckoutWorkspaceBranchRequest.Builder (0.98.0)

public static final class CheckoutWorkspaceBranchRequest.Builder extends GeneratedMessage.Builder<CheckoutWorkspaceBranchRequest.Builder> implements CheckoutWorkspaceBranchRequestOrBuilder

CheckoutWorkspaceBranch request message.

Protobuf type google.cloud.dataform.v1beta1.CheckoutWorkspaceBranchRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public CheckoutWorkspaceBranchRequest build()
Returns
Type Description
CheckoutWorkspaceBranchRequest

buildPartial()

public CheckoutWorkspaceBranchRequest buildPartial()
Returns
Type Description
CheckoutWorkspaceBranchRequest

clear()

public CheckoutWorkspaceBranchRequest.Builder clear()
Returns
Type Description
CheckoutWorkspaceBranchRequest.Builder
Overrides

clearBranch()

public CheckoutWorkspaceBranchRequest.Builder clearBranch()

Required. The name of the branch in the Git repository to which the workspace should be checked out.

string branch = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CheckoutWorkspaceBranchRequest.Builder

This builder for chaining.

clearCreateIfNotExists()

public CheckoutWorkspaceBranchRequest.Builder clearCreateIfNotExists()

Optional. If set to true and the branch does not exist, it will be created. Otherwise, an error will be thrown.

bool create_if_not_exists = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CheckoutWorkspaceBranchRequest.Builder

This builder for chaining.

clearName()

public CheckoutWorkspaceBranchRequest.Builder clearName()

Required. The workspace resource name. Format: projects/{project}/locations/{location}/repositories/{repository}/workspaces/{workspace}

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
CheckoutWorkspaceBranchRequest.Builder

This builder for chaining.

clearSourceBranch()

public CheckoutWorkspaceBranchRequest.Builder clearSourceBranch()

Optional. The name of the branch in the Git repository from which the new branch should be created. If left unset, the workspace's current branch name will be used. Accepts only branch names from FetchWorkspaceBranches response, and can only be set if create_if_not_exists is true. Oherwise, an error will be thrown.

string source_branch = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CheckoutWorkspaceBranchRequest.Builder

This builder for chaining.

getBranch()

public String getBranch()

Required. The name of the branch in the Git repository to which the workspace should be checked out.

string branch = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The branch.

getBranchBytes()

public ByteString getBranchBytes()

Required. The name of the branch in the Git repository to which the workspace should be checked out.

string branch = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for branch.

getCreateIfNotExists()

public boolean getCreateIfNotExists()

Optional. If set to true and the branch does not exist, it will be created. Otherwise, an error will be thrown.

bool create_if_not_exists = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The createIfNotExists.

getDefaultInstanceForType()

public CheckoutWorkspaceBranchRequest getDefaultInstanceForType()
Returns
Type Description
CheckoutWorkspaceBranchRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getName()

public String getName()

Required. The workspace resource name. Format: projects/{project}/locations/{location}/repositories/{repository}/workspaces/{workspace}

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. The workspace resource name. Format: projects/{project}/locations/{location}/repositories/{repository}/workspaces/{workspace}

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for name.

getSourceBranch()

public String getSourceBranch()

Optional. The name of the branch in the Git repository from which the new branch should be created. If left unset, the workspace's current branch name will be used. Accepts only branch names from FetchWorkspaceBranches response, and can only be set if create_if_not_exists is true. Oherwise, an error will be thrown.

string source_branch = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The sourceBranch.

getSourceBranchBytes()

public ByteString getSourceBranchBytes()

Optional. The name of the branch in the Git repository from which the new branch should be created. If left unset, the workspace's current branch name will be used. Accepts only branch names from FetchWorkspaceBranches response, and can only be set if create_if_not_exists is true. Oherwise, an error will be thrown.

string source_branch = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for sourceBranch.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CheckoutWorkspaceBranchRequest other)

public CheckoutWorkspaceBranchRequest.Builder mergeFrom(CheckoutWorkspaceBranchRequest other)
Parameter
Name Description
other CheckoutWorkspaceBranchRequest
Returns
Type Description
CheckoutWorkspaceBranchRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CheckoutWorkspaceBranchRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CheckoutWorkspaceBranchRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public CheckoutWorkspaceBranchRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
CheckoutWorkspaceBranchRequest.Builder
Overrides

setBranch(String value)

public CheckoutWorkspaceBranchRequest.Builder setBranch(String value)

Required. The name of the branch in the Git repository to which the workspace should be checked out.

string branch = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The branch to set.

Returns
Type Description
CheckoutWorkspaceBranchRequest.Builder

This builder for chaining.

setBranchBytes(ByteString value)

public CheckoutWorkspaceBranchRequest.Builder setBranchBytes(ByteString value)

Required. The name of the branch in the Git repository to which the workspace should be checked out.

string branch = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for branch to set.

Returns
Type Description
CheckoutWorkspaceBranchRequest.Builder

This builder for chaining.

setCreateIfNotExists(boolean value)

public CheckoutWorkspaceBranchRequest.Builder setCreateIfNotExists(boolean value)

Optional. If set to true and the branch does not exist, it will be created. Otherwise, an error will be thrown.

bool create_if_not_exists = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The createIfNotExists to set.

Returns
Type Description
CheckoutWorkspaceBranchRequest.Builder

This builder for chaining.

setName(String value)

public CheckoutWorkspaceBranchRequest.Builder setName(String value)

Required. The workspace resource name. Format: projects/{project}/locations/{location}/repositories/{repository}/workspaces/{workspace}

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The name to set.

Returns
Type Description
CheckoutWorkspaceBranchRequest.Builder

This builder for chaining.

setNameBytes(ByteString value)

public CheckoutWorkspaceBranchRequest.Builder setNameBytes(ByteString value)

Required. The workspace resource name. Format: projects/{project}/locations/{location}/repositories/{repository}/workspaces/{workspace}

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
CheckoutWorkspaceBranchRequest.Builder

This builder for chaining.

setSourceBranch(String value)

public CheckoutWorkspaceBranchRequest.Builder setSourceBranch(String value)

Optional. The name of the branch in the Git repository from which the new branch should be created. If left unset, the workspace's current branch name will be used. Accepts only branch names from FetchWorkspaceBranches response, and can only be set if create_if_not_exists is true. Oherwise, an error will be thrown.

string source_branch = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The sourceBranch to set.

Returns
Type Description
CheckoutWorkspaceBranchRequest.Builder

This builder for chaining.

setSourceBranchBytes(ByteString value)

public CheckoutWorkspaceBranchRequest.Builder setSourceBranchBytes(ByteString value)

Optional. The name of the branch in the Git repository from which the new branch should be created. If left unset, the workspace's current branch name will be used. Accepts only branch names from FetchWorkspaceBranches response, and can only be set if create_if_not_exists is true. Oherwise, an error will be thrown.

string source_branch = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for sourceBranch to set.

Returns
Type Description
CheckoutWorkspaceBranchRequest.Builder

This builder for chaining.