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
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > OSPolicyAssignment.BuilderImplements
OSPolicyAssignmentOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
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];
Name | Description |
values | Iterable<? extends com.google.cloud.osconfig.v1alpha.OSPolicy> |
Type | Description |
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];
Name | Description |
value | OSPolicy |
Type | Description |
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];
Name | Description |
builderForValue | OSPolicy.Builder |
Type | Description |
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];
Name | Description |
index | int |
value | OSPolicy |
Type | Description |
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];
Name | Description |
index | int |
builderForValue | OSPolicy.Builder |
Type | Description |
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];
Type | Description |
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];
Name | Description |
index | int |
Type | Description |
OSPolicy.Builder |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public OSPolicyAssignment.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
OSPolicyAssignment.Builder |
build()
public OSPolicyAssignment build()
Type | Description |
OSPolicyAssignment |
buildPartial()
public OSPolicyAssignment buildPartial()
Type | Description |
OSPolicyAssignment |
clear()
public OSPolicyAssignment.Builder clear()
Type | Description |
OSPolicyAssignment.Builder |
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];
Type | Description |
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];
Type | Description |
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;
Type | Description |
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;
Type | Description |
OSPolicyAssignment.Builder | This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public OSPolicyAssignment.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
OSPolicyAssignment.Builder |
clearInstanceFilter()
public OSPolicyAssignment.Builder clearInstanceFilter()
Required. Filter to select VMs.
.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
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;
Type | Description |
OSPolicyAssignment.Builder | This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public OSPolicyAssignment.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
OSPolicyAssignment.Builder |
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];
Type | Description |
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];
Type | Description |
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];
Type | Description |
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];
Type | Description |
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];
Type | Description |
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];
Type | Description |
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];
Type | Description |
OSPolicyAssignment.Builder | This builder for chaining. |
clone()
public OSPolicyAssignment.Builder clone()
Type | Description |
OSPolicyAssignment.Builder |
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];
Type | Description |
boolean | The baseline. |
getDefaultInstanceForType()
public OSPolicyAssignment getDefaultInstanceForType()
Type | Description |
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];
Type | Description |
boolean | The deleted. |
getDescription()
public String getDescription()
OS policy assignment description. Length of the description is limited to 1024 characters.
string description = 2;
Type | Description |
String | The description. |
getDescriptionBytes()
public ByteString getDescriptionBytes()
OS policy assignment description. Length of the description is limited to 1024 characters.
string description = 2;
Type | Description |
ByteString | The bytes for description. |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
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;
Type | Description |
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;
Type | Description |
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];
Type | Description |
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];
Type | Description |
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];
Type | Description |
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;
Type | Description |
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;
Type | Description |
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];
Name | Description |
index | int |
Type | Description |
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];
Name | Description |
index | int |
Type | Description |
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];
Type | Description |
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];
Type | Description |
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];
Type | Description |
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];
Name | Description |
index | int |
Type | Description |
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];
Type | Description |
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];
Type | Description |
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];
Type | Description |
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];
Type | Description |
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];
Type | Description |
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];
Type | Description |
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];
Type | Description |
ByteString |