Class GuestPolicies.SoftwareRecipe.Step.RunScript.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<GuestPolicies.SoftwareRecipe.Step.RunScript.Builder>
com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript.Builder
All Implemented Interfaces:
GuestPolicies.SoftwareRecipe.Step.RunScriptOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
GuestPolicies.SoftwareRecipe.Step.RunScript

public static final class GuestPolicies.SoftwareRecipe.Step.RunScript.Builder extends com.google.protobuf.GeneratedMessage.Builder<GuestPolicies.SoftwareRecipe.Step.RunScript.Builder> implements GuestPolicies.SoftwareRecipe.Step.RunScriptOrBuilder
 Runs a script through an interpreter.
 
Protobuf type google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript
  • 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<GuestPolicies.SoftwareRecipe.Step.RunScript.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<GuestPolicies.SoftwareRecipe.Step.RunScript.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<GuestPolicies.SoftwareRecipe.Step.RunScript.Builder>
    • getDefaultInstanceForType

      public GuestPolicies.SoftwareRecipe.Step.RunScript 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

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

      public GuestPolicies.SoftwareRecipe.Step.RunScript.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<GuestPolicies.SoftwareRecipe.Step.RunScript.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<GuestPolicies.SoftwareRecipe.Step.RunScript.Builder>
    • mergeFrom

      public GuestPolicies.SoftwareRecipe.Step.RunScript.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<GuestPolicies.SoftwareRecipe.Step.RunScript.Builder>
      Throws:
      IOException
    • getScript

      public String getScript()
       Required. The shell script to be executed.
       
      string script = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getScript in interface GuestPolicies.SoftwareRecipe.Step.RunScriptOrBuilder
      Returns:
      The script.
    • getScriptBytes

      public com.google.protobuf.ByteString getScriptBytes()
       Required. The shell script to be executed.
       
      string script = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getScriptBytes in interface GuestPolicies.SoftwareRecipe.Step.RunScriptOrBuilder
      Returns:
      The bytes for script.
    • setScript

       Required. The shell script to be executed.
       
      string script = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The script to set.
      Returns:
      This builder for chaining.
    • clearScript

       Required. The shell script to be executed.
       
      string script = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setScriptBytes

      public GuestPolicies.SoftwareRecipe.Step.RunScript.Builder setScriptBytes(com.google.protobuf.ByteString value)
       Required. The shell script to be executed.
       
      string script = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for script to set.
      Returns:
      This builder for chaining.
    • getAllowedExitCodesList

      public List<Integer> getAllowedExitCodesList()
       Return codes that indicate that the software installed or updated
       successfully. Behaviour defaults to [0]
       
      repeated int32 allowed_exit_codes = 2;
      Specified by:
      getAllowedExitCodesList in interface GuestPolicies.SoftwareRecipe.Step.RunScriptOrBuilder
      Returns:
      A list containing the allowedExitCodes.
    • getAllowedExitCodesCount

      public int getAllowedExitCodesCount()
       Return codes that indicate that the software installed or updated
       successfully. Behaviour defaults to [0]
       
      repeated int32 allowed_exit_codes = 2;
      Specified by:
      getAllowedExitCodesCount in interface GuestPolicies.SoftwareRecipe.Step.RunScriptOrBuilder
      Returns:
      The count of allowedExitCodes.
    • getAllowedExitCodes

      public int getAllowedExitCodes(int index)
       Return codes that indicate that the software installed or updated
       successfully. Behaviour defaults to [0]
       
      repeated int32 allowed_exit_codes = 2;
      Specified by:
      getAllowedExitCodes in interface GuestPolicies.SoftwareRecipe.Step.RunScriptOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The allowedExitCodes at the given index.
    • setAllowedExitCodes

      public GuestPolicies.SoftwareRecipe.Step.RunScript.Builder setAllowedExitCodes(int index, int value)
       Return codes that indicate that the software installed or updated
       successfully. Behaviour defaults to [0]
       
      repeated int32 allowed_exit_codes = 2;
      Parameters:
      index - The index to set the value at.
      value - The allowedExitCodes to set.
      Returns:
      This builder for chaining.
    • addAllowedExitCodes

      public GuestPolicies.SoftwareRecipe.Step.RunScript.Builder addAllowedExitCodes(int value)
       Return codes that indicate that the software installed or updated
       successfully. Behaviour defaults to [0]
       
      repeated int32 allowed_exit_codes = 2;
      Parameters:
      value - The allowedExitCodes to add.
      Returns:
      This builder for chaining.
    • addAllAllowedExitCodes

      public GuestPolicies.SoftwareRecipe.Step.RunScript.Builder addAllAllowedExitCodes(Iterable<? extends Integer> values)
       Return codes that indicate that the software installed or updated
       successfully. Behaviour defaults to [0]
       
      repeated int32 allowed_exit_codes = 2;
      Parameters:
      values - The allowedExitCodes to add.
      Returns:
      This builder for chaining.
    • clearAllowedExitCodes

       Return codes that indicate that the software installed or updated
       successfully. Behaviour defaults to [0]
       
      repeated int32 allowed_exit_codes = 2;
      Returns:
      This builder for chaining.
    • getInterpreterValue

      public int getInterpreterValue()
       The script interpreter to use to run the script. If no interpreter is
       specified the script is executed directly, which likely
       only succeed for scripts with
       [shebang lines](https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
       
      .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript.Interpreter interpreter = 3;
      Specified by:
      getInterpreterValue in interface GuestPolicies.SoftwareRecipe.Step.RunScriptOrBuilder
      Returns:
      The enum numeric value on the wire for interpreter.
    • setInterpreterValue

      public GuestPolicies.SoftwareRecipe.Step.RunScript.Builder setInterpreterValue(int value)
       The script interpreter to use to run the script. If no interpreter is
       specified the script is executed directly, which likely
       only succeed for scripts with
       [shebang lines](https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
       
      .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript.Interpreter interpreter = 3;
      Parameters:
      value - The enum numeric value on the wire for interpreter to set.
      Returns:
      This builder for chaining.
    • getInterpreter

       The script interpreter to use to run the script. If no interpreter is
       specified the script is executed directly, which likely
       only succeed for scripts with
       [shebang lines](https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
       
      .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript.Interpreter interpreter = 3;
      Specified by:
      getInterpreter in interface GuestPolicies.SoftwareRecipe.Step.RunScriptOrBuilder
      Returns:
      The interpreter.
    • setInterpreter

       The script interpreter to use to run the script. If no interpreter is
       specified the script is executed directly, which likely
       only succeed for scripts with
       [shebang lines](https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
       
      .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript.Interpreter interpreter = 3;
      Parameters:
      value - The interpreter to set.
      Returns:
      This builder for chaining.
    • clearInterpreter

       The script interpreter to use to run the script. If no interpreter is
       specified the script is executed directly, which likely
       only succeed for scripts with
       [shebang lines](https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
       
      .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript.Interpreter interpreter = 3;
      Returns:
      This builder for chaining.