Class OSPolicy.Resource

  • All Implemented Interfaces:
    OSPolicy.ResourceOrBuilder, 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.Resource
    extends com.google.protobuf.GeneratedMessageV3
    implements OSPolicy.ResourceOrBuilder
     An OS policy resource is used to define the desired state configuration
     and provides a specific functionality like installing/removing packages,
     executing a script etc.
    
     The system ensures that resources are always in their desired state by
     taking necessary actions if they have drifted from their desired state.
     
    Protobuf type google.cloud.osconfig.v1.OSPolicy.Resource
    See Also:
    Serialized Form
    • 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
      • getId

        public String getId()
         Required. The id of the resource 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 OS policy.
         
        string id = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getId in interface OSPolicy.ResourceOrBuilder
        Returns:
        The id.
      • getIdBytes

        public com.google.protobuf.ByteString getIdBytes()
         Required. The id of the resource 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 OS policy.
         
        string id = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getIdBytes in interface OSPolicy.ResourceOrBuilder
        Returns:
        The bytes for id.
      • hasPkg

        public boolean hasPkg()
         Package resource
         
        .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource pkg = 2;
        Specified by:
        hasPkg in interface OSPolicy.ResourceOrBuilder
        Returns:
        Whether the pkg field is set.
      • hasRepository

        public boolean hasRepository()
         Package repository resource
         
        .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource repository = 3;
        Specified by:
        hasRepository in interface OSPolicy.ResourceOrBuilder
        Returns:
        Whether the repository field is set.
      • hasExec

        public boolean hasExec()
         Exec resource
         
        .google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource exec = 4;
        Specified by:
        hasExec in interface OSPolicy.ResourceOrBuilder
        Returns:
        Whether the exec field is set.
      • hasFile

        public boolean hasFile()
         File resource
         
        .google.cloud.osconfig.v1.OSPolicy.Resource.FileResource file = 5;
        Specified by:
        hasFile in interface OSPolicy.ResourceOrBuilder
        Returns:
        Whether the file field is set.
      • 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.Resource parseFrom​(ByteBuffer data)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

        public static OSPolicy.Resource 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.Resource parseFrom​(byte[] data)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

        public static OSPolicy.Resource parseFrom​(com.google.protobuf.CodedInputStream input,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws IOException
        Throws:
        IOException
      • newBuilderForType

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

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

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

        public com.google.protobuf.Parser<OSPolicy.Resource> 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.Resource getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder