Class OSPolicy.Resource
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.cloud.osconfig.v1alpha.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 typegoogle.cloud.osconfig.v1alpha.OSPolicy.Resource- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOSPolicy.Resource.BuilderAn OS policy resource is used to define the desired state configuration and provides a specific functionality like installing/removing packages, executing a script etc.static classOSPolicy.Resource.ExecResourceA resource that allows executing scripts on the VM.static interfaceOSPolicy.Resource.ExecResourceOrBuilderstatic classOSPolicy.Resource.FileA remote or local file.static interfaceOSPolicy.Resource.FileOrBuilderstatic classOSPolicy.Resource.FileResourceA resource that manages the state of a file.static interfaceOSPolicy.Resource.FileResourceOrBuilderstatic classOSPolicy.Resource.PackageResourceA resource that manages a system package.static interfaceOSPolicy.Resource.PackageResourceOrBuilderstatic classOSPolicy.Resource.RepositoryResourceA resource that manages a package repository.static interfaceOSPolicy.Resource.RepositoryResourceOrBuilderstatic classOSPolicy.Resource.ResourceTypeCase-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intEXEC_FIELD_NUMBERstatic intFILE_FIELD_NUMBERstatic intID_FIELD_NUMBERstatic intPKG_FIELD_NUMBERstatic intREPOSITORY_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)static OSPolicy.ResourcegetDefaultInstance()OSPolicy.ResourcegetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()OSPolicy.Resource.ExecResourcegetExec()Exec resourceOSPolicy.Resource.ExecResourceOrBuildergetExecOrBuilder()Exec resourceOSPolicy.Resource.FileResourcegetFile()File resourceOSPolicy.Resource.FileResourceOrBuildergetFileOrBuilder()File resourceStringgetId()Required.com.google.protobuf.ByteStringgetIdBytes()Required.com.google.protobuf.Parser<OSPolicy.Resource>getParserForType()OSPolicy.Resource.PackageResourcegetPkg()Package resourceOSPolicy.Resource.PackageResourceOrBuildergetPkgOrBuilder()Package resourceOSPolicy.Resource.RepositoryResourcegetRepository()Package repository resourceOSPolicy.Resource.RepositoryResourceOrBuildergetRepositoryOrBuilder()Package repository resourceOSPolicy.Resource.ResourceTypeCasegetResourceTypeCase()intgetSerializedSize()booleanhasExec()Exec resourcebooleanhasFile()File resourceinthashCode()booleanhasPkg()Package resourcebooleanhasRepository()Package repository resourceprotected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static OSPolicy.Resource.BuildernewBuilder()static OSPolicy.Resource.BuildernewBuilder(OSPolicy.Resource prototype)OSPolicy.Resource.BuildernewBuilderForType()protected OSPolicy.Resource.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static OSPolicy.ResourceparseDelimitedFrom(InputStream input)static OSPolicy.ResourceparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static OSPolicy.ResourceparseFrom(byte[] data)static OSPolicy.ResourceparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static OSPolicy.ResourceparseFrom(com.google.protobuf.ByteString data)static OSPolicy.ResourceparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static OSPolicy.ResourceparseFrom(com.google.protobuf.CodedInputStream input)static OSPolicy.ResourceparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static OSPolicy.ResourceparseFrom(InputStream input)static OSPolicy.ResourceparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static OSPolicy.ResourceparseFrom(ByteBuffer data)static OSPolicy.ResourceparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<OSPolicy.Resource>parser()OSPolicy.Resource.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
ID_FIELD_NUMBER
public static final int ID_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PKG_FIELD_NUMBER
public static final int PKG_FIELD_NUMBER
- See Also:
- Constant Field Values
-
REPOSITORY_FIELD_NUMBER
public static final int REPOSITORY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
EXEC_FIELD_NUMBER
public static final int EXEC_FIELD_NUMBER
- See Also:
- Constant Field Values
-
FILE_FIELD_NUMBER
public static final int FILE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getResourceTypeCase
public OSPolicy.Resource.ResourceTypeCase getResourceTypeCase()
- Specified by:
getResourceTypeCasein interfaceOSPolicy.ResourceOrBuilder
-
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:
getIdin interfaceOSPolicy.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:
getIdBytesin interfaceOSPolicy.ResourceOrBuilder- Returns:
- The bytes for id.
-
hasPkg
public boolean hasPkg()
Package resource
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource pkg = 2;- Specified by:
hasPkgin interfaceOSPolicy.ResourceOrBuilder- Returns:
- Whether the pkg field is set.
-
getPkg
public OSPolicy.Resource.PackageResource getPkg()
Package resource
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource pkg = 2;- Specified by:
getPkgin interfaceOSPolicy.ResourceOrBuilder- Returns:
- The pkg.
-
getPkgOrBuilder
public OSPolicy.Resource.PackageResourceOrBuilder getPkgOrBuilder()
Package resource
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource pkg = 2;- Specified by:
getPkgOrBuilderin interfaceOSPolicy.ResourceOrBuilder
-
hasRepository
public boolean hasRepository()
Package repository resource
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource repository = 3;- Specified by:
hasRepositoryin interfaceOSPolicy.ResourceOrBuilder- Returns:
- Whether the repository field is set.
-
getRepository
public OSPolicy.Resource.RepositoryResource getRepository()
Package repository resource
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource repository = 3;- Specified by:
getRepositoryin interfaceOSPolicy.ResourceOrBuilder- Returns:
- The repository.
-
getRepositoryOrBuilder
public OSPolicy.Resource.RepositoryResourceOrBuilder getRepositoryOrBuilder()
Package repository resource
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource repository = 3;- Specified by:
getRepositoryOrBuilderin interfaceOSPolicy.ResourceOrBuilder
-
hasExec
public boolean hasExec()
Exec resource
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource exec = 4;- Specified by:
hasExecin interfaceOSPolicy.ResourceOrBuilder- Returns:
- Whether the exec field is set.
-
getExec
public OSPolicy.Resource.ExecResource getExec()
Exec resource
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource exec = 4;- Specified by:
getExecin interfaceOSPolicy.ResourceOrBuilder- Returns:
- The exec.
-
getExecOrBuilder
public OSPolicy.Resource.ExecResourceOrBuilder getExecOrBuilder()
Exec resource
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource exec = 4;- Specified by:
getExecOrBuilderin interfaceOSPolicy.ResourceOrBuilder
-
hasFile
public boolean hasFile()
File resource
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource file = 5;- Specified by:
hasFilein interfaceOSPolicy.ResourceOrBuilder- Returns:
- Whether the file field is set.
-
getFile
public OSPolicy.Resource.FileResource getFile()
File resource
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource file = 5;- Specified by:
getFilein interfaceOSPolicy.ResourceOrBuilder- Returns:
- The file.
-
getFileOrBuilder
public OSPolicy.Resource.FileResourceOrBuilder getFileOrBuilder()
File resource
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource file = 5;- Specified by:
getFileOrBuilderin interfaceOSPolicy.ResourceOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.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(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static OSPolicy.Resource parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static OSPolicy.Resource parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static OSPolicy.Resource parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static OSPolicy.Resource parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
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:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static OSPolicy.Resource.Builder newBuilder()
-
newBuilder
public static OSPolicy.Resource.Builder newBuilder(OSPolicy.Resource prototype)
-
toBuilder
public OSPolicy.Resource.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected OSPolicy.Resource.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static OSPolicy.Resource getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<OSPolicy.Resource> parser()
-
getParserForType
public com.google.protobuf.Parser<OSPolicy.Resource> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public OSPolicy.Resource getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-