Package com.google.cloud.osconfig.v1
Class OSPolicy.Resource
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.cloud.osconfig.v1.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.v1.OSPolicy.Resource
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OSPolicy.Resource.Builder
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.static class
OSPolicy.Resource.ExecResource
A resource that allows executing scripts on the VM.static interface
OSPolicy.Resource.ExecResourceOrBuilder
static class
OSPolicy.Resource.File
A remote or local file.static interface
OSPolicy.Resource.FileOrBuilder
static class
OSPolicy.Resource.FileResource
A resource that manages the state of a file.static interface
OSPolicy.Resource.FileResourceOrBuilder
static class
OSPolicy.Resource.PackageResource
A resource that manages a system package.static interface
OSPolicy.Resource.PackageResourceOrBuilder
static class
OSPolicy.Resource.RepositoryResource
A resource that manages a package repository.static interface
OSPolicy.Resource.RepositoryResourceOrBuilder
static class
OSPolicy.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 int
EXEC_FIELD_NUMBER
static int
FILE_FIELD_NUMBER
static int
ID_FIELD_NUMBER
static int
PKG_FIELD_NUMBER
static int
REPOSITORY_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
static OSPolicy.Resource
getDefaultInstance()
OSPolicy.Resource
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
OSPolicy.Resource.ExecResource
getExec()
Exec resourceOSPolicy.Resource.ExecResourceOrBuilder
getExecOrBuilder()
Exec resourceOSPolicy.Resource.FileResource
getFile()
File resourceOSPolicy.Resource.FileResourceOrBuilder
getFileOrBuilder()
File resourceString
getId()
Required.com.google.protobuf.ByteString
getIdBytes()
Required.com.google.protobuf.Parser<OSPolicy.Resource>
getParserForType()
OSPolicy.Resource.PackageResource
getPkg()
Package resourceOSPolicy.Resource.PackageResourceOrBuilder
getPkgOrBuilder()
Package resourceOSPolicy.Resource.RepositoryResource
getRepository()
Package repository resourceOSPolicy.Resource.RepositoryResourceOrBuilder
getRepositoryOrBuilder()
Package repository resourceOSPolicy.Resource.ResourceTypeCase
getResourceTypeCase()
int
getSerializedSize()
boolean
hasExec()
Exec resourceboolean
hasFile()
File resourceint
hashCode()
boolean
hasPkg()
Package resourceboolean
hasRepository()
Package repository resourceprotected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
static OSPolicy.Resource.Builder
newBuilder()
static OSPolicy.Resource.Builder
newBuilder(OSPolicy.Resource prototype)
OSPolicy.Resource.Builder
newBuilderForType()
protected OSPolicy.Resource.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static OSPolicy.Resource
parseDelimitedFrom(InputStream input)
static OSPolicy.Resource
parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static OSPolicy.Resource
parseFrom(byte[] data)
static OSPolicy.Resource
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static OSPolicy.Resource
parseFrom(com.google.protobuf.ByteString data)
static OSPolicy.Resource
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static OSPolicy.Resource
parseFrom(com.google.protobuf.CodedInputStream input)
static OSPolicy.Resource
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static OSPolicy.Resource
parseFrom(InputStream input)
static OSPolicy.Resource
parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static OSPolicy.Resource
parseFrom(ByteBuffer data)
static OSPolicy.Resource
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<OSPolicy.Resource>
parser()
OSPolicy.Resource.Builder
toBuilder()
void
writeTo(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:
newInstance
in classcom.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 classcom.google.protobuf.GeneratedMessageV3
-
getResourceTypeCase
public OSPolicy.Resource.ResourceTypeCase getResourceTypeCase()
- Specified by:
getResourceTypeCase
in 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:
getId
in 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:
getIdBytes
in interfaceOSPolicy.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 interfaceOSPolicy.ResourceOrBuilder
- Returns:
- Whether the pkg field is set.
-
getPkg
public OSPolicy.Resource.PackageResource getPkg()
Package resource
.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource pkg = 2;
- Specified by:
getPkg
in interfaceOSPolicy.ResourceOrBuilder
- Returns:
- The pkg.
-
getPkgOrBuilder
public OSPolicy.Resource.PackageResourceOrBuilder getPkgOrBuilder()
Package resource
.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource pkg = 2;
- Specified by:
getPkgOrBuilder
in interfaceOSPolicy.ResourceOrBuilder
-
hasRepository
public boolean hasRepository()
Package repository resource
.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource repository = 3;
- Specified by:
hasRepository
in interfaceOSPolicy.ResourceOrBuilder
- Returns:
- Whether the repository field is set.
-
getRepository
public OSPolicy.Resource.RepositoryResource getRepository()
Package repository resource
.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource repository = 3;
- Specified by:
getRepository
in interfaceOSPolicy.ResourceOrBuilder
- Returns:
- The repository.
-
getRepositoryOrBuilder
public OSPolicy.Resource.RepositoryResourceOrBuilder getRepositoryOrBuilder()
Package repository resource
.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource repository = 3;
- Specified by:
getRepositoryOrBuilder
in interfaceOSPolicy.ResourceOrBuilder
-
hasExec
public boolean hasExec()
Exec resource
.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource exec = 4;
- Specified by:
hasExec
in interfaceOSPolicy.ResourceOrBuilder
- Returns:
- Whether the exec field is set.
-
getExec
public OSPolicy.Resource.ExecResource getExec()
Exec resource
.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource exec = 4;
- Specified by:
getExec
in interfaceOSPolicy.ResourceOrBuilder
- Returns:
- The exec.
-
getExecOrBuilder
public OSPolicy.Resource.ExecResourceOrBuilder getExecOrBuilder()
Exec resource
.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource exec = 4;
- Specified by:
getExecOrBuilder
in interfaceOSPolicy.ResourceOrBuilder
-
hasFile
public boolean hasFile()
File resource
.google.cloud.osconfig.v1.OSPolicy.Resource.FileResource file = 5;
- Specified by:
hasFile
in interfaceOSPolicy.ResourceOrBuilder
- Returns:
- Whether the file field is set.
-
getFile
public OSPolicy.Resource.FileResource getFile()
File resource
.google.cloud.osconfig.v1.OSPolicy.Resource.FileResource file = 5;
- Specified by:
getFile
in interfaceOSPolicy.ResourceOrBuilder
- Returns:
- The file.
-
getFileOrBuilder
public OSPolicy.Resource.FileResourceOrBuilder getFileOrBuilder()
File resource
.google.cloud.osconfig.v1.OSPolicy.Resource.FileResource file = 5;
- Specified by:
getFileOrBuilder
in interfaceOSPolicy.ResourceOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in 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:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in 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:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected OSPolicy.Resource.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in 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:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public OSPolicy.Resource getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-