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| Modifier and Type | Class and 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 |
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| Modifier and Type | Field and 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 |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static OSPolicy.Resource |
getDefaultInstance() |
OSPolicy.Resource |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
OSPolicy.Resource.ExecResource |
getExec()
Exec resource
|
OSPolicy.Resource.ExecResourceOrBuilder |
getExecOrBuilder()
Exec resource
|
OSPolicy.Resource.FileResource |
getFile()
File resource
|
OSPolicy.Resource.FileResourceOrBuilder |
getFileOrBuilder()
File resource
|
String |
getId()
Required.
|
com.google.protobuf.ByteString |
getIdBytes()
Required.
|
com.google.protobuf.Parser<OSPolicy.Resource> |
getParserForType() |
OSPolicy.Resource.PackageResource |
getPkg()
Package resource
|
OSPolicy.Resource.PackageResourceOrBuilder |
getPkgOrBuilder()
Package resource
|
OSPolicy.Resource.RepositoryResource |
getRepository()
Package repository resource
|
OSPolicy.Resource.RepositoryResourceOrBuilder |
getRepositoryOrBuilder()
Package repository resource
|
OSPolicy.Resource.ResourceTypeCase |
getResourceTypeCase() |
int |
getSerializedSize() |
boolean |
hasExec()
Exec resource
|
boolean |
hasFile()
File resource
|
int |
hashCode() |
boolean |
hasPkg()
Package resource
|
boolean |
hasRepository()
Package repository resource
|
protected 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(ByteBuffer data) |
static OSPolicy.Resource |
parseFrom(ByteBuffer 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 com.google.protobuf.Parser<OSPolicy.Resource> |
parser() |
OSPolicy.Resource.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, 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, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int ID_FIELD_NUMBER
public static final int PKG_FIELD_NUMBER
public static final int REPOSITORY_FIELD_NUMBER
public static final int EXEC_FIELD_NUMBER
public static final int FILE_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public OSPolicy.Resource.ResourceTypeCase getResourceTypeCase()
getResourceTypeCase in interface OSPolicy.ResourceOrBuilderpublic 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];getId in interface OSPolicy.ResourceOrBuilderpublic 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];getIdBytes in interface OSPolicy.ResourceOrBuilderpublic boolean hasPkg()
Package resource
.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource pkg = 2;hasPkg in interface OSPolicy.ResourceOrBuilderpublic OSPolicy.Resource.PackageResource getPkg()
Package resource
.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource pkg = 2;getPkg in interface OSPolicy.ResourceOrBuilderpublic OSPolicy.Resource.PackageResourceOrBuilder getPkgOrBuilder()
Package resource
.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource pkg = 2;getPkgOrBuilder in interface OSPolicy.ResourceOrBuilderpublic boolean hasRepository()
Package repository resource
.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource repository = 3;hasRepository in interface OSPolicy.ResourceOrBuilderpublic OSPolicy.Resource.RepositoryResource getRepository()
Package repository resource
.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource repository = 3;getRepository in interface OSPolicy.ResourceOrBuilderpublic OSPolicy.Resource.RepositoryResourceOrBuilder getRepositoryOrBuilder()
Package repository resource
.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource repository = 3;getRepositoryOrBuilder in interface OSPolicy.ResourceOrBuilderpublic boolean hasExec()
Exec resource
.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource exec = 4;hasExec in interface OSPolicy.ResourceOrBuilderpublic OSPolicy.Resource.ExecResource getExec()
Exec resource
.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource exec = 4;getExec in interface OSPolicy.ResourceOrBuilderpublic OSPolicy.Resource.ExecResourceOrBuilder getExecOrBuilder()
Exec resource
.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource exec = 4;getExecOrBuilder in interface OSPolicy.ResourceOrBuilderpublic boolean hasFile()
File resource
.google.cloud.osconfig.v1.OSPolicy.Resource.FileResource file = 5;hasFile in interface OSPolicy.ResourceOrBuilderpublic OSPolicy.Resource.FileResource getFile()
File resource
.google.cloud.osconfig.v1.OSPolicy.Resource.FileResource file = 5;getFile in interface OSPolicy.ResourceOrBuilderpublic OSPolicy.Resource.FileResourceOrBuilder getFileOrBuilder()
File resource
.google.cloud.osconfig.v1.OSPolicy.Resource.FileResource file = 5;getFileOrBuilder in interface OSPolicy.ResourceOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static OSPolicy.Resource parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static OSPolicy.Resource parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static OSPolicy.Resource parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static OSPolicy.Resource parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static OSPolicy.Resource parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static OSPolicy.Resource parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static OSPolicy.Resource parseFrom(InputStream input) throws IOException
IOExceptionpublic static OSPolicy.Resource parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static OSPolicy.Resource parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static OSPolicy.Resource parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static OSPolicy.Resource parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static OSPolicy.Resource parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic OSPolicy.Resource.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static OSPolicy.Resource.Builder newBuilder()
public static OSPolicy.Resource.Builder newBuilder(OSPolicy.Resource prototype)
public OSPolicy.Resource.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected OSPolicy.Resource.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static OSPolicy.Resource getDefaultInstance()
public static com.google.protobuf.Parser<OSPolicy.Resource> parser()
public com.google.protobuf.Parser<OSPolicy.Resource> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public OSPolicy.Resource getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2024 Google LLC. All rights reserved.