- 2.55.0 (latest)
- 2.54.0
- 2.53.0
- 2.51.0
- 2.50.0
- 2.49.0
- 2.48.0
- 2.47.0
- 2.46.0
- 2.45.0
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.39.0
- 2.38.0
- 2.37.0
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.0
- 2.29.0
- 2.26.0
- 2.25.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.6
- 2.4.3
- 2.3.2
public static final class OSPolicy.Builder extends GeneratedMessageV3.Builder<OSPolicy.Builder> implements OSPolicyOrBuilder
An OS policy defines the desired state configuration for a VM.
Protobuf type google.cloud.osconfig.v1.OSPolicy
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > OSPolicy.BuilderImplements
OSPolicyOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
Methods
addAllResourceGroups(Iterable<? extends OSPolicy.ResourceGroup> values)
public OSPolicy.Builder addAllResourceGroups(Iterable<? extends OSPolicy.ResourceGroup> values)
Required. List of resource groups for the policy.
For a particular VM, resource groups are evaluated in the order specified
and the first resource group that is applicable is selected and the rest
are ignored.
If none of the resource groups are applicable for a VM, the VM is
considered to be non-compliant w.r.t this policy. This behavior can be
toggled by the flag allow_no_resource_group_match
repeated .google.cloud.osconfig.v1.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
values | Iterable<? extends com.google.cloud.osconfig.v1.OSPolicy.ResourceGroup> |
Type | Description |
OSPolicy.Builder |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public OSPolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
OSPolicy.Builder |
addResourceGroups(OSPolicy.ResourceGroup value)
public OSPolicy.Builder addResourceGroups(OSPolicy.ResourceGroup value)
Required. List of resource groups for the policy.
For a particular VM, resource groups are evaluated in the order specified
and the first resource group that is applicable is selected and the rest
are ignored.
If none of the resource groups are applicable for a VM, the VM is
considered to be non-compliant w.r.t this policy. This behavior can be
toggled by the flag allow_no_resource_group_match
repeated .google.cloud.osconfig.v1.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
value | OSPolicy.ResourceGroup |
Type | Description |
OSPolicy.Builder |
addResourceGroups(OSPolicy.ResourceGroup.Builder builderForValue)
public OSPolicy.Builder addResourceGroups(OSPolicy.ResourceGroup.Builder builderForValue)
Required. List of resource groups for the policy.
For a particular VM, resource groups are evaluated in the order specified
and the first resource group that is applicable is selected and the rest
are ignored.
If none of the resource groups are applicable for a VM, the VM is
considered to be non-compliant w.r.t this policy. This behavior can be
toggled by the flag allow_no_resource_group_match
repeated .google.cloud.osconfig.v1.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
builderForValue | OSPolicy.ResourceGroup.Builder |
Type | Description |
OSPolicy.Builder |
addResourceGroups(int index, OSPolicy.ResourceGroup value)
public OSPolicy.Builder addResourceGroups(int index, OSPolicy.ResourceGroup value)
Required. List of resource groups for the policy.
For a particular VM, resource groups are evaluated in the order specified
and the first resource group that is applicable is selected and the rest
are ignored.
If none of the resource groups are applicable for a VM, the VM is
considered to be non-compliant w.r.t this policy. This behavior can be
toggled by the flag allow_no_resource_group_match
repeated .google.cloud.osconfig.v1.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
index | int |
value | OSPolicy.ResourceGroup |
Type | Description |
OSPolicy.Builder |
addResourceGroups(int index, OSPolicy.ResourceGroup.Builder builderForValue)
public OSPolicy.Builder addResourceGroups(int index, OSPolicy.ResourceGroup.Builder builderForValue)
Required. List of resource groups for the policy.
For a particular VM, resource groups are evaluated in the order specified
and the first resource group that is applicable is selected and the rest
are ignored.
If none of the resource groups are applicable for a VM, the VM is
considered to be non-compliant w.r.t this policy. This behavior can be
toggled by the flag allow_no_resource_group_match
repeated .google.cloud.osconfig.v1.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
index | int |
builderForValue | OSPolicy.ResourceGroup.Builder |
Type | Description |
OSPolicy.Builder |
addResourceGroupsBuilder()
public OSPolicy.ResourceGroup.Builder addResourceGroupsBuilder()
Required. List of resource groups for the policy.
For a particular VM, resource groups are evaluated in the order specified
and the first resource group that is applicable is selected and the rest
are ignored.
If none of the resource groups are applicable for a VM, the VM is
considered to be non-compliant w.r.t this policy. This behavior can be
toggled by the flag allow_no_resource_group_match
repeated .google.cloud.osconfig.v1.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
OSPolicy.ResourceGroup.Builder |
addResourceGroupsBuilder(int index)
public OSPolicy.ResourceGroup.Builder addResourceGroupsBuilder(int index)
Required. List of resource groups for the policy.
For a particular VM, resource groups are evaluated in the order specified
and the first resource group that is applicable is selected and the rest
are ignored.
If none of the resource groups are applicable for a VM, the VM is
considered to be non-compliant w.r.t this policy. This behavior can be
toggled by the flag allow_no_resource_group_match
repeated .google.cloud.osconfig.v1.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
index | int |
Type | Description |
OSPolicy.ResourceGroup.Builder |
build()
public OSPolicy build()
Type | Description |
OSPolicy |
buildPartial()
public OSPolicy buildPartial()
Type | Description |
OSPolicy |
clear()
public OSPolicy.Builder clear()
Type | Description |
OSPolicy.Builder |
clearAllowNoResourceGroupMatch()
public OSPolicy.Builder clearAllowNoResourceGroupMatch()
This flag determines the OS policy compliance status when none of the
resource groups within the policy are applicable for a VM. Set this value
to true
if the policy needs to be reported as compliant even if the
policy has nothing to validate or enforce.
bool allow_no_resource_group_match = 5;
Type | Description |
OSPolicy.Builder | This builder for chaining. |
clearDescription()
public OSPolicy.Builder clearDescription()
Policy description. Length of the description is limited to 1024 characters.
string description = 2;
Type | Description |
OSPolicy.Builder | This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public OSPolicy.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
OSPolicy.Builder |
clearId()
public OSPolicy.Builder clearId()
Required. The id of the OS policy with the following restrictions:
- Must contain only lowercase letters, numbers, and hyphens.
- Must start with a letter.
- Must be between 1-63 characters.
- Must end with a number or a letter.
- Must be unique within the assignment.
string id = 1 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
OSPolicy.Builder | This builder for chaining. |
clearMode()
public OSPolicy.Builder clearMode()
Required. Policy mode
.google.cloud.osconfig.v1.OSPolicy.Mode mode = 3 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
OSPolicy.Builder | This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public OSPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
OSPolicy.Builder |
clearResourceGroups()
public OSPolicy.Builder clearResourceGroups()
Required. List of resource groups for the policy.
For a particular VM, resource groups are evaluated in the order specified
and the first resource group that is applicable is selected and the rest
are ignored.
If none of the resource groups are applicable for a VM, the VM is
considered to be non-compliant w.r.t this policy. This behavior can be
toggled by the flag allow_no_resource_group_match
repeated .google.cloud.osconfig.v1.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
OSPolicy.Builder |
clone()
public OSPolicy.Builder clone()
Type | Description |
OSPolicy.Builder |
getAllowNoResourceGroupMatch()
public boolean getAllowNoResourceGroupMatch()
This flag determines the OS policy compliance status when none of the
resource groups within the policy are applicable for a VM. Set this value
to true
if the policy needs to be reported as compliant even if the
policy has nothing to validate or enforce.
bool allow_no_resource_group_match = 5;
Type | Description |
boolean | The allowNoResourceGroupMatch. |
getDefaultInstanceForType()
public OSPolicy getDefaultInstanceForType()
Type | Description |
OSPolicy |
getDescription()
public String getDescription()
Policy description. Length of the description is limited to 1024 characters.
string description = 2;
Type | Description |
String | The description. |
getDescriptionBytes()
public ByteString getDescriptionBytes()
Policy 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 |
getId()
public String getId()
Required. The id of the OS policy with the following restrictions:
- Must contain only lowercase letters, numbers, and hyphens.
- Must start with a letter.
- Must be between 1-63 characters.
- Must end with a number or a letter.
- Must be unique within the assignment.
string id = 1 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
String | The id. |
getIdBytes()
public ByteString getIdBytes()
Required. The id of the OS policy with the following restrictions:
- Must contain only lowercase letters, numbers, and hyphens.
- Must start with a letter.
- Must be between 1-63 characters.
- Must end with a number or a letter.
- Must be unique within the assignment.
string id = 1 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
ByteString | The bytes for id. |
getMode()
public OSPolicy.Mode getMode()
Required. Policy mode
.google.cloud.osconfig.v1.OSPolicy.Mode mode = 3 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
OSPolicy.Mode | The mode. |
getModeValue()
public int getModeValue()
Required. Policy mode
.google.cloud.osconfig.v1.OSPolicy.Mode mode = 3 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
int | The enum numeric value on the wire for mode. |
getResourceGroups(int index)
public OSPolicy.ResourceGroup getResourceGroups(int index)
Required. List of resource groups for the policy.
For a particular VM, resource groups are evaluated in the order specified
and the first resource group that is applicable is selected and the rest
are ignored.
If none of the resource groups are applicable for a VM, the VM is
considered to be non-compliant w.r.t this policy. This behavior can be
toggled by the flag allow_no_resource_group_match
repeated .google.cloud.osconfig.v1.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
index | int |
Type | Description |
OSPolicy.ResourceGroup |
getResourceGroupsBuilder(int index)
public OSPolicy.ResourceGroup.Builder getResourceGroupsBuilder(int index)
Required. List of resource groups for the policy.
For a particular VM, resource groups are evaluated in the order specified
and the first resource group that is applicable is selected and the rest
are ignored.
If none of the resource groups are applicable for a VM, the VM is
considered to be non-compliant w.r.t this policy. This behavior can be
toggled by the flag allow_no_resource_group_match
repeated .google.cloud.osconfig.v1.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
index | int |
Type | Description |
OSPolicy.ResourceGroup.Builder |
getResourceGroupsBuilderList()
public List<OSPolicy.ResourceGroup.Builder> getResourceGroupsBuilderList()
Required. List of resource groups for the policy.
For a particular VM, resource groups are evaluated in the order specified
and the first resource group that is applicable is selected and the rest
are ignored.
If none of the resource groups are applicable for a VM, the VM is
considered to be non-compliant w.r.t this policy. This behavior can be
toggled by the flag allow_no_resource_group_match
repeated .google.cloud.osconfig.v1.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
List<Builder> |
getResourceGroupsCount()
public int getResourceGroupsCount()
Required. List of resource groups for the policy.
For a particular VM, resource groups are evaluated in the order specified
and the first resource group that is applicable is selected and the rest
are ignored.
If none of the resource groups are applicable for a VM, the VM is
considered to be non-compliant w.r.t this policy. This behavior can be
toggled by the flag allow_no_resource_group_match
repeated .google.cloud.osconfig.v1.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
int |
getResourceGroupsList()
public List<OSPolicy.ResourceGroup> getResourceGroupsList()
Required. List of resource groups for the policy.
For a particular VM, resource groups are evaluated in the order specified
and the first resource group that is applicable is selected and the rest
are ignored.
If none of the resource groups are applicable for a VM, the VM is
considered to be non-compliant w.r.t this policy. This behavior can be
toggled by the flag allow_no_resource_group_match
repeated .google.cloud.osconfig.v1.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
List<ResourceGroup> |
getResourceGroupsOrBuilder(int index)
public OSPolicy.ResourceGroupOrBuilder getResourceGroupsOrBuilder(int index)
Required. List of resource groups for the policy.
For a particular VM, resource groups are evaluated in the order specified
and the first resource group that is applicable is selected and the rest
are ignored.
If none of the resource groups are applicable for a VM, the VM is
considered to be non-compliant w.r.t this policy. This behavior can be
toggled by the flag allow_no_resource_group_match
repeated .google.cloud.osconfig.v1.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
index | int |
Type | Description |
OSPolicy.ResourceGroupOrBuilder |
getResourceGroupsOrBuilderList()
public List<? extends OSPolicy.ResourceGroupOrBuilder> getResourceGroupsOrBuilderList()
Required. List of resource groups for the policy.
For a particular VM, resource groups are evaluated in the order specified
and the first resource group that is applicable is selected and the rest
are ignored.
If none of the resource groups are applicable for a VM, the VM is
considered to be non-compliant w.r.t this policy. This behavior can be
toggled by the flag allow_no_resource_group_match
repeated .google.cloud.osconfig.v1.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
List<? extends com.google.cloud.osconfig.v1.OSPolicy.ResourceGroupOrBuilder> |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeFrom(OSPolicy other)
public OSPolicy.Builder mergeFrom(OSPolicy other)
Name | Description |
other | OSPolicy |
Type | Description |
OSPolicy.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public OSPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
OSPolicy.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public OSPolicy.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
OSPolicy.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final OSPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
OSPolicy.Builder |
removeResourceGroups(int index)
public OSPolicy.Builder removeResourceGroups(int index)
Required. List of resource groups for the policy.
For a particular VM, resource groups are evaluated in the order specified
and the first resource group that is applicable is selected and the rest
are ignored.
If none of the resource groups are applicable for a VM, the VM is
considered to be non-compliant w.r.t this policy. This behavior can be
toggled by the flag allow_no_resource_group_match
repeated .google.cloud.osconfig.v1.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
index | int |
Type | Description |
OSPolicy.Builder |
setAllowNoResourceGroupMatch(boolean value)
public OSPolicy.Builder setAllowNoResourceGroupMatch(boolean value)
This flag determines the OS policy compliance status when none of the
resource groups within the policy are applicable for a VM. Set this value
to true
if the policy needs to be reported as compliant even if the
policy has nothing to validate or enforce.
bool allow_no_resource_group_match = 5;
Name | Description |
value | boolean The allowNoResourceGroupMatch to set. |
Type | Description |
OSPolicy.Builder | This builder for chaining. |
setDescription(String value)
public OSPolicy.Builder setDescription(String value)
Policy description. Length of the description is limited to 1024 characters.
string description = 2;
Name | Description |
value | String The description to set. |
Type | Description |
OSPolicy.Builder | This builder for chaining. |
setDescriptionBytes(ByteString value)
public OSPolicy.Builder setDescriptionBytes(ByteString value)
Policy description. Length of the description is limited to 1024 characters.
string description = 2;
Name | Description |
value | ByteString The bytes for description to set. |
Type | Description |
OSPolicy.Builder | This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public OSPolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
OSPolicy.Builder |
setId(String value)
public OSPolicy.Builder setId(String value)
Required. The id of the OS policy with the following restrictions:
- Must contain only lowercase letters, numbers, and hyphens.
- Must start with a letter.
- Must be between 1-63 characters.
- Must end with a number or a letter.
- Must be unique within the assignment.
string id = 1 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
value | String The id to set. |
Type | Description |
OSPolicy.Builder | This builder for chaining. |
setIdBytes(ByteString value)
public OSPolicy.Builder setIdBytes(ByteString value)
Required. The id of the OS policy with the following restrictions:
- Must contain only lowercase letters, numbers, and hyphens.
- Must start with a letter.
- Must be between 1-63 characters.
- Must end with a number or a letter.
- Must be unique within the assignment.
string id = 1 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
value | ByteString The bytes for id to set. |
Type | Description |
OSPolicy.Builder | This builder for chaining. |
setMode(OSPolicy.Mode value)
public OSPolicy.Builder setMode(OSPolicy.Mode value)
Required. Policy mode
.google.cloud.osconfig.v1.OSPolicy.Mode mode = 3 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
value | OSPolicy.Mode The mode to set. |
Type | Description |
OSPolicy.Builder | This builder for chaining. |
setModeValue(int value)
public OSPolicy.Builder setModeValue(int value)
Required. Policy mode
.google.cloud.osconfig.v1.OSPolicy.Mode mode = 3 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
value | int The enum numeric value on the wire for mode to set. |
Type | Description |
OSPolicy.Builder | This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public OSPolicy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
OSPolicy.Builder |
setResourceGroups(int index, OSPolicy.ResourceGroup value)
public OSPolicy.Builder setResourceGroups(int index, OSPolicy.ResourceGroup value)
Required. List of resource groups for the policy.
For a particular VM, resource groups are evaluated in the order specified
and the first resource group that is applicable is selected and the rest
are ignored.
If none of the resource groups are applicable for a VM, the VM is
considered to be non-compliant w.r.t this policy. This behavior can be
toggled by the flag allow_no_resource_group_match
repeated .google.cloud.osconfig.v1.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
index | int |
value | OSPolicy.ResourceGroup |
Type | Description |
OSPolicy.Builder |
setResourceGroups(int index, OSPolicy.ResourceGroup.Builder builderForValue)
public OSPolicy.Builder setResourceGroups(int index, OSPolicy.ResourceGroup.Builder builderForValue)
Required. List of resource groups for the policy.
For a particular VM, resource groups are evaluated in the order specified
and the first resource group that is applicable is selected and the rest
are ignored.
If none of the resource groups are applicable for a VM, the VM is
considered to be non-compliant w.r.t this policy. This behavior can be
toggled by the flag allow_no_resource_group_match
repeated .google.cloud.osconfig.v1.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
index | int |
builderForValue | OSPolicy.ResourceGroup.Builder |
Type | Description |
OSPolicy.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final OSPolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
OSPolicy.Builder |