Class OSPolicyAssignment.Builder (2.7.0)

public static final class OSPolicyAssignment.Builder extends GeneratedMessageV3.Builder<OSPolicyAssignment.Builder> implements OSPolicyAssignmentOrBuilder

OS policy assignment is an API resource that is used to apply a set of OS policies to a dynamically targeted group of Compute Engine VM instances. An OS policy is used to define the desired state configuration for a Compute Engine VM instance through a set of configuration resources that provide capabilities such as installing or removing software packages, or executing a script. For more information, see OS policy and OS policy assignment.

Protobuf type google.cloud.osconfig.v1alpha.OSPolicyAssignment

Static Methods

getDescriptor()

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

Methods

addAllOsPolicies(Iterable<? extends OSPolicy> values)

public OSPolicyAssignment.Builder addAllOsPolicies(Iterable<? extends OSPolicy> values)

Required. List of OS policies to be applied to the VMs.

repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.osconfig.v1alpha.OSPolicy>
Returns
TypeDescription
OSPolicyAssignment.Builder

addOsPolicies(OSPolicy value)

public OSPolicyAssignment.Builder addOsPolicies(OSPolicy value)

Required. List of OS policies to be applied to the VMs.

repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueOSPolicy
Returns
TypeDescription
OSPolicyAssignment.Builder

addOsPolicies(OSPolicy.Builder builderForValue)

public OSPolicyAssignment.Builder addOsPolicies(OSPolicy.Builder builderForValue)

Required. List of OS policies to be applied to the VMs.

repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
builderForValueOSPolicy.Builder
Returns
TypeDescription
OSPolicyAssignment.Builder

addOsPolicies(int index, OSPolicy value)

public OSPolicyAssignment.Builder addOsPolicies(int index, OSPolicy value)

Required. List of OS policies to be applied to the VMs.

repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED];

Parameters
NameDescription
indexint
valueOSPolicy
Returns
TypeDescription
OSPolicyAssignment.Builder

addOsPolicies(int index, OSPolicy.Builder builderForValue)

public OSPolicyAssignment.Builder addOsPolicies(int index, OSPolicy.Builder builderForValue)

Required. List of OS policies to be applied to the VMs.

repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED];

Parameters
NameDescription
indexint
builderForValueOSPolicy.Builder
Returns
TypeDescription
OSPolicyAssignment.Builder

addOsPoliciesBuilder()

public OSPolicy.Builder addOsPoliciesBuilder()

Required. List of OS policies to be applied to the VMs.

repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
OSPolicy.Builder

addOsPoliciesBuilder(int index)

public OSPolicy.Builder addOsPoliciesBuilder(int index)

Required. List of OS policies to be applied to the VMs.

repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
indexint
Returns
TypeDescription
OSPolicy.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public OSPolicyAssignment build()
Returns
TypeDescription
OSPolicyAssignment

buildPartial()

public OSPolicyAssignment buildPartial()
Returns
TypeDescription
OSPolicyAssignment

clear()

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

clearBaseline()

public OSPolicyAssignment.Builder clearBaseline()

Output only. Indicates that this revision has been successfully rolled out in this zone and new VMs will be assigned OS policies from this revision. For a given OS policy assignment, there is only one revision with a value of true for this field.

bool baseline = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
OSPolicyAssignment.Builder

This builder for chaining.

clearDeleted()

public OSPolicyAssignment.Builder clearDeleted()

Output only. Indicates that this revision deletes the OS policy assignment.

bool deleted = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
OSPolicyAssignment.Builder

This builder for chaining.

clearDescription()

public OSPolicyAssignment.Builder clearDescription()

OS policy assignment description. Length of the description is limited to 1024 characters.

string description = 2;

Returns
TypeDescription
OSPolicyAssignment.Builder

This builder for chaining.

clearEtag()

public OSPolicyAssignment.Builder clearEtag()

The etag for this OS policy assignment. If this is provided on update, it must match the server's etag.

string etag = 8;

Returns
TypeDescription
OSPolicyAssignment.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearInstanceFilter()

public OSPolicyAssignment.Builder clearInstanceFilter()

Required. Filter to select VMs.

.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
OSPolicyAssignment.Builder

clearName()

public OSPolicyAssignment.Builder clearName()

Resource name. Format: projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id} This field is ignored when you create an OS policy assignment.

string name = 1;

Returns
TypeDescription
OSPolicyAssignment.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearOsPolicies()

public OSPolicyAssignment.Builder clearOsPolicies()

Required. List of OS policies to be applied to the VMs.

repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
OSPolicyAssignment.Builder

clearReconciling()

public OSPolicyAssignment.Builder clearReconciling()

Output only. Indicates that reconciliation is in progress for the revision. This value is true when the rollout_state is one of:

  • IN_PROGRESS
  • CANCELLING

bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
OSPolicyAssignment.Builder

This builder for chaining.

clearRevisionCreateTime()

public OSPolicyAssignment.Builder clearRevisionCreateTime()

Output only. The timestamp that the revision was created.

.google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
OSPolicyAssignment.Builder

clearRevisionId()

public OSPolicyAssignment.Builder clearRevisionId()

Output only. The assignment revision ID A new revision is committed whenever a rollout is triggered for a OS policy assignment

string revision_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
OSPolicyAssignment.Builder

This builder for chaining.

clearRollout()

public OSPolicyAssignment.Builder clearRollout()

Required. Rollout to deploy the OS policy assignment. A rollout is triggered in the following situations: 1) OSPolicyAssignment is created. 2) OSPolicyAssignment is updated and the update contains changes to one of the following fields:

  • instance_filter
  • os_policies 3) OSPolicyAssignment is deleted.

.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
OSPolicyAssignment.Builder

clearRolloutState()

public OSPolicyAssignment.Builder clearRolloutState()

Output only. OS policy assignment rollout state

.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState rollout_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
OSPolicyAssignment.Builder

This builder for chaining.

clearUid()

public OSPolicyAssignment.Builder clearUid()

Output only. Server generated unique id for the OS policy assignment resource.

string uid = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
OSPolicyAssignment.Builder

This builder for chaining.

clone()

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

getBaseline()

public boolean getBaseline()

Output only. Indicates that this revision has been successfully rolled out in this zone and new VMs will be assigned OS policies from this revision. For a given OS policy assignment, there is only one revision with a value of true for this field.

bool baseline = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

The baseline.

getDefaultInstanceForType()

public OSPolicyAssignment getDefaultInstanceForType()
Returns
TypeDescription
OSPolicyAssignment

getDeleted()

public boolean getDeleted()

Output only. Indicates that this revision deletes the OS policy assignment.

bool deleted = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

The deleted.

getDescription()

public String getDescription()

OS policy assignment description. Length of the description is limited to 1024 characters.

string description = 2;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

OS policy assignment description. Length of the description is limited to 1024 characters.

string description = 2;

Returns
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEtag()

public String getEtag()

The etag for this OS policy assignment. If this is provided on update, it must match the server's etag.

string etag = 8;

Returns
TypeDescription
String

The etag.

getEtagBytes()

public ByteString getEtagBytes()

The etag for this OS policy assignment. If this is provided on update, it must match the server's etag.

string etag = 8;

Returns
TypeDescription
ByteString

The bytes for etag.

getInstanceFilter()

public OSPolicyAssignment.InstanceFilter getInstanceFilter()

Required. Filter to select VMs.

.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
OSPolicyAssignment.InstanceFilter

The instanceFilter.

getInstanceFilterBuilder()

public OSPolicyAssignment.InstanceFilter.Builder getInstanceFilterBuilder()

Required. Filter to select VMs.

.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
OSPolicyAssignment.InstanceFilter.Builder

getInstanceFilterOrBuilder()

public OSPolicyAssignment.InstanceFilterOrBuilder getInstanceFilterOrBuilder()

Required. Filter to select VMs.

.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
OSPolicyAssignment.InstanceFilterOrBuilder

getName()

public String getName()

Resource name. Format: projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id} This field is ignored when you create an OS policy assignment.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Resource name. Format: projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id} This field is ignored when you create an OS policy assignment.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getOsPolicies(int index)

public OSPolicy getOsPolicies(int index)

Required. List of OS policies to be applied to the VMs.

repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
indexint
Returns
TypeDescription
OSPolicy

getOsPoliciesBuilder(int index)

public OSPolicy.Builder getOsPoliciesBuilder(int index)

Required. List of OS policies to be applied to the VMs.

repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
indexint
Returns
TypeDescription
OSPolicy.Builder

getOsPoliciesBuilderList()

public List<OSPolicy.Builder> getOsPoliciesBuilderList()

Required. List of OS policies to be applied to the VMs.

repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
List<Builder>

getOsPoliciesCount()

public int getOsPoliciesCount()

Required. List of OS policies to be applied to the VMs.

repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
int

getOsPoliciesList()

public List<OSPolicy> getOsPoliciesList()

Required. List of OS policies to be applied to the VMs.

repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
List<OSPolicy>

getOsPoliciesOrBuilder(int index)

public OSPolicyOrBuilder getOsPoliciesOrBuilder(int index)

Required. List of OS policies to be applied to the VMs.

repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
indexint
Returns
TypeDescription
OSPolicyOrBuilder

getOsPoliciesOrBuilderList()

public List<? extends OSPolicyOrBuilder> getOsPoliciesOrBuilderList()

Required. List of OS policies to be applied to the VMs.

repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
List<? extends com.google.cloud.osconfig.v1alpha.OSPolicyOrBuilder>

getReconciling()

public boolean getReconciling()

Output only. Indicates that reconciliation is in progress for the revision. This value is true when the rollout_state is one of:

  • IN_PROGRESS
  • CANCELLING

bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

The reconciling.

getRevisionCreateTime()

public Timestamp getRevisionCreateTime()

Output only. The timestamp that the revision was created.

.google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The revisionCreateTime.

getRevisionCreateTimeBuilder()

public Timestamp.Builder getRevisionCreateTimeBuilder()

Output only. The timestamp that the revision was created.

.google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Builder

getRevisionCreateTimeOrBuilder()

public TimestampOrBuilder getRevisionCreateTimeOrBuilder()

Output only. The timestamp that the revision was created.

.google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getRevisionId()

public String getRevisionId()

Output only. The assignment revision ID A new revision is committed whenever a rollout is triggered for a OS policy assignment

string revision_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The revisionId.

getRevisionIdBytes()

public ByteString getRevisionIdBytes()

Output only. The assignment revision ID A new revision is committed whenever a rollout is triggered for a OS policy assignment

string revision_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for revisionId.

getRollout()

public OSPolicyAssignment.Rollout getRollout()

Required. Rollout to deploy the OS policy assignment. A rollout is triggered in the following situations: 1) OSPolicyAssignment is created. 2) OSPolicyAssignment is updated and the update contains changes to one of the following fields:

  • instance_filter
  • os_policies 3) OSPolicyAssignment is deleted.

.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
OSPolicyAssignment.Rollout

The rollout.

getRolloutBuilder()

public OSPolicyAssignment.Rollout.Builder getRolloutBuilder()

Required. Rollout to deploy the OS policy assignment. A rollout is triggered in the following situations: 1) OSPolicyAssignment is created. 2) OSPolicyAssignment is updated and the update contains changes to one of the following fields:

  • instance_filter
  • os_policies 3) OSPolicyAssignment is deleted.

.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
OSPolicyAssignment.Rollout.Builder

getRolloutOrBuilder()

public OSPolicyAssignment.RolloutOrBuilder getRolloutOrBuilder()

Required. Rollout to deploy the OS policy assignment. A rollout is triggered in the following situations: 1) OSPolicyAssignment is created. 2) OSPolicyAssignment is updated and the update contains changes to one of the following fields:

  • instance_filter
  • os_policies 3) OSPolicyAssignment is deleted.

.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
OSPolicyAssignment.RolloutOrBuilder

getRolloutState()

public OSPolicyAssignment.RolloutState getRolloutState()

Output only. OS policy assignment rollout state

.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState rollout_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
OSPolicyAssignment.RolloutState

The rolloutState.

getRolloutStateValue()

public int getRolloutStateValue()

Output only. OS policy assignment rollout state

.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState rollout_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

The enum numeric value on the wire for rolloutState.

getUid()

public String getUid()

Output only. Server generated unique id for the OS policy assignment resource.

string uid = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The uid.

getUidBytes()

public ByteString getUidBytes()

Output only. Server generated unique id for the OS policy assignment resource.

string uid = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for uid.

hasInstanceFilter()

public boolean hasInstanceFilter()

Required. Filter to select VMs.

.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
boolean

Whether the instanceFilter field is set.

hasRevisionCreateTime()

public boolean hasRevisionCreateTime()

Output only. The timestamp that the revision was created.

.google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the revisionCreateTime field is set.

hasRollout()

public boolean hasRollout()

Required. Rollout to deploy the OS policy assignment. A rollout is triggered in the following situations: 1) OSPolicyAssignment is created. 2) OSPolicyAssignment is updated and the update contains changes to one of the following fields:

  • instance_filter
  • os_policies 3) OSPolicyAssignment is deleted.

.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
boolean

Whether the rollout field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(OSPolicyAssignment other)

public OSPolicyAssignment.Builder mergeFrom(OSPolicyAssignment other)
Parameter
NameDescription
otherOSPolicyAssignment
Returns
TypeDescription
OSPolicyAssignment.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeInstanceFilter(OSPolicyAssignment.InstanceFilter value)

public OSPolicyAssignment.Builder mergeInstanceFilter(OSPolicyAssignment.InstanceFilter value)

Required. Filter to select VMs.

.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueOSPolicyAssignment.InstanceFilter
Returns
TypeDescription
OSPolicyAssignment.Builder

mergeRevisionCreateTime(Timestamp value)

public OSPolicyAssignment.Builder mergeRevisionCreateTime(Timestamp value)

Output only. The timestamp that the revision was created.

.google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
OSPolicyAssignment.Builder

mergeRollout(OSPolicyAssignment.Rollout value)

public OSPolicyAssignment.Builder mergeRollout(OSPolicyAssignment.Rollout value)

Required. Rollout to deploy the OS policy assignment. A rollout is triggered in the following situations: 1) OSPolicyAssignment is created. 2) OSPolicyAssignment is updated and the update contains changes to one of the following fields:

  • instance_filter
  • os_policies 3) OSPolicyAssignment is deleted.

.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueOSPolicyAssignment.Rollout
Returns
TypeDescription
OSPolicyAssignment.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeOsPolicies(int index)

public OSPolicyAssignment.Builder removeOsPolicies(int index)

Required. List of OS policies to be applied to the VMs.

repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
indexint
Returns
TypeDescription
OSPolicyAssignment.Builder

setBaseline(boolean value)

public OSPolicyAssignment.Builder setBaseline(boolean value)

Output only. Indicates that this revision has been successfully rolled out in this zone and new VMs will be assigned OS policies from this revision. For a given OS policy assignment, there is only one revision with a value of true for this field.

bool baseline = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueboolean

The baseline to set.

Returns
TypeDescription
OSPolicyAssignment.Builder

This builder for chaining.

setDeleted(boolean value)

public OSPolicyAssignment.Builder setDeleted(boolean value)

Output only. Indicates that this revision deletes the OS policy assignment.

bool deleted = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueboolean

The deleted to set.

Returns
TypeDescription
OSPolicyAssignment.Builder

This builder for chaining.

setDescription(String value)

public OSPolicyAssignment.Builder setDescription(String value)

OS policy assignment description. Length of the description is limited to 1024 characters.

string description = 2;

Parameter
NameDescription
valueString

The description to set.

Returns
TypeDescription
OSPolicyAssignment.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public OSPolicyAssignment.Builder setDescriptionBytes(ByteString value)

OS policy assignment description. Length of the description is limited to 1024 characters.

string description = 2;

Parameter
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
OSPolicyAssignment.Builder

This builder for chaining.

setEtag(String value)

public OSPolicyAssignment.Builder setEtag(String value)

The etag for this OS policy assignment. If this is provided on update, it must match the server's etag.

string etag = 8;

Parameter
NameDescription
valueString

The etag to set.

Returns
TypeDescription
OSPolicyAssignment.Builder

This builder for chaining.

setEtagBytes(ByteString value)

public OSPolicyAssignment.Builder setEtagBytes(ByteString value)

The etag for this OS policy assignment. If this is provided on update, it must match the server's etag.

string etag = 8;

Parameter
NameDescription
valueByteString

The bytes for etag to set.

Returns
TypeDescription
OSPolicyAssignment.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setInstanceFilter(OSPolicyAssignment.InstanceFilter value)

public OSPolicyAssignment.Builder setInstanceFilter(OSPolicyAssignment.InstanceFilter value)

Required. Filter to select VMs.

.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueOSPolicyAssignment.InstanceFilter
Returns
TypeDescription
OSPolicyAssignment.Builder

setInstanceFilter(OSPolicyAssignment.InstanceFilter.Builder builderForValue)

public OSPolicyAssignment.Builder setInstanceFilter(OSPolicyAssignment.InstanceFilter.Builder builderForValue)

Required. Filter to select VMs.

.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
builderForValueOSPolicyAssignment.InstanceFilter.Builder
Returns
TypeDescription
OSPolicyAssignment.Builder

setName(String value)

public OSPolicyAssignment.Builder setName(String value)

Resource name. Format: projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id} This field is ignored when you create an OS policy assignment.

string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
OSPolicyAssignment.Builder

This builder for chaining.

setNameBytes(ByteString value)

public OSPolicyAssignment.Builder setNameBytes(ByteString value)

Resource name. Format: projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id} This field is ignored when you create an OS policy assignment.

string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
OSPolicyAssignment.Builder

This builder for chaining.

setOsPolicies(int index, OSPolicy value)

public OSPolicyAssignment.Builder setOsPolicies(int index, OSPolicy value)

Required. List of OS policies to be applied to the VMs.

repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED];

Parameters
NameDescription
indexint
valueOSPolicy
Returns
TypeDescription
OSPolicyAssignment.Builder

setOsPolicies(int index, OSPolicy.Builder builderForValue)

public OSPolicyAssignment.Builder setOsPolicies(int index, OSPolicy.Builder builderForValue)

Required. List of OS policies to be applied to the VMs.

repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED];

Parameters
NameDescription
indexint
builderForValueOSPolicy.Builder
Returns
TypeDescription
OSPolicyAssignment.Builder

setReconciling(boolean value)

public OSPolicyAssignment.Builder setReconciling(boolean value)

Output only. Indicates that reconciliation is in progress for the revision. This value is true when the rollout_state is one of:

  • IN_PROGRESS
  • CANCELLING

bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueboolean

The reconciling to set.

Returns
TypeDescription
OSPolicyAssignment.Builder

This builder for chaining.

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

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

setRevisionCreateTime(Timestamp value)

public OSPolicyAssignment.Builder setRevisionCreateTime(Timestamp value)

Output only. The timestamp that the revision was created.

.google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
OSPolicyAssignment.Builder

setRevisionCreateTime(Timestamp.Builder builderForValue)

public OSPolicyAssignment.Builder setRevisionCreateTime(Timestamp.Builder builderForValue)

Output only. The timestamp that the revision was created.

.google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
OSPolicyAssignment.Builder

setRevisionId(String value)

public OSPolicyAssignment.Builder setRevisionId(String value)

Output only. The assignment revision ID A new revision is committed whenever a rollout is triggered for a OS policy assignment

string revision_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The revisionId to set.

Returns
TypeDescription
OSPolicyAssignment.Builder

This builder for chaining.

setRevisionIdBytes(ByteString value)

public OSPolicyAssignment.Builder setRevisionIdBytes(ByteString value)

Output only. The assignment revision ID A new revision is committed whenever a rollout is triggered for a OS policy assignment

string revision_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for revisionId to set.

Returns
TypeDescription
OSPolicyAssignment.Builder

This builder for chaining.

setRollout(OSPolicyAssignment.Rollout value)

public OSPolicyAssignment.Builder setRollout(OSPolicyAssignment.Rollout value)

Required. Rollout to deploy the OS policy assignment. A rollout is triggered in the following situations: 1) OSPolicyAssignment is created. 2) OSPolicyAssignment is updated and the update contains changes to one of the following fields:

  • instance_filter
  • os_policies 3) OSPolicyAssignment is deleted.

.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueOSPolicyAssignment.Rollout
Returns
TypeDescription
OSPolicyAssignment.Builder

setRollout(OSPolicyAssignment.Rollout.Builder builderForValue)

public OSPolicyAssignment.Builder setRollout(OSPolicyAssignment.Rollout.Builder builderForValue)

Required. Rollout to deploy the OS policy assignment. A rollout is triggered in the following situations: 1) OSPolicyAssignment is created. 2) OSPolicyAssignment is updated and the update contains changes to one of the following fields:

  • instance_filter
  • os_policies 3) OSPolicyAssignment is deleted.

.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
builderForValueOSPolicyAssignment.Rollout.Builder
Returns
TypeDescription
OSPolicyAssignment.Builder

setRolloutState(OSPolicyAssignment.RolloutState value)

public OSPolicyAssignment.Builder setRolloutState(OSPolicyAssignment.RolloutState value)

Output only. OS policy assignment rollout state

.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState rollout_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueOSPolicyAssignment.RolloutState

The rolloutState to set.

Returns
TypeDescription
OSPolicyAssignment.Builder

This builder for chaining.

setRolloutStateValue(int value)

public OSPolicyAssignment.Builder setRolloutStateValue(int value)

Output only. OS policy assignment rollout state

.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState rollout_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueint

The enum numeric value on the wire for rolloutState to set.

Returns
TypeDescription
OSPolicyAssignment.Builder

This builder for chaining.

setUid(String value)

public OSPolicyAssignment.Builder setUid(String value)

Output only. Server generated unique id for the OS policy assignment resource.

string uid = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The uid to set.

Returns
TypeDescription
OSPolicyAssignment.Builder

This builder for chaining.

setUidBytes(ByteString value)

public OSPolicyAssignment.Builder setUidBytes(ByteString value)

Output only. Server generated unique id for the OS policy assignment resource.

string uid = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for uid to set.

Returns
TypeDescription
OSPolicyAssignment.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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