Class OSPolicy.Resource.ExecResource.Exec (2.7.0)

public static final class OSPolicy.Resource.ExecResource.Exec extends GeneratedMessageV3 implements OSPolicy.Resource.ExecResource.ExecOrBuilder

A file or script to execute.

Protobuf type google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > OSPolicy.Resource.ExecResource.Exec

Static Fields

ARGS_FIELD_NUMBER

public static final int ARGS_FIELD_NUMBER
Field Value
TypeDescription
int

FILE_FIELD_NUMBER

public static final int FILE_FIELD_NUMBER
Field Value
TypeDescription
int

INTERPRETER_FIELD_NUMBER

public static final int INTERPRETER_FIELD_NUMBER
Field Value
TypeDescription
int

OUTPUT_FILE_PATH_FIELD_NUMBER

public static final int OUTPUT_FILE_PATH_FIELD_NUMBER
Field Value
TypeDescription
int

SCRIPT_FIELD_NUMBER

public static final int SCRIPT_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static OSPolicy.Resource.ExecResource.Exec getDefaultInstance()
Returns
TypeDescription
OSPolicy.Resource.ExecResource.Exec

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static OSPolicy.Resource.ExecResource.Exec.Builder newBuilder()
Returns
TypeDescription
OSPolicy.Resource.ExecResource.Exec.Builder

newBuilder(OSPolicy.Resource.ExecResource.Exec prototype)

public static OSPolicy.Resource.ExecResource.Exec.Builder newBuilder(OSPolicy.Resource.ExecResource.Exec prototype)
Parameter
NameDescription
prototypeOSPolicy.Resource.ExecResource.Exec
Returns
TypeDescription
OSPolicy.Resource.ExecResource.Exec.Builder

parseDelimitedFrom(InputStream input)

public static OSPolicy.Resource.ExecResource.Exec parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
OSPolicy.Resource.ExecResource.Exec
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OSPolicy.Resource.ExecResource.Exec parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OSPolicy.Resource.ExecResource.Exec
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static OSPolicy.Resource.ExecResource.Exec parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
OSPolicy.Resource.ExecResource.Exec
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static OSPolicy.Resource.ExecResource.Exec parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OSPolicy.Resource.ExecResource.Exec
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static OSPolicy.Resource.ExecResource.Exec parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
OSPolicy.Resource.ExecResource.Exec
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static OSPolicy.Resource.ExecResource.Exec parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OSPolicy.Resource.ExecResource.Exec
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static OSPolicy.Resource.ExecResource.Exec parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
OSPolicy.Resource.ExecResource.Exec
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static OSPolicy.Resource.ExecResource.Exec parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OSPolicy.Resource.ExecResource.Exec
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static OSPolicy.Resource.ExecResource.Exec parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
OSPolicy.Resource.ExecResource.Exec
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OSPolicy.Resource.ExecResource.Exec parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OSPolicy.Resource.ExecResource.Exec
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static OSPolicy.Resource.ExecResource.Exec parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
OSPolicy.Resource.ExecResource.Exec
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static OSPolicy.Resource.ExecResource.Exec parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OSPolicy.Resource.ExecResource.Exec
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<OSPolicy.Resource.ExecResource.Exec> parser()
Returns
TypeDescription
Parser<Exec>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getArgs(int index)

public String getArgs(int index)

Optional arguments to pass to the source during execution.

repeated string args = 3;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The args at the given index.

getArgsBytes(int index)

public ByteString getArgsBytes(int index)

Optional arguments to pass to the source during execution.

repeated string args = 3;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the args at the given index.

getArgsCount()

public int getArgsCount()

Optional arguments to pass to the source during execution.

repeated string args = 3;

Returns
TypeDescription
int

The count of args.

getArgsList()

public ProtocolStringList getArgsList()

Optional arguments to pass to the source during execution.

repeated string args = 3;

Returns
TypeDescription
ProtocolStringList

A list containing the args.

getDefaultInstanceForType()

public OSPolicy.Resource.ExecResource.Exec getDefaultInstanceForType()
Returns
TypeDescription
OSPolicy.Resource.ExecResource.Exec

getFile()

public OSPolicy.Resource.File getFile()

A remote or local file.

.google.cloud.osconfig.v1.OSPolicy.Resource.File file = 1;

Returns
TypeDescription
OSPolicy.Resource.File

The file.

getFileOrBuilder()

public OSPolicy.Resource.FileOrBuilder getFileOrBuilder()

A remote or local file.

.google.cloud.osconfig.v1.OSPolicy.Resource.File file = 1;

Returns
TypeDescription
OSPolicy.Resource.FileOrBuilder

getInterpreter()

public OSPolicy.Resource.ExecResource.Exec.Interpreter getInterpreter()

Required. The script interpreter to use.

.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.Interpreter interpreter = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
OSPolicy.Resource.ExecResource.Exec.Interpreter

The interpreter.

getInterpreterValue()

public int getInterpreterValue()

Required. The script interpreter to use.

.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.Interpreter interpreter = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
int

The enum numeric value on the wire for interpreter.

getOutputFilePath()

public String getOutputFilePath()

Only recorded for enforce Exec. Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 100K bytes.

string output_file_path = 5;

Returns
TypeDescription
String

The outputFilePath.

getOutputFilePathBytes()

public ByteString getOutputFilePathBytes()

Only recorded for enforce Exec. Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 100K bytes.

string output_file_path = 5;

Returns
TypeDescription
ByteString

The bytes for outputFilePath.

getParserForType()

public Parser<OSPolicy.Resource.ExecResource.Exec> getParserForType()
Returns
TypeDescription
Parser<Exec>
Overrides

getScript()

public String getScript()

An inline script. The size of the script is limited to 1024 characters.

string script = 2;

Returns
TypeDescription
String

The script.

getScriptBytes()

public ByteString getScriptBytes()

An inline script. The size of the script is limited to 1024 characters.

string script = 2;

Returns
TypeDescription
ByteString

The bytes for script.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getSourceCase()

public OSPolicy.Resource.ExecResource.Exec.SourceCase getSourceCase()
Returns
TypeDescription
OSPolicy.Resource.ExecResource.Exec.SourceCase

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasFile()

public boolean hasFile()

A remote or local file.

.google.cloud.osconfig.v1.OSPolicy.Resource.File file = 1;

Returns
TypeDescription
boolean

Whether the file field is set.

hasScript()

public boolean hasScript()

An inline script. The size of the script is limited to 1024 characters.

string script = 2;

Returns
TypeDescription
boolean

Whether the script field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public OSPolicy.Resource.ExecResource.Exec.Builder newBuilderForType()
Returns
TypeDescription
OSPolicy.Resource.ExecResource.Exec.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected OSPolicy.Resource.ExecResource.Exec.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
OSPolicy.Resource.ExecResource.Exec.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public OSPolicy.Resource.ExecResource.Exec.Builder toBuilder()
Returns
TypeDescription
OSPolicy.Resource.ExecResource.Exec.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException