Class OSPolicy.Resource.ExecResource.Exec.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<OSPolicy.Resource.ExecResource.Exec.Builder>
com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Builder
- All Implemented Interfaces:
OSPolicy.Resource.ExecResource.ExecOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- OSPolicy.Resource.ExecResource.Exec
public static final class OSPolicy.Resource.ExecResource.Exec.Builder
extends com.google.protobuf.GeneratedMessage.Builder<OSPolicy.Resource.ExecResource.Exec.Builder>
implements OSPolicy.Resource.ExecResource.ExecOrBuilder
A file or script to execute.Protobuf type
google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec-
Method Summary
Modifier and TypeMethodDescriptionaddAllArgs(Iterable<String> values) Optional arguments to pass to the source during execution.Optional arguments to pass to the source during execution.addArgsBytes(com.google.protobuf.ByteString value) Optional arguments to pass to the source during execution.build()clear()Optional arguments to pass to the source during execution.A remote or local file.Required.Only recorded for enforce Exec.An inline script.getArgs(int index) Optional arguments to pass to the source during execution.com.google.protobuf.ByteStringgetArgsBytes(int index) Optional arguments to pass to the source during execution.intOptional arguments to pass to the source during execution.com.google.protobuf.ProtocolStringListOptional arguments to pass to the source during execution.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetFile()A remote or local file.A remote or local file.A remote or local file.Required.intRequired.Only recorded for enforce Exec.com.google.protobuf.ByteStringOnly recorded for enforce Exec.An inline script.com.google.protobuf.ByteStringAn inline script.booleanhasFile()A remote or local file.booleanAn inline script.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFile(OSPolicy.Resource.File value) A remote or local file.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Optional arguments to pass to the source during execution.setFile(OSPolicy.Resource.File value) A remote or local file.setFile(OSPolicy.Resource.File.Builder builderForValue) A remote or local file.Required.setInterpreterValue(int value) Required.setOutputFilePath(String value) Only recorded for enforce Exec.setOutputFilePathBytes(com.google.protobuf.ByteString value) Only recorded for enforce Exec.An inline script.setScriptBytes(com.google.protobuf.ByteString value) An inline script.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<OSPolicy.Resource.ExecResource.Exec.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<OSPolicy.Resource.ExecResource.Exec.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<OSPolicy.Resource.ExecResource.Exec.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<OSPolicy.Resource.ExecResource.Exec.Builder>
-
mergeFrom
public OSPolicy.Resource.ExecResource.Exec.Builder mergeFrom(OSPolicy.Resource.ExecResource.Exec other) -
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<OSPolicy.Resource.ExecResource.Exec.Builder>
-
mergeFrom
public OSPolicy.Resource.ExecResource.Exec.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<OSPolicy.Resource.ExecResource.Exec.Builder>- Throws:
IOException
-
getSourceCase
- Specified by:
getSourceCasein interfaceOSPolicy.Resource.ExecResource.ExecOrBuilder
-
clearSource
-
hasFile
public boolean hasFile()A remote or local file.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1;- Specified by:
hasFilein interfaceOSPolicy.Resource.ExecResource.ExecOrBuilder- Returns:
- Whether the file field is set.
-
getFile
A remote or local file.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1;- Specified by:
getFilein interfaceOSPolicy.Resource.ExecResource.ExecOrBuilder- Returns:
- The file.
-
setFile
A remote or local file.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; -
setFile
public OSPolicy.Resource.ExecResource.Exec.Builder setFile(OSPolicy.Resource.File.Builder builderForValue) A remote or local file.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; -
mergeFile
A remote or local file.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; -
clearFile
A remote or local file.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; -
getFileBuilder
A remote or local file.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; -
getFileOrBuilder
A remote or local file.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1;- Specified by:
getFileOrBuilderin interfaceOSPolicy.Resource.ExecResource.ExecOrBuilder
-
hasScript
public boolean hasScript()An inline script. The size of the script is limited to 1024 characters.
string script = 2;- Specified by:
hasScriptin interfaceOSPolicy.Resource.ExecResource.ExecOrBuilder- Returns:
- Whether the script field is set.
-
getScript
An inline script. The size of the script is limited to 1024 characters.
string script = 2;- Specified by:
getScriptin interfaceOSPolicy.Resource.ExecResource.ExecOrBuilder- Returns:
- The script.
-
getScriptBytes
public com.google.protobuf.ByteString getScriptBytes()An inline script. The size of the script is limited to 1024 characters.
string script = 2;- Specified by:
getScriptBytesin interfaceOSPolicy.Resource.ExecResource.ExecOrBuilder- Returns:
- The bytes for script.
-
setScript
An inline script. The size of the script is limited to 1024 characters.
string script = 2;- Parameters:
value- The script to set.- Returns:
- This builder for chaining.
-
clearScript
An inline script. The size of the script is limited to 1024 characters.
string script = 2;- Returns:
- This builder for chaining.
-
setScriptBytes
public OSPolicy.Resource.ExecResource.Exec.Builder setScriptBytes(com.google.protobuf.ByteString value) An inline script. The size of the script is limited to 1024 characters.
string script = 2;- Parameters:
value- The bytes for script to set.- Returns:
- This builder for chaining.
-
getArgsList
public com.google.protobuf.ProtocolStringList getArgsList()Optional arguments to pass to the source during execution.
repeated string args = 3;- Specified by:
getArgsListin interfaceOSPolicy.Resource.ExecResource.ExecOrBuilder- Returns:
- A list containing the args.
-
getArgsCount
public int getArgsCount()Optional arguments to pass to the source during execution.
repeated string args = 3;- Specified by:
getArgsCountin interfaceOSPolicy.Resource.ExecResource.ExecOrBuilder- Returns:
- The count of args.
-
getArgs
Optional arguments to pass to the source during execution.
repeated string args = 3;- Specified by:
getArgsin interfaceOSPolicy.Resource.ExecResource.ExecOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The args at the given index.
-
getArgsBytes
public com.google.protobuf.ByteString getArgsBytes(int index) Optional arguments to pass to the source during execution.
repeated string args = 3;- Specified by:
getArgsBytesin interfaceOSPolicy.Resource.ExecResource.ExecOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the args at the given index.
-
setArgs
Optional arguments to pass to the source during execution.
repeated string args = 3;- Parameters:
index- The index to set the value at.value- The args to set.- Returns:
- This builder for chaining.
-
addArgs
Optional arguments to pass to the source during execution.
repeated string args = 3;- Parameters:
value- The args to add.- Returns:
- This builder for chaining.
-
addAllArgs
Optional arguments to pass to the source during execution.
repeated string args = 3;- Parameters:
values- The args to add.- Returns:
- This builder for chaining.
-
clearArgs
Optional arguments to pass to the source during execution.
repeated string args = 3;- Returns:
- This builder for chaining.
-
addArgsBytes
public OSPolicy.Resource.ExecResource.Exec.Builder addArgsBytes(com.google.protobuf.ByteString value) Optional arguments to pass to the source during execution.
repeated string args = 3;- Parameters:
value- The bytes of the args to add.- Returns:
- This builder for chaining.
-
getInterpreterValue
public int getInterpreterValue()Required. The script interpreter to use.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter interpreter = 4 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getInterpreterValuein interfaceOSPolicy.Resource.ExecResource.ExecOrBuilder- Returns:
- The enum numeric value on the wire for interpreter.
-
setInterpreterValue
Required. The script interpreter to use.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter interpreter = 4 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The enum numeric value on the wire for interpreter to set.- Returns:
- This builder for chaining.
-
getInterpreter
Required. The script interpreter to use.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter interpreter = 4 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getInterpreterin interfaceOSPolicy.Resource.ExecResource.ExecOrBuilder- Returns:
- The interpreter.
-
setInterpreter
public OSPolicy.Resource.ExecResource.Exec.Builder setInterpreter(OSPolicy.Resource.ExecResource.Exec.Interpreter value) Required. The script interpreter to use.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter interpreter = 4 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The interpreter to set.- Returns:
- This builder for chaining.
-
clearInterpreter
Required. The script interpreter to use.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter interpreter = 4 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
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;- Specified by:
getOutputFilePathin interfaceOSPolicy.Resource.ExecResource.ExecOrBuilder- Returns:
- The outputFilePath.
-
getOutputFilePathBytes
public com.google.protobuf.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;- Specified by:
getOutputFilePathBytesin interfaceOSPolicy.Resource.ExecResource.ExecOrBuilder- Returns:
- The bytes for outputFilePath.
-
setOutputFilePath
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;- Parameters:
value- The outputFilePath to set.- Returns:
- This builder for chaining.
-
clearOutputFilePath
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:
- This builder for chaining.
-
setOutputFilePathBytes
public OSPolicy.Resource.ExecResource.Exec.Builder setOutputFilePathBytes(com.google.protobuf.ByteString value) 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;- Parameters:
value- The bytes for outputFilePath to set.- Returns:
- This builder for chaining.
-