public final class OSPolicy extends GeneratedMessageV3 implements OSPolicyOrBuilder
An OS policy defines the desired state configuration for a VM.
Protobuf type google.cloud.osconfig.v1.OSPolicy
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
ALLOW_NO_RESOURCE_GROUP_MATCH_FIELD_NUMBER
public static final int ALLOW_NO_RESOURCE_GROUP_MATCH_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
DESCRIPTION_FIELD_NUMBER
public static final int DESCRIPTION_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
ID_FIELD_NUMBER
public static final int ID_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
MODE_FIELD_NUMBER
public static final int MODE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
RESOURCE_GROUPS_FIELD_NUMBER
public static final int RESOURCE_GROUPS_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static OSPolicy getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static OSPolicy.Builder newBuilder()
newBuilder(OSPolicy prototype)
public static OSPolicy.Builder newBuilder(OSPolicy prototype)
Parameter |
Name |
Description |
prototype |
OSPolicy
|
public static OSPolicy parseDelimitedFrom(InputStream input)
public static OSPolicy parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static OSPolicy parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static OSPolicy parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static OSPolicy parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static OSPolicy parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static OSPolicy parseFrom(CodedInputStream input)
public static OSPolicy parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static OSPolicy parseFrom(InputStream input)
public static OSPolicy parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static OSPolicy parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static OSPolicy parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<OSPolicy> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
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;
Returns |
Type |
Description |
boolean |
The allowNoResourceGroupMatch.
|
getDefaultInstanceForType()
public OSPolicy getDefaultInstanceForType()
getDescription()
public String getDescription()
Policy description.
Length of the description is limited to 1024 characters.
string description = 2;
Returns |
Type |
Description |
String |
The description.
|
getDescriptionBytes()
public ByteString getDescriptionBytes()
Policy description.
Length of the description is limited to 1024 characters.
string description = 2;
Returns |
Type |
Description |
ByteString |
The bytes for description.
|
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];
Returns |
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];
Returns |
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];
getModeValue()
public int getModeValue()
Required. Policy mode
.google.cloud.osconfig.v1.OSPolicy.Mode mode = 3 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
int |
The enum numeric value on the wire for mode.
|
getParserForType()
public Parser<OSPolicy> getParserForType()
Overrides
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];
Parameter |
Name |
Description |
index |
int
|
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];
Returns |
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];
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];
Parameter |
Name |
Description |
index |
int
|
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];
Returns |
Type |
Description |
List<? extends com.google.cloud.osconfig.v1.OSPolicy.ResourceGroupOrBuilder> |
|
getSerializedSize()
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
hashCode()
Returns |
Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public OSPolicy.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected OSPolicy.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
toBuilder()
public OSPolicy.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides