Class GuestPolicies.SoftwareRecipe

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe
All Implemented Interfaces:
GuestPolicies.SoftwareRecipeOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
Enclosing class:
GuestPolicies

public static final class GuestPolicies.SoftwareRecipe extends com.google.protobuf.GeneratedMessage implements GuestPolicies.SoftwareRecipeOrBuilder
 A software recipe is a set of instructions for installing and configuring a
 piece of software. It consists of a set of artifacts that are
 downloaded, and a set of steps that install, configure, and/or update the
 software.

 Recipes support installing and updating software from artifacts in the
 following formats:
 Zip archive, Tar archive, Windows MSI, Debian package, and RPM package.

 Additionally, recipes support executing a script (either defined in a file or
 directly in this api) in bash, sh, cmd, and powershell.

 Updating a software recipe

 If a recipe is assigned to an instance and there is a recipe with the same
 name but a lower version already installed and the assigned state
 of the recipe is `UPDATED`, then the recipe is updated to
 the new version.

 Script Working Directories

 Each script or execution step is run in its own temporary directory which
 is deleted after completing the step.
 
Protobuf type google.cloud.osconfig.v1beta.SoftwareRecipe
See Also:
  • Field Details

    • NAME_FIELD_NUMBER

      public static final int NAME_FIELD_NUMBER
      See Also:
    • VERSION_FIELD_NUMBER

      public static final int VERSION_FIELD_NUMBER
      See Also:
    • ARTIFACTS_FIELD_NUMBER

      public static final int ARTIFACTS_FIELD_NUMBER
      See Also:
    • INSTALL_STEPS_FIELD_NUMBER

      public static final int INSTALL_STEPS_FIELD_NUMBER
      See Also:
    • UPDATE_STEPS_FIELD_NUMBER

      public static final int UPDATE_STEPS_FIELD_NUMBER
      See Also:
    • DESIRED_STATE_FIELD_NUMBER

      public static final int DESIRED_STATE_FIELD_NUMBER
      See Also:
  • 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
    • getName

      public String getName()
       Required. Unique identifier for the recipe. Only one recipe with a given name is
       installed on an instance.
      
       Names are also used to identify resources which helps to determine whether
       guest policies have conflicts. This means that requests to create multiple
       recipes with the same name and version are rejected since they
       could potentially have conflicting assignments.
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getName in interface GuestPolicies.SoftwareRecipeOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Required. Unique identifier for the recipe. Only one recipe with a given name is
       installed on an instance.
      
       Names are also used to identify resources which helps to determine whether
       guest policies have conflicts. This means that requests to create multiple
       recipes with the same name and version are rejected since they
       could potentially have conflicting assignments.
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getNameBytes in interface GuestPolicies.SoftwareRecipeOrBuilder
      Returns:
      The bytes for name.
    • getVersion

      public String getVersion()
       The version of this software recipe. Version can be up to 4 period
       separated numbers (e.g. 12.34.56.78).
       
      string version = 2;
      Specified by:
      getVersion in interface GuestPolicies.SoftwareRecipeOrBuilder
      Returns:
      The version.
    • getVersionBytes

      public com.google.protobuf.ByteString getVersionBytes()
       The version of this software recipe. Version can be up to 4 period
       separated numbers (e.g. 12.34.56.78).
       
      string version = 2;
      Specified by:
      getVersionBytes in interface GuestPolicies.SoftwareRecipeOrBuilder
      Returns:
      The bytes for version.
    • getArtifactsList

      public List<GuestPolicies.SoftwareRecipe.Artifact> getArtifactsList()
       Resources available to be used in the steps in the recipe.
       
      repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3;
      Specified by:
      getArtifactsList in interface GuestPolicies.SoftwareRecipeOrBuilder
    • getArtifactsOrBuilderList

      public List<? extends GuestPolicies.SoftwareRecipe.ArtifactOrBuilder> getArtifactsOrBuilderList()
       Resources available to be used in the steps in the recipe.
       
      repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3;
      Specified by:
      getArtifactsOrBuilderList in interface GuestPolicies.SoftwareRecipeOrBuilder
    • getArtifactsCount

      public int getArtifactsCount()
       Resources available to be used in the steps in the recipe.
       
      repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3;
      Specified by:
      getArtifactsCount in interface GuestPolicies.SoftwareRecipeOrBuilder
    • getArtifacts

      public GuestPolicies.SoftwareRecipe.Artifact getArtifacts(int index)
       Resources available to be used in the steps in the recipe.
       
      repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3;
      Specified by:
      getArtifacts in interface GuestPolicies.SoftwareRecipeOrBuilder
    • getArtifactsOrBuilder

      public GuestPolicies.SoftwareRecipe.ArtifactOrBuilder getArtifactsOrBuilder(int index)
       Resources available to be used in the steps in the recipe.
       
      repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3;
      Specified by:
      getArtifactsOrBuilder in interface GuestPolicies.SoftwareRecipeOrBuilder
    • getInstallStepsList

      public List<GuestPolicies.SoftwareRecipe.Step> getInstallStepsList()
       Actions to be taken for installing this recipe. On failure it stops
       executing steps and does not attempt another installation. Any steps taken
       (including partially completed steps) are not rolled back.
       
      repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4;
      Specified by:
      getInstallStepsList in interface GuestPolicies.SoftwareRecipeOrBuilder
    • getInstallStepsOrBuilderList

      public List<? extends GuestPolicies.SoftwareRecipe.StepOrBuilder> getInstallStepsOrBuilderList()
       Actions to be taken for installing this recipe. On failure it stops
       executing steps and does not attempt another installation. Any steps taken
       (including partially completed steps) are not rolled back.
       
      repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4;
      Specified by:
      getInstallStepsOrBuilderList in interface GuestPolicies.SoftwareRecipeOrBuilder
    • getInstallStepsCount

      public int getInstallStepsCount()
       Actions to be taken for installing this recipe. On failure it stops
       executing steps and does not attempt another installation. Any steps taken
       (including partially completed steps) are not rolled back.
       
      repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4;
      Specified by:
      getInstallStepsCount in interface GuestPolicies.SoftwareRecipeOrBuilder
    • getInstallSteps

      public GuestPolicies.SoftwareRecipe.Step getInstallSteps(int index)
       Actions to be taken for installing this recipe. On failure it stops
       executing steps and does not attempt another installation. Any steps taken
       (including partially completed steps) are not rolled back.
       
      repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4;
      Specified by:
      getInstallSteps in interface GuestPolicies.SoftwareRecipeOrBuilder
    • getInstallStepsOrBuilder

      public GuestPolicies.SoftwareRecipe.StepOrBuilder getInstallStepsOrBuilder(int index)
       Actions to be taken for installing this recipe. On failure it stops
       executing steps and does not attempt another installation. Any steps taken
       (including partially completed steps) are not rolled back.
       
      repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4;
      Specified by:
      getInstallStepsOrBuilder in interface GuestPolicies.SoftwareRecipeOrBuilder
    • getUpdateStepsList

      public List<GuestPolicies.SoftwareRecipe.Step> getUpdateStepsList()
       Actions to be taken for updating this recipe. On failure it stops
       executing steps and  does not attempt another update for this recipe. Any
       steps taken (including partially completed steps) are not rolled back.
       
      repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5;
      Specified by:
      getUpdateStepsList in interface GuestPolicies.SoftwareRecipeOrBuilder
    • getUpdateStepsOrBuilderList

      public List<? extends GuestPolicies.SoftwareRecipe.StepOrBuilder> getUpdateStepsOrBuilderList()
       Actions to be taken for updating this recipe. On failure it stops
       executing steps and  does not attempt another update for this recipe. Any
       steps taken (including partially completed steps) are not rolled back.
       
      repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5;
      Specified by:
      getUpdateStepsOrBuilderList in interface GuestPolicies.SoftwareRecipeOrBuilder
    • getUpdateStepsCount

      public int getUpdateStepsCount()
       Actions to be taken for updating this recipe. On failure it stops
       executing steps and  does not attempt another update for this recipe. Any
       steps taken (including partially completed steps) are not rolled back.
       
      repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5;
      Specified by:
      getUpdateStepsCount in interface GuestPolicies.SoftwareRecipeOrBuilder
    • getUpdateSteps

      public GuestPolicies.SoftwareRecipe.Step getUpdateSteps(int index)
       Actions to be taken for updating this recipe. On failure it stops
       executing steps and  does not attempt another update for this recipe. Any
       steps taken (including partially completed steps) are not rolled back.
       
      repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5;
      Specified by:
      getUpdateSteps in interface GuestPolicies.SoftwareRecipeOrBuilder
    • getUpdateStepsOrBuilder

      public GuestPolicies.SoftwareRecipe.StepOrBuilder getUpdateStepsOrBuilder(int index)
       Actions to be taken for updating this recipe. On failure it stops
       executing steps and  does not attempt another update for this recipe. Any
       steps taken (including partially completed steps) are not rolled back.
       
      repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5;
      Specified by:
      getUpdateStepsOrBuilder in interface GuestPolicies.SoftwareRecipeOrBuilder
    • getDesiredStateValue

      public int getDesiredStateValue()
       Default is INSTALLED. The desired state the agent should maintain for this
       recipe.
      
       INSTALLED: The software recipe is installed on the instance but
       won't be updated to new versions.
       UPDATED: The software recipe is installed on the instance. The recipe is
       updated to a higher version, if a higher version of the recipe is
       assigned to this instance.
       REMOVE: Remove is unsupported for software recipes and attempts to
       create or update a recipe to the REMOVE state is rejected.
       
      .google.cloud.osconfig.v1beta.DesiredState desired_state = 6;
      Specified by:
      getDesiredStateValue in interface GuestPolicies.SoftwareRecipeOrBuilder
      Returns:
      The enum numeric value on the wire for desiredState.
    • getDesiredState

      public GuestPolicies.DesiredState getDesiredState()
       Default is INSTALLED. The desired state the agent should maintain for this
       recipe.
      
       INSTALLED: The software recipe is installed on the instance but
       won't be updated to new versions.
       UPDATED: The software recipe is installed on the instance. The recipe is
       updated to a higher version, if a higher version of the recipe is
       assigned to this instance.
       REMOVE: Remove is unsupported for software recipes and attempts to
       create or update a recipe to the REMOVE state is rejected.
       
      .google.cloud.osconfig.v1beta.DesiredState desired_state = 6;
      Specified by:
      getDesiredState in interface GuestPolicies.SoftwareRecipeOrBuilder
      Returns:
      The desiredState.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static GuestPolicies.SoftwareRecipe parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static GuestPolicies.SoftwareRecipe parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static GuestPolicies.SoftwareRecipe parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static GuestPolicies.SoftwareRecipe parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static GuestPolicies.SoftwareRecipe parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static GuestPolicies.SoftwareRecipe parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static GuestPolicies.SoftwareRecipe parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static GuestPolicies.SoftwareRecipe parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static GuestPolicies.SoftwareRecipe parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static GuestPolicies.SoftwareRecipe parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static GuestPolicies.SoftwareRecipe parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static GuestPolicies.SoftwareRecipe parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public GuestPolicies.SoftwareRecipe.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static GuestPolicies.SoftwareRecipe.Builder newBuilder()
    • newBuilder

    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected GuestPolicies.SoftwareRecipe.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static GuestPolicies.SoftwareRecipe getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<GuestPolicies.SoftwareRecipe> parser()
    • getParserForType

      public com.google.protobuf.Parser<GuestPolicies.SoftwareRecipe> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public GuestPolicies.SoftwareRecipe getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder