Class OSPolicy.ResourceGroup (2.44.0)

public static final class OSPolicy.ResourceGroup extends GeneratedMessageV3 implements OSPolicy.ResourceGroupOrBuilder

Resource groups provide a mechanism to group OS policy resources.

Resource groups enable OS policy authors to create a single OS policy to be applied to VMs running different operating Systems.

When the OS policy is applied to a target VM, the appropriate resource group within the OS policy is selected based on the OSFilter specified within the resource group.

Protobuf type google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup

Static Fields

INVENTORY_FILTERS_FIELD_NUMBER

public static final int INVENTORY_FILTERS_FIELD_NUMBER
Field Value
Type Description
int

OS_FILTER_FIELD_NUMBER

public static final int OS_FILTER_FIELD_NUMBER
Field Value
Type Description
int

RESOURCES_FIELD_NUMBER

public static final int RESOURCES_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static OSPolicy.ResourceGroup getDefaultInstance()
Returns
Type Description
OSPolicy.ResourceGroup

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static OSPolicy.ResourceGroup.Builder newBuilder()
Returns
Type Description
OSPolicy.ResourceGroup.Builder

newBuilder(OSPolicy.ResourceGroup prototype)

public static OSPolicy.ResourceGroup.Builder newBuilder(OSPolicy.ResourceGroup prototype)
Parameter
Name Description
prototype OSPolicy.ResourceGroup
Returns
Type Description
OSPolicy.ResourceGroup.Builder

parseDelimitedFrom(InputStream input)

public static OSPolicy.ResourceGroup parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
OSPolicy.ResourceGroup
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OSPolicy.ResourceGroup parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OSPolicy.ResourceGroup
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static OSPolicy.ResourceGroup parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
OSPolicy.ResourceGroup
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static OSPolicy.ResourceGroup parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OSPolicy.ResourceGroup
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static OSPolicy.ResourceGroup parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
OSPolicy.ResourceGroup
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static OSPolicy.ResourceGroup parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OSPolicy.ResourceGroup
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static OSPolicy.ResourceGroup parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
OSPolicy.ResourceGroup
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static OSPolicy.ResourceGroup parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OSPolicy.ResourceGroup
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static OSPolicy.ResourceGroup parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
OSPolicy.ResourceGroup
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OSPolicy.ResourceGroup parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OSPolicy.ResourceGroup
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static OSPolicy.ResourceGroup parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
OSPolicy.ResourceGroup
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static OSPolicy.ResourceGroup parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OSPolicy.ResourceGroup
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<OSPolicy.ResourceGroup> parser()
Returns
Type Description
Parser<ResourceGroup>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public OSPolicy.ResourceGroup getDefaultInstanceForType()
Returns
Type Description
OSPolicy.ResourceGroup

getInventoryFilters(int index)

public OSPolicy.InventoryFilter getInventoryFilters(int index)

List of inventory filters for the resource group.

The resources in this resource group are applied to the target VM if it satisfies at least one of the following inventory filters.

For example, to apply this resource group to VMs running either RHEL or CentOS operating systems, specify 2 items for the list with following values: inventory_filters[0].os_short_name='rhel' and inventory_filters[1].os_short_name='centos'

If the list is empty, this resource group will be applied to the target VM unconditionally.

repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3;

Parameter
Name Description
index int
Returns
Type Description
OSPolicy.InventoryFilter

getInventoryFiltersCount()

public int getInventoryFiltersCount()

List of inventory filters for the resource group.

The resources in this resource group are applied to the target VM if it satisfies at least one of the following inventory filters.

For example, to apply this resource group to VMs running either RHEL or CentOS operating systems, specify 2 items for the list with following values: inventory_filters[0].os_short_name='rhel' and inventory_filters[1].os_short_name='centos'

If the list is empty, this resource group will be applied to the target VM unconditionally.

repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3;

Returns
Type Description
int

getInventoryFiltersList()

public List<OSPolicy.InventoryFilter> getInventoryFiltersList()

List of inventory filters for the resource group.

The resources in this resource group are applied to the target VM if it satisfies at least one of the following inventory filters.

For example, to apply this resource group to VMs running either RHEL or CentOS operating systems, specify 2 items for the list with following values: inventory_filters[0].os_short_name='rhel' and inventory_filters[1].os_short_name='centos'

If the list is empty, this resource group will be applied to the target VM unconditionally.

repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3;

Returns
Type Description
List<InventoryFilter>

getInventoryFiltersOrBuilder(int index)

public OSPolicy.InventoryFilterOrBuilder getInventoryFiltersOrBuilder(int index)

List of inventory filters for the resource group.

The resources in this resource group are applied to the target VM if it satisfies at least one of the following inventory filters.

For example, to apply this resource group to VMs running either RHEL or CentOS operating systems, specify 2 items for the list with following values: inventory_filters[0].os_short_name='rhel' and inventory_filters[1].os_short_name='centos'

If the list is empty, this resource group will be applied to the target VM unconditionally.

repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3;

Parameter
Name Description
index int
Returns
Type Description
OSPolicy.InventoryFilterOrBuilder

getInventoryFiltersOrBuilderList()

public List<? extends OSPolicy.InventoryFilterOrBuilder> getInventoryFiltersOrBuilderList()

List of inventory filters for the resource group.

The resources in this resource group are applied to the target VM if it satisfies at least one of the following inventory filters.

For example, to apply this resource group to VMs running either RHEL or CentOS operating systems, specify 2 items for the list with following values: inventory_filters[0].os_short_name='rhel' and inventory_filters[1].os_short_name='centos'

If the list is empty, this resource group will be applied to the target VM unconditionally.

repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3;

Returns
Type Description
List<? extends com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilterOrBuilder>

getOsFilter() (deprecated)

public OSPolicy.OSFilter getOsFilter()

Deprecated. google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.os_filter is deprecated. See google/cloud/osconfig/v1alpha/os_policy.proto;l=511

Deprecated. Use the inventory_filters field instead. Used to specify the OS filter for a resource group

.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1 [deprecated = true];

Returns
Type Description
OSPolicy.OSFilter

The osFilter.

getOsFilterOrBuilder() (deprecated)

public OSPolicy.OSFilterOrBuilder getOsFilterOrBuilder()

Deprecated. Use the inventory_filters field instead. Used to specify the OS filter for a resource group

.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1 [deprecated = true];

Returns
Type Description
OSPolicy.OSFilterOrBuilder

getParserForType()

public Parser<OSPolicy.ResourceGroup> getParserForType()
Returns
Type Description
Parser<ResourceGroup>
Overrides

getResources(int index)

public OSPolicy.Resource getResources(int index)

Required. List of resources configured for this resource group. The resources are executed in the exact order specified here.

repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
OSPolicy.Resource

getResourcesCount()

public int getResourcesCount()

Required. List of resources configured for this resource group. The resources are executed in the exact order specified here.

repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

getResourcesList()

public List<OSPolicy.Resource> getResourcesList()

Required. List of resources configured for this resource group. The resources are executed in the exact order specified here.

repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<Resource>

getResourcesOrBuilder(int index)

public OSPolicy.ResourceOrBuilder getResourcesOrBuilder(int index)

Required. List of resources configured for this resource group. The resources are executed in the exact order specified here.

repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
OSPolicy.ResourceOrBuilder

getResourcesOrBuilderList()

public List<? extends OSPolicy.ResourceOrBuilder> getResourcesOrBuilderList()

Required. List of resources configured for this resource group. The resources are executed in the exact order specified here.

repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<? extends com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceOrBuilder>

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasOsFilter() (deprecated)

public boolean hasOsFilter()

Deprecated. google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.os_filter is deprecated. See google/cloud/osconfig/v1alpha/os_policy.proto;l=511

Deprecated. Use the inventory_filters field instead. Used to specify the OS filter for a resource group

.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1 [deprecated = true];

Returns
Type Description
boolean

Whether the osFilter field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public OSPolicy.ResourceGroup.Builder newBuilderForType()
Returns
Type Description
OSPolicy.ResourceGroup.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected OSPolicy.ResourceGroup.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
OSPolicy.ResourceGroup.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public OSPolicy.ResourceGroup.Builder toBuilder()
Returns
Type Description
OSPolicy.ResourceGroup.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException