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 Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<OSPolicy.Resource.ExecResource.Exec.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<OSPolicy.Resource.ExecResource.Exec.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<OSPolicy.Resource.ExecResource.Exec.Builder>
    • getDefaultInstanceForType

      public OSPolicy.Resource.ExecResource.Exec getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public OSPolicy.Resource.ExecResource.Exec buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public OSPolicy.Resource.ExecResource.Exec.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<OSPolicy.Resource.ExecResource.Exec.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<OSPolicy.Resource.ExecResource.Exec.Builder>
      Throws:
      IOException
    • getSourceCase

      Specified by:
      getSourceCase in interface OSPolicy.Resource.ExecResource.ExecOrBuilder
    • clearSource

    • hasFile

      public boolean hasFile()
       A remote or local file.
       
      .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1;
      Specified by:
      hasFile in interface OSPolicy.Resource.ExecResource.ExecOrBuilder
      Returns:
      Whether the file field is set.
    • getFile

      public OSPolicy.Resource.File getFile()
       A remote or local file.
       
      .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1;
      Specified by:
      getFile in interface OSPolicy.Resource.ExecResource.ExecOrBuilder
      Returns:
      The file.
    • setFile

       A remote or local file.
       
      .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1;
    • setFile

       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

      public OSPolicy.Resource.File.Builder getFileBuilder()
       A remote or local file.
       
      .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1;
    • getFileOrBuilder

      public OSPolicy.Resource.FileOrBuilder getFileOrBuilder()
       A remote or local file.
       
      .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1;
      Specified by:
      getFileOrBuilder in interface OSPolicy.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:
      hasScript in interface OSPolicy.Resource.ExecResource.ExecOrBuilder
      Returns:
      Whether the script field is set.
    • getScript

      public String getScript()
       An inline script.
       The size of the script is limited to 1024 characters.
       
      string script = 2;
      Specified by:
      getScript in interface OSPolicy.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:
      getScriptBytes in interface OSPolicy.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:
      getArgsList in interface OSPolicy.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:
      getArgsCount in interface OSPolicy.Resource.ExecResource.ExecOrBuilder
      Returns:
      The count of args.
    • getArgs

      public String getArgs(int index)
       Optional arguments to pass to the source during execution.
       
      repeated string args = 3;
      Specified by:
      getArgs in interface OSPolicy.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:
      getArgsBytes in interface OSPolicy.Resource.ExecResource.ExecOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the args at the given index.
    • setArgs

      public OSPolicy.Resource.ExecResource.Exec.Builder setArgs(int index, String value)
       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:
      getInterpreterValue in interface OSPolicy.Resource.ExecResource.ExecOrBuilder
      Returns:
      The enum numeric value on the wire for interpreter.
    • setInterpreterValue

      public OSPolicy.Resource.ExecResource.Exec.Builder setInterpreterValue(int 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 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:
      getInterpreter in interface OSPolicy.Resource.ExecResource.ExecOrBuilder
      Returns:
      The interpreter.
    • setInterpreter

       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

      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;
      Specified by:
      getOutputFilePath in interface OSPolicy.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:
      getOutputFilePathBytes in interface OSPolicy.Resource.ExecResource.ExecOrBuilder
      Returns:
      The bytes for outputFilePath.
    • setOutputFilePath

      public OSPolicy.Resource.ExecResource.Exec.Builder setOutputFilePath(String 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 outputFilePath to set.
      Returns:
      This builder for chaining.
    • clearOutputFilePath

      public OSPolicy.Resource.ExecResource.Exec.Builder 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.