Class OSPolicy.ResourceGroup

  • All Implemented Interfaces:
    OSPolicy.ResourceGroupOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
    Enclosing class:
    OSPolicy

    public static final class OSPolicy.ResourceGroup
    extends com.google.protobuf.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
    See Also:
    Serialized Form
    • Field Detail

      • INVENTORY_FILTERS_FIELD_NUMBER

        public static final int INVENTORY_FILTERS_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • 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];
        Specified by:
        hasOsFilter in interface OSPolicy.ResourceGroupOrBuilder
        Returns:
        Whether the osFilter field is set.
      • 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];
        Specified by:
        getOsFilter in interface OSPolicy.ResourceGroupOrBuilder
        Returns:
        The osFilter.
      • 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;
        Specified by:
        getInventoryFiltersList in interface OSPolicy.ResourceGroupOrBuilder
      • 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;
        Specified by:
        getInventoryFiltersOrBuilderList in interface OSPolicy.ResourceGroupOrBuilder
      • 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;
        Specified by:
        getInventoryFiltersCount in interface OSPolicy.ResourceGroupOrBuilder
      • getInventoryFilters

        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;
        Specified by:
        getInventoryFilters in interface OSPolicy.ResourceGroupOrBuilder
      • getInventoryFiltersOrBuilder

        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;
        Specified by:
        getInventoryFiltersOrBuilder in interface OSPolicy.ResourceGroupOrBuilder
      • 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];
        Specified by:
        getResourcesList in interface OSPolicy.ResourceGroupOrBuilder
      • 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];
        Specified by:
        getResourcesOrBuilderList in interface OSPolicy.ResourceGroupOrBuilder
      • 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];
        Specified by:
        getResourcesCount in interface OSPolicy.ResourceGroupOrBuilder
      • getResources

        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];
        Specified by:
        getResources in interface OSPolicy.ResourceGroupOrBuilder
      • getResourcesOrBuilder

        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];
        Specified by:
        getResourcesOrBuilder in interface OSPolicy.ResourceGroupOrBuilder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static OSPolicy.ResourceGroup parseFrom​(ByteBuffer data)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static OSPolicy.ResourceGroup parseFrom​(ByteBuffer data,
                                                       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static OSPolicy.ResourceGroup parseFrom​(com.google.protobuf.ByteString data)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static OSPolicy.ResourceGroup parseFrom​(com.google.protobuf.ByteString data,
                                                       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static OSPolicy.ResourceGroup parseFrom​(byte[] data)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static OSPolicy.ResourceGroup parseFrom​(byte[] data,
                                                       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • newBuilderForType

        public OSPolicy.ResourceGroup.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public OSPolicy.ResourceGroup.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected OSPolicy.ResourceGroup.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<OSPolicy.ResourceGroup> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public OSPolicy.ResourceGroup getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder