Class CreateAutoProtectionPolicyRequest.Builder (0.58.0)

public static final class CreateAutoProtectionPolicyRequest.Builder extends GeneratedMessage.Builder<CreateAutoProtectionPolicyRequest.Builder> implements CreateAutoProtectionPolicyRequestOrBuilder

Request message for creating an AutoProtectionPolicy.

Protobuf type google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest

Static Methods

getDescriptor()

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

Methods

build()

public CreateAutoProtectionPolicyRequest build()
Returns
Type Description
CreateAutoProtectionPolicyRequest

buildPartial()

public CreateAutoProtectionPolicyRequest buildPartial()
Returns
Type Description
CreateAutoProtectionPolicyRequest

clear()

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

clearAutoProtectionPolicy()

public CreateAutoProtectionPolicyRequest.Builder clearAutoProtectionPolicy()

Required. The AutoProtectionPolicy resource to create.

.google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CreateAutoProtectionPolicyRequest.Builder

clearAutoProtectionPolicyId()

public CreateAutoProtectionPolicyRequest.Builder clearAutoProtectionPolicyId()

Required. The ID to use for the policy. This will become the final component of the policy's resource name.

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

Returns
Type Description
CreateAutoProtectionPolicyRequest.Builder

This builder for chaining.

clearParent()

public CreateAutoProtectionPolicyRequest.Builder clearParent()

Required. The parent resource where this policy will be created. Format: projects/{project}/locations/{location}

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

Returns
Type Description
CreateAutoProtectionPolicyRequest.Builder

This builder for chaining.

getAutoProtectionPolicy()

public AutoProtectionPolicy getAutoProtectionPolicy()

Required. The AutoProtectionPolicy resource to create.

.google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
AutoProtectionPolicy

The autoProtectionPolicy.

getAutoProtectionPolicyBuilder()

public AutoProtectionPolicy.Builder getAutoProtectionPolicyBuilder()

Required. The AutoProtectionPolicy resource to create.

.google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
AutoProtectionPolicy.Builder

getAutoProtectionPolicyId()

public String getAutoProtectionPolicyId()

Required. The ID to use for the policy. This will become the final component of the policy's resource name.

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

Returns
Type Description
String

The autoProtectionPolicyId.

getAutoProtectionPolicyIdBytes()

public ByteString getAutoProtectionPolicyIdBytes()

Required. The ID to use for the policy. This will become the final component of the policy's resource name.

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

Returns
Type Description
ByteString

The bytes for autoProtectionPolicyId.

getAutoProtectionPolicyOrBuilder()

public AutoProtectionPolicyOrBuilder getAutoProtectionPolicyOrBuilder()

Required. The AutoProtectionPolicy resource to create.

.google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
AutoProtectionPolicyOrBuilder

getDefaultInstanceForType()

public CreateAutoProtectionPolicyRequest getDefaultInstanceForType()
Returns
Type Description
CreateAutoProtectionPolicyRequest

getDescriptorForType()

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

getParent()

public String getParent()

Required. The parent resource where this policy will be created. Format: projects/{project}/locations/{location}

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

Returns
Type Description
String

The parent.

getParentBytes()

public ByteString getParentBytes()

Required. The parent resource where this policy will be created. Format: projects/{project}/locations/{location}

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

Returns
Type Description
ByteString

The bytes for parent.

hasAutoProtectionPolicy()

public boolean hasAutoProtectionPolicy()

Required. The AutoProtectionPolicy resource to create.

.google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the autoProtectionPolicy field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeAutoProtectionPolicy(AutoProtectionPolicy value)

public CreateAutoProtectionPolicyRequest.Builder mergeAutoProtectionPolicy(AutoProtectionPolicy value)

Required. The AutoProtectionPolicy resource to create.

.google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value AutoProtectionPolicy
Returns
Type Description
CreateAutoProtectionPolicyRequest.Builder

mergeFrom(CreateAutoProtectionPolicyRequest other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setAutoProtectionPolicy(AutoProtectionPolicy value)

public CreateAutoProtectionPolicyRequest.Builder setAutoProtectionPolicy(AutoProtectionPolicy value)

Required. The AutoProtectionPolicy resource to create.

.google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value AutoProtectionPolicy
Returns
Type Description
CreateAutoProtectionPolicyRequest.Builder

setAutoProtectionPolicy(AutoProtectionPolicy.Builder builderForValue)

public CreateAutoProtectionPolicyRequest.Builder setAutoProtectionPolicy(AutoProtectionPolicy.Builder builderForValue)

Required. The AutoProtectionPolicy resource to create.

.google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue AutoProtectionPolicy.Builder
Returns
Type Description
CreateAutoProtectionPolicyRequest.Builder

setAutoProtectionPolicyId(String value)

public CreateAutoProtectionPolicyRequest.Builder setAutoProtectionPolicyId(String value)

Required. The ID to use for the policy. This will become the final component of the policy's resource name.

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

Parameter
Name Description
value String

The autoProtectionPolicyId to set.

Returns
Type Description
CreateAutoProtectionPolicyRequest.Builder

This builder for chaining.

setAutoProtectionPolicyIdBytes(ByteString value)

public CreateAutoProtectionPolicyRequest.Builder setAutoProtectionPolicyIdBytes(ByteString value)

Required. The ID to use for the policy. This will become the final component of the policy's resource name.

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

Parameter
Name Description
value ByteString

The bytes for autoProtectionPolicyId to set.

Returns
Type Description
CreateAutoProtectionPolicyRequest.Builder

This builder for chaining.

setParent(String value)

public CreateAutoProtectionPolicyRequest.Builder setParent(String value)

Required. The parent resource where this policy will be created. Format: projects/{project}/locations/{location}

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

Parameter
Name Description
value String

The parent to set.

Returns
Type Description
CreateAutoProtectionPolicyRequest.Builder

This builder for chaining.

setParentBytes(ByteString value)

public CreateAutoProtectionPolicyRequest.Builder setParentBytes(ByteString value)

Required. The parent resource where this policy will be created. Format: projects/{project}/locations/{location}

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

Parameter
Name Description
value ByteString

The bytes for parent to set.

Returns
Type Description
CreateAutoProtectionPolicyRequest.Builder

This builder for chaining.