Class ResourcePolicy.Builder (1.51.0)

public static final class ResourcePolicy.Builder extends GeneratedMessageV3.Builder<ResourcePolicy.Builder> implements ResourcePolicyOrBuilder

Represents a Resource Policy resource. You can use resource policies to schedule actions for some Compute Engine resources. For example, you can use them to schedule persistent disk snapshots.

Protobuf type google.cloud.compute.v1.ResourcePolicy

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ResourcePolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ResourcePolicy.Builder
Overrides

build()

public ResourcePolicy build()
Returns
TypeDescription
ResourcePolicy

buildPartial()

public ResourcePolicy buildPartial()
Returns
TypeDescription
ResourcePolicy

clear()

public ResourcePolicy.Builder clear()
Returns
TypeDescription
ResourcePolicy.Builder
Overrides

clearCreationTimestamp()

public ResourcePolicy.Builder clearCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
ResourcePolicy.Builder

This builder for chaining.

clearDescription()

public ResourcePolicy.Builder clearDescription()

optional string description = 422937596;

Returns
TypeDescription
ResourcePolicy.Builder

This builder for chaining.

clearDiskConsistencyGroupPolicy()

public ResourcePolicy.Builder clearDiskConsistencyGroupPolicy()

Resource policy for disk consistency groups.

optional .google.cloud.compute.v1.ResourcePolicyDiskConsistencyGroupPolicy disk_consistency_group_policy = 473727515;

Returns
TypeDescription
ResourcePolicy.Builder

clearField(Descriptors.FieldDescriptor field)

public ResourcePolicy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
ResourcePolicy.Builder
Overrides

clearGroupPlacementPolicy()

public ResourcePolicy.Builder clearGroupPlacementPolicy()

Resource policy for instances for placement configuration.

optional .google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy group_placement_policy = 10931596;

Returns
TypeDescription
ResourcePolicy.Builder

clearId()

public ResourcePolicy.Builder clearId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
TypeDescription
ResourcePolicy.Builder

This builder for chaining.

clearInstanceSchedulePolicy()

public ResourcePolicy.Builder clearInstanceSchedulePolicy()

Resource policy for scheduling instance operations.

optional .google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy instance_schedule_policy = 344877104;

Returns
TypeDescription
ResourcePolicy.Builder

clearKind()

public ResourcePolicy.Builder clearKind()

[Output Only] Type of the resource. Always compute#resource_policies for resource policies.

optional string kind = 3292052;

Returns
TypeDescription
ResourcePolicy.Builder

This builder for chaining.

clearName()

public ResourcePolicy.Builder clearName()

The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
TypeDescription
ResourcePolicy.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ResourcePolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
ResourcePolicy.Builder
Overrides

clearRegion()

public ResourcePolicy.Builder clearRegion()

optional string region = 138946292;

Returns
TypeDescription
ResourcePolicy.Builder

This builder for chaining.

clearResourceStatus()

public ResourcePolicy.Builder clearResourceStatus()

[Output Only] The system status of the resource policy.

optional .google.cloud.compute.v1.ResourcePolicyResourceStatus resource_status = 249429315;

Returns
TypeDescription
ResourcePolicy.Builder
public ResourcePolicy.Builder clearSelfLink()

[Output Only] Server-defined fully-qualified URL for this resource.

optional string self_link = 456214797;

Returns
TypeDescription
ResourcePolicy.Builder

This builder for chaining.

clearSnapshotSchedulePolicy()

public ResourcePolicy.Builder clearSnapshotSchedulePolicy()

Resource policy for persistent disks for creating snapshots.

optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy snapshot_schedule_policy = 218131295;

Returns
TypeDescription
ResourcePolicy.Builder

clearStatus()

public ResourcePolicy.Builder clearStatus()

[Output Only] The status of resource policy creation. Check the Status enum for the list of possible values.

optional string status = 181260274;

Returns
TypeDescription
ResourcePolicy.Builder

This builder for chaining.

clone()

public ResourcePolicy.Builder clone()
Returns
TypeDescription
ResourcePolicy.Builder
Overrides

getCreationTimestamp()

public String getCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
String

The creationTimestamp.

getCreationTimestampBytes()

public ByteString getCreationTimestampBytes()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
ByteString

The bytes for creationTimestamp.

getDefaultInstanceForType()

public ResourcePolicy getDefaultInstanceForType()
Returns
TypeDescription
ResourcePolicy

getDescription()

public String getDescription()

optional string description = 422937596;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

optional string description = 422937596;

Returns
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDiskConsistencyGroupPolicy()

public ResourcePolicyDiskConsistencyGroupPolicy getDiskConsistencyGroupPolicy()

Resource policy for disk consistency groups.

optional .google.cloud.compute.v1.ResourcePolicyDiskConsistencyGroupPolicy disk_consistency_group_policy = 473727515;

Returns
TypeDescription
ResourcePolicyDiskConsistencyGroupPolicy

The diskConsistencyGroupPolicy.

getDiskConsistencyGroupPolicyBuilder()

public ResourcePolicyDiskConsistencyGroupPolicy.Builder getDiskConsistencyGroupPolicyBuilder()

Resource policy for disk consistency groups.

optional .google.cloud.compute.v1.ResourcePolicyDiskConsistencyGroupPolicy disk_consistency_group_policy = 473727515;

Returns
TypeDescription
ResourcePolicyDiskConsistencyGroupPolicy.Builder

getDiskConsistencyGroupPolicyOrBuilder()

public ResourcePolicyDiskConsistencyGroupPolicyOrBuilder getDiskConsistencyGroupPolicyOrBuilder()

Resource policy for disk consistency groups.

optional .google.cloud.compute.v1.ResourcePolicyDiskConsistencyGroupPolicy disk_consistency_group_policy = 473727515;

Returns
TypeDescription
ResourcePolicyDiskConsistencyGroupPolicyOrBuilder

getGroupPlacementPolicy()

public ResourcePolicyGroupPlacementPolicy getGroupPlacementPolicy()

Resource policy for instances for placement configuration.

optional .google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy group_placement_policy = 10931596;

Returns
TypeDescription
ResourcePolicyGroupPlacementPolicy

The groupPlacementPolicy.

getGroupPlacementPolicyBuilder()

public ResourcePolicyGroupPlacementPolicy.Builder getGroupPlacementPolicyBuilder()

Resource policy for instances for placement configuration.

optional .google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy group_placement_policy = 10931596;

Returns
TypeDescription
ResourcePolicyGroupPlacementPolicy.Builder

getGroupPlacementPolicyOrBuilder()

public ResourcePolicyGroupPlacementPolicyOrBuilder getGroupPlacementPolicyOrBuilder()

Resource policy for instances for placement configuration.

optional .google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy group_placement_policy = 10931596;

Returns
TypeDescription
ResourcePolicyGroupPlacementPolicyOrBuilder

getId()

public long getId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
TypeDescription
long

The id.

getInstanceSchedulePolicy()

public ResourcePolicyInstanceSchedulePolicy getInstanceSchedulePolicy()

Resource policy for scheduling instance operations.

optional .google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy instance_schedule_policy = 344877104;

Returns
TypeDescription
ResourcePolicyInstanceSchedulePolicy

The instanceSchedulePolicy.

getInstanceSchedulePolicyBuilder()

public ResourcePolicyInstanceSchedulePolicy.Builder getInstanceSchedulePolicyBuilder()

Resource policy for scheduling instance operations.

optional .google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy instance_schedule_policy = 344877104;

Returns
TypeDescription
ResourcePolicyInstanceSchedulePolicy.Builder

getInstanceSchedulePolicyOrBuilder()

public ResourcePolicyInstanceSchedulePolicyOrBuilder getInstanceSchedulePolicyOrBuilder()

Resource policy for scheduling instance operations.

optional .google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy instance_schedule_policy = 344877104;

Returns
TypeDescription
ResourcePolicyInstanceSchedulePolicyOrBuilder

getKind()

public String getKind()

[Output Only] Type of the resource. Always compute#resource_policies for resource policies.

optional string kind = 3292052;

Returns
TypeDescription
String

The kind.

getKindBytes()

public ByteString getKindBytes()

[Output Only] Type of the resource. Always compute#resource_policies for resource policies.

optional string kind = 3292052;

Returns
TypeDescription
ByteString

The bytes for kind.

getName()

public String getName()

The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
TypeDescription
ByteString

The bytes for name.

getRegion()

public String getRegion()

optional string region = 138946292;

Returns
TypeDescription
String

The region.

getRegionBytes()

public ByteString getRegionBytes()

optional string region = 138946292;

Returns
TypeDescription
ByteString

The bytes for region.

getResourceStatus()

public ResourcePolicyResourceStatus getResourceStatus()

[Output Only] The system status of the resource policy.

optional .google.cloud.compute.v1.ResourcePolicyResourceStatus resource_status = 249429315;

Returns
TypeDescription
ResourcePolicyResourceStatus

The resourceStatus.

getResourceStatusBuilder()

public ResourcePolicyResourceStatus.Builder getResourceStatusBuilder()

[Output Only] The system status of the resource policy.

optional .google.cloud.compute.v1.ResourcePolicyResourceStatus resource_status = 249429315;

Returns
TypeDescription
ResourcePolicyResourceStatus.Builder

getResourceStatusOrBuilder()

public ResourcePolicyResourceStatusOrBuilder getResourceStatusOrBuilder()

[Output Only] The system status of the resource policy.

optional .google.cloud.compute.v1.ResourcePolicyResourceStatus resource_status = 249429315;

Returns
TypeDescription
ResourcePolicyResourceStatusOrBuilder
public String getSelfLink()

[Output Only] Server-defined fully-qualified URL for this resource.

optional string self_link = 456214797;

Returns
TypeDescription
String

The selfLink.

getSelfLinkBytes()

public ByteString getSelfLinkBytes()

[Output Only] Server-defined fully-qualified URL for this resource.

optional string self_link = 456214797;

Returns
TypeDescription
ByteString

The bytes for selfLink.

getSnapshotSchedulePolicy()

public ResourcePolicySnapshotSchedulePolicy getSnapshotSchedulePolicy()

Resource policy for persistent disks for creating snapshots.

optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy snapshot_schedule_policy = 218131295;

Returns
TypeDescription
ResourcePolicySnapshotSchedulePolicy

The snapshotSchedulePolicy.

getSnapshotSchedulePolicyBuilder()

public ResourcePolicySnapshotSchedulePolicy.Builder getSnapshotSchedulePolicyBuilder()

Resource policy for persistent disks for creating snapshots.

optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy snapshot_schedule_policy = 218131295;

Returns
TypeDescription
ResourcePolicySnapshotSchedulePolicy.Builder

getSnapshotSchedulePolicyOrBuilder()

public ResourcePolicySnapshotSchedulePolicyOrBuilder getSnapshotSchedulePolicyOrBuilder()

Resource policy for persistent disks for creating snapshots.

optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy snapshot_schedule_policy = 218131295;

Returns
TypeDescription
ResourcePolicySnapshotSchedulePolicyOrBuilder

getStatus()

public String getStatus()

[Output Only] The status of resource policy creation. Check the Status enum for the list of possible values.

optional string status = 181260274;

Returns
TypeDescription
String

The status.

getStatusBytes()

public ByteString getStatusBytes()

[Output Only] The status of resource policy creation. Check the Status enum for the list of possible values.

optional string status = 181260274;

Returns
TypeDescription
ByteString

The bytes for status.

hasCreationTimestamp()

public boolean hasCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
boolean

Whether the creationTimestamp field is set.

hasDescription()

public boolean hasDescription()

optional string description = 422937596;

Returns
TypeDescription
boolean

Whether the description field is set.

hasDiskConsistencyGroupPolicy()

public boolean hasDiskConsistencyGroupPolicy()

Resource policy for disk consistency groups.

optional .google.cloud.compute.v1.ResourcePolicyDiskConsistencyGroupPolicy disk_consistency_group_policy = 473727515;

Returns
TypeDescription
boolean

Whether the diskConsistencyGroupPolicy field is set.

hasGroupPlacementPolicy()

public boolean hasGroupPlacementPolicy()

Resource policy for instances for placement configuration.

optional .google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy group_placement_policy = 10931596;

Returns
TypeDescription
boolean

Whether the groupPlacementPolicy field is set.

hasId()

public boolean hasId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
TypeDescription
boolean

Whether the id field is set.

hasInstanceSchedulePolicy()

public boolean hasInstanceSchedulePolicy()

Resource policy for scheduling instance operations.

optional .google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy instance_schedule_policy = 344877104;

Returns
TypeDescription
boolean

Whether the instanceSchedulePolicy field is set.

hasKind()

public boolean hasKind()

[Output Only] Type of the resource. Always compute#resource_policies for resource policies.

optional string kind = 3292052;

Returns
TypeDescription
boolean

Whether the kind field is set.

hasName()

public boolean hasName()

The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
TypeDescription
boolean

Whether the name field is set.

hasRegion()

public boolean hasRegion()

optional string region = 138946292;

Returns
TypeDescription
boolean

Whether the region field is set.

hasResourceStatus()

public boolean hasResourceStatus()

[Output Only] The system status of the resource policy.

optional .google.cloud.compute.v1.ResourcePolicyResourceStatus resource_status = 249429315;

Returns
TypeDescription
boolean

Whether the resourceStatus field is set.

public boolean hasSelfLink()

[Output Only] Server-defined fully-qualified URL for this resource.

optional string self_link = 456214797;

Returns
TypeDescription
boolean

Whether the selfLink field is set.

hasSnapshotSchedulePolicy()

public boolean hasSnapshotSchedulePolicy()

Resource policy for persistent disks for creating snapshots.

optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy snapshot_schedule_policy = 218131295;

Returns
TypeDescription
boolean

Whether the snapshotSchedulePolicy field is set.

hasStatus()

public boolean hasStatus()

[Output Only] The status of resource policy creation. Check the Status enum for the list of possible values.

optional string status = 181260274;

Returns
TypeDescription
boolean

Whether the status field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeDiskConsistencyGroupPolicy(ResourcePolicyDiskConsistencyGroupPolicy value)

public ResourcePolicy.Builder mergeDiskConsistencyGroupPolicy(ResourcePolicyDiskConsistencyGroupPolicy value)

Resource policy for disk consistency groups.

optional .google.cloud.compute.v1.ResourcePolicyDiskConsistencyGroupPolicy disk_consistency_group_policy = 473727515;

Parameter
NameDescription
valueResourcePolicyDiskConsistencyGroupPolicy
Returns
TypeDescription
ResourcePolicy.Builder

mergeFrom(ResourcePolicy other)

public ResourcePolicy.Builder mergeFrom(ResourcePolicy other)
Parameter
NameDescription
otherResourcePolicy
Returns
TypeDescription
ResourcePolicy.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ResourcePolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ResourcePolicy.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public ResourcePolicy.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
ResourcePolicy.Builder
Overrides

mergeGroupPlacementPolicy(ResourcePolicyGroupPlacementPolicy value)

public ResourcePolicy.Builder mergeGroupPlacementPolicy(ResourcePolicyGroupPlacementPolicy value)

Resource policy for instances for placement configuration.

optional .google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy group_placement_policy = 10931596;

Parameter
NameDescription
valueResourcePolicyGroupPlacementPolicy
Returns
TypeDescription
ResourcePolicy.Builder

mergeInstanceSchedulePolicy(ResourcePolicyInstanceSchedulePolicy value)

public ResourcePolicy.Builder mergeInstanceSchedulePolicy(ResourcePolicyInstanceSchedulePolicy value)

Resource policy for scheduling instance operations.

optional .google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy instance_schedule_policy = 344877104;

Parameter
NameDescription
valueResourcePolicyInstanceSchedulePolicy
Returns
TypeDescription
ResourcePolicy.Builder

mergeResourceStatus(ResourcePolicyResourceStatus value)

public ResourcePolicy.Builder mergeResourceStatus(ResourcePolicyResourceStatus value)

[Output Only] The system status of the resource policy.

optional .google.cloud.compute.v1.ResourcePolicyResourceStatus resource_status = 249429315;

Parameter
NameDescription
valueResourcePolicyResourceStatus
Returns
TypeDescription
ResourcePolicy.Builder

mergeSnapshotSchedulePolicy(ResourcePolicySnapshotSchedulePolicy value)

public ResourcePolicy.Builder mergeSnapshotSchedulePolicy(ResourcePolicySnapshotSchedulePolicy value)

Resource policy for persistent disks for creating snapshots.

optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy snapshot_schedule_policy = 218131295;

Parameter
NameDescription
valueResourcePolicySnapshotSchedulePolicy
Returns
TypeDescription
ResourcePolicy.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ResourcePolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ResourcePolicy.Builder
Overrides

setCreationTimestamp(String value)

public ResourcePolicy.Builder setCreationTimestamp(String value)

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Parameter
NameDescription
valueString

The creationTimestamp to set.

Returns
TypeDescription
ResourcePolicy.Builder

This builder for chaining.

setCreationTimestampBytes(ByteString value)

public ResourcePolicy.Builder setCreationTimestampBytes(ByteString value)

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Parameter
NameDescription
valueByteString

The bytes for creationTimestamp to set.

Returns
TypeDescription
ResourcePolicy.Builder

This builder for chaining.

setDescription(String value)

public ResourcePolicy.Builder setDescription(String value)

optional string description = 422937596;

Parameter
NameDescription
valueString

The description to set.

Returns
TypeDescription
ResourcePolicy.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public ResourcePolicy.Builder setDescriptionBytes(ByteString value)

optional string description = 422937596;

Parameter
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
ResourcePolicy.Builder

This builder for chaining.

setDiskConsistencyGroupPolicy(ResourcePolicyDiskConsistencyGroupPolicy value)

public ResourcePolicy.Builder setDiskConsistencyGroupPolicy(ResourcePolicyDiskConsistencyGroupPolicy value)

Resource policy for disk consistency groups.

optional .google.cloud.compute.v1.ResourcePolicyDiskConsistencyGroupPolicy disk_consistency_group_policy = 473727515;

Parameter
NameDescription
valueResourcePolicyDiskConsistencyGroupPolicy
Returns
TypeDescription
ResourcePolicy.Builder

setDiskConsistencyGroupPolicy(ResourcePolicyDiskConsistencyGroupPolicy.Builder builderForValue)

public ResourcePolicy.Builder setDiskConsistencyGroupPolicy(ResourcePolicyDiskConsistencyGroupPolicy.Builder builderForValue)

Resource policy for disk consistency groups.

optional .google.cloud.compute.v1.ResourcePolicyDiskConsistencyGroupPolicy disk_consistency_group_policy = 473727515;

Parameter
NameDescription
builderForValueResourcePolicyDiskConsistencyGroupPolicy.Builder
Returns
TypeDescription
ResourcePolicy.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public ResourcePolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ResourcePolicy.Builder
Overrides

setGroupPlacementPolicy(ResourcePolicyGroupPlacementPolicy value)

public ResourcePolicy.Builder setGroupPlacementPolicy(ResourcePolicyGroupPlacementPolicy value)

Resource policy for instances for placement configuration.

optional .google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy group_placement_policy = 10931596;

Parameter
NameDescription
valueResourcePolicyGroupPlacementPolicy
Returns
TypeDescription
ResourcePolicy.Builder

setGroupPlacementPolicy(ResourcePolicyGroupPlacementPolicy.Builder builderForValue)

public ResourcePolicy.Builder setGroupPlacementPolicy(ResourcePolicyGroupPlacementPolicy.Builder builderForValue)

Resource policy for instances for placement configuration.

optional .google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy group_placement_policy = 10931596;

Parameter
NameDescription
builderForValueResourcePolicyGroupPlacementPolicy.Builder
Returns
TypeDescription
ResourcePolicy.Builder

setId(long value)

public ResourcePolicy.Builder setId(long value)

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Parameter
NameDescription
valuelong

The id to set.

Returns
TypeDescription
ResourcePolicy.Builder

This builder for chaining.

setInstanceSchedulePolicy(ResourcePolicyInstanceSchedulePolicy value)

public ResourcePolicy.Builder setInstanceSchedulePolicy(ResourcePolicyInstanceSchedulePolicy value)

Resource policy for scheduling instance operations.

optional .google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy instance_schedule_policy = 344877104;

Parameter
NameDescription
valueResourcePolicyInstanceSchedulePolicy
Returns
TypeDescription
ResourcePolicy.Builder

setInstanceSchedulePolicy(ResourcePolicyInstanceSchedulePolicy.Builder builderForValue)

public ResourcePolicy.Builder setInstanceSchedulePolicy(ResourcePolicyInstanceSchedulePolicy.Builder builderForValue)

Resource policy for scheduling instance operations.

optional .google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy instance_schedule_policy = 344877104;

Parameter
NameDescription
builderForValueResourcePolicyInstanceSchedulePolicy.Builder
Returns
TypeDescription
ResourcePolicy.Builder

setKind(String value)

public ResourcePolicy.Builder setKind(String value)

[Output Only] Type of the resource. Always compute#resource_policies for resource policies.

optional string kind = 3292052;

Parameter
NameDescription
valueString

The kind to set.

Returns
TypeDescription
ResourcePolicy.Builder

This builder for chaining.

setKindBytes(ByteString value)

public ResourcePolicy.Builder setKindBytes(ByteString value)

[Output Only] Type of the resource. Always compute#resource_policies for resource policies.

optional string kind = 3292052;

Parameter
NameDescription
valueByteString

The bytes for kind to set.

Returns
TypeDescription
ResourcePolicy.Builder

This builder for chaining.

setName(String value)

public ResourcePolicy.Builder setName(String value)

The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
ResourcePolicy.Builder

This builder for chaining.

setNameBytes(ByteString value)

public ResourcePolicy.Builder setNameBytes(ByteString value)

The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
ResourcePolicy.Builder

This builder for chaining.

setRegion(String value)

public ResourcePolicy.Builder setRegion(String value)

optional string region = 138946292;

Parameter
NameDescription
valueString

The region to set.

Returns
TypeDescription
ResourcePolicy.Builder

This builder for chaining.

setRegionBytes(ByteString value)

public ResourcePolicy.Builder setRegionBytes(ByteString value)

optional string region = 138946292;

Parameter
NameDescription
valueByteString

The bytes for region to set.

Returns
TypeDescription
ResourcePolicy.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public ResourcePolicy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
ResourcePolicy.Builder
Overrides

setResourceStatus(ResourcePolicyResourceStatus value)

public ResourcePolicy.Builder setResourceStatus(ResourcePolicyResourceStatus value)

[Output Only] The system status of the resource policy.

optional .google.cloud.compute.v1.ResourcePolicyResourceStatus resource_status = 249429315;

Parameter
NameDescription
valueResourcePolicyResourceStatus
Returns
TypeDescription
ResourcePolicy.Builder

setResourceStatus(ResourcePolicyResourceStatus.Builder builderForValue)

public ResourcePolicy.Builder setResourceStatus(ResourcePolicyResourceStatus.Builder builderForValue)

[Output Only] The system status of the resource policy.

optional .google.cloud.compute.v1.ResourcePolicyResourceStatus resource_status = 249429315;

Parameter
NameDescription
builderForValueResourcePolicyResourceStatus.Builder
Returns
TypeDescription
ResourcePolicy.Builder
public ResourcePolicy.Builder setSelfLink(String value)

[Output Only] Server-defined fully-qualified URL for this resource.

optional string self_link = 456214797;

Parameter
NameDescription
valueString

The selfLink to set.

Returns
TypeDescription
ResourcePolicy.Builder

This builder for chaining.

setSelfLinkBytes(ByteString value)

public ResourcePolicy.Builder setSelfLinkBytes(ByteString value)

[Output Only] Server-defined fully-qualified URL for this resource.

optional string self_link = 456214797;

Parameter
NameDescription
valueByteString

The bytes for selfLink to set.

Returns
TypeDescription
ResourcePolicy.Builder

This builder for chaining.

setSnapshotSchedulePolicy(ResourcePolicySnapshotSchedulePolicy value)

public ResourcePolicy.Builder setSnapshotSchedulePolicy(ResourcePolicySnapshotSchedulePolicy value)

Resource policy for persistent disks for creating snapshots.

optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy snapshot_schedule_policy = 218131295;

Parameter
NameDescription
valueResourcePolicySnapshotSchedulePolicy
Returns
TypeDescription
ResourcePolicy.Builder

setSnapshotSchedulePolicy(ResourcePolicySnapshotSchedulePolicy.Builder builderForValue)

public ResourcePolicy.Builder setSnapshotSchedulePolicy(ResourcePolicySnapshotSchedulePolicy.Builder builderForValue)

Resource policy for persistent disks for creating snapshots.

optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy snapshot_schedule_policy = 218131295;

Parameter
NameDescription
builderForValueResourcePolicySnapshotSchedulePolicy.Builder
Returns
TypeDescription
ResourcePolicy.Builder

setStatus(String value)

public ResourcePolicy.Builder setStatus(String value)

[Output Only] The status of resource policy creation. Check the Status enum for the list of possible values.

optional string status = 181260274;

Parameter
NameDescription
valueString

The status to set.

Returns
TypeDescription
ResourcePolicy.Builder

This builder for chaining.

setStatusBytes(ByteString value)

public ResourcePolicy.Builder setStatusBytes(ByteString value)

[Output Only] The status of resource policy creation. Check the Status enum for the list of possible values.

optional string status = 181260274;

Parameter
NameDescription
valueByteString

The bytes for status to set.

Returns
TypeDescription
ResourcePolicy.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final ResourcePolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ResourcePolicy.Builder
Overrides