Class 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.GeneratedMessageV3
    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:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • 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.
      • 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
      • 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
      • 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
      • 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
      • 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.GeneratedMessageV3
      • 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.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • 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
      • newBuilderForType

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

        public GuestPolicies.SoftwareRecipe.Builder 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.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • 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.GeneratedMessageV3
      • getDefaultInstanceForType

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