Class AlterEnvironmentRequest
- java.lang.Object
-
- com.gpudb.protocol.AlterEnvironmentRequest
-
- All Implemented Interfaces:
org.apache.avro.generic.GenericContainer,org.apache.avro.generic.IndexedRecord
public class AlterEnvironmentRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters forGPUdb.alterEnvironment.Alters an existing environment which can be referenced by a user-defined function (UDF).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAlterEnvironmentRequest.ActionA set of string constants for theAlterEnvironmentRequestparameteraction.static classAlterEnvironmentRequest.OptionsA set of string constants for theAlterEnvironmentRequestparameteroptions.
-
Constructor Summary
Constructors Constructor Description AlterEnvironmentRequest()Constructs an AlterEnvironmentRequest object with default parameters.AlterEnvironmentRequest(String environmentName, String action, String value, Map<String,String> options)Constructs an AlterEnvironmentRequest object with the specified parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Objectget(int index)This method supports the Avro framework and is not intended to be called directly by the user.StringgetAction()Modification operation to be applied.static org.apache.avro.SchemagetClassSchema()This method supports the Avro framework and is not intended to be called directly by the user.StringgetEnvironmentName()Name of the environment to be altered.Map<String,String>getOptions()Optional parameters.org.apache.avro.SchemagetSchema()This method supports the Avro framework and is not intended to be called directly by the user.StringgetValue()The value of the modification, depending onaction.inthashCode()voidput(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.AlterEnvironmentRequestsetAction(String action)Modification operation to be applied.AlterEnvironmentRequestsetEnvironmentName(String environmentName)Name of the environment to be altered.AlterEnvironmentRequestsetOptions(Map<String,String> options)Optional parameters.AlterEnvironmentRequestsetValue(String value)The value of the modification, depending onaction.StringtoString()
-
-
-
Constructor Detail
-
AlterEnvironmentRequest
public AlterEnvironmentRequest()
Constructs an AlterEnvironmentRequest object with default parameters.
-
AlterEnvironmentRequest
public AlterEnvironmentRequest(String environmentName, String action, String value, Map<String,String> options)
Constructs an AlterEnvironmentRequest object with the specified parameters.- Parameters:
environmentName- Name of the environment to be altered.action- Modification operation to be applied. Supported values:INSTALL_PACKAGE: Install a python package from PyPI, an external data source or KiFSINSTALL_REQUIREMENTS: Install packages from a requirements fileUNINSTALL_PACKAGE: Uninstall a python package.UNINSTALL_REQUIREMENTS: Uninstall packages from a requirements fileRESET: Uninstalls all packages in the environment and resets it to the original state at time of creationREBUILD: Recreates the environment and re-installs all packages, upgrades the packages if necessary based on dependencies
value- The value of the modification, depending onaction. For example, ifactionisINSTALL_PACKAGE, this would be the python package name. IfactionisINSTALL_REQUIREMENTS, this would be the path of a requirements file from which to install packages. If an external data source is specified inDATASOURCE_NAME, this can be the path to a wheel file or source archive. Alternatively, if installing from a file (wheel or source archive), the value may be a reference to a file in KiFS.options- Optional parameters.DATASOURCE_NAME: Name of an existing external data source from which packages specified invaluecan be loaded
Map.
-
-
Method Detail
-
getClassSchema
public static org.apache.avro.Schema getClassSchema()
This method supports the Avro framework and is not intended to be called directly by the user.- Returns:
- The schema for the class.
-
getEnvironmentName
public String getEnvironmentName()
Name of the environment to be altered.- Returns:
- The current value of
environmentName.
-
setEnvironmentName
public AlterEnvironmentRequest setEnvironmentName(String environmentName)
Name of the environment to be altered.- Parameters:
environmentName- The new value forenvironmentName.- Returns:
thisto mimic the builder pattern.
-
getAction
public String getAction()
Modification operation to be applied. Supported values:INSTALL_PACKAGE: Install a python package from PyPI, an external data source or KiFSINSTALL_REQUIREMENTS: Install packages from a requirements fileUNINSTALL_PACKAGE: Uninstall a python package.UNINSTALL_REQUIREMENTS: Uninstall packages from a requirements fileRESET: Uninstalls all packages in the environment and resets it to the original state at time of creationREBUILD: Recreates the environment and re-installs all packages, upgrades the packages if necessary based on dependencies
- Returns:
- The current value of
action.
-
setAction
public AlterEnvironmentRequest setAction(String action)
Modification operation to be applied. Supported values:INSTALL_PACKAGE: Install a python package from PyPI, an external data source or KiFSINSTALL_REQUIREMENTS: Install packages from a requirements fileUNINSTALL_PACKAGE: Uninstall a python package.UNINSTALL_REQUIREMENTS: Uninstall packages from a requirements fileRESET: Uninstalls all packages in the environment and resets it to the original state at time of creationREBUILD: Recreates the environment and re-installs all packages, upgrades the packages if necessary based on dependencies
- Parameters:
action- The new value foraction.- Returns:
thisto mimic the builder pattern.
-
getValue
public String getValue()
The value of the modification, depending onaction. For example, ifactionisINSTALL_PACKAGE, this would be the python package name.If
actionisINSTALL_REQUIREMENTS, this would be the path of a requirements file from which to install packages.If an external data source is specified in
DATASOURCE_NAME, this can be the path to a wheel file or source archive. Alternatively, if installing from a file (wheel or source archive), the value may be a reference to a file in KiFS.- Returns:
- The current value of
value.
-
setValue
public AlterEnvironmentRequest setValue(String value)
The value of the modification, depending onaction. For example, ifactionisINSTALL_PACKAGE, this would be the python package name.If
actionisINSTALL_REQUIREMENTS, this would be the path of a requirements file from which to install packages.If an external data source is specified in
DATASOURCE_NAME, this can be the path to a wheel file or source archive. Alternatively, if installing from a file (wheel or source archive), the value may be a reference to a file in KiFS.- Parameters:
value- The new value forvalue.- Returns:
thisto mimic the builder pattern.
-
getOptions
public Map<String,String> getOptions()
Optional parameters.DATASOURCE_NAME: Name of an existing external data source from which packages specified invaluecan be loaded
Map.- Returns:
- The current value of
options.
-
setOptions
public AlterEnvironmentRequest setOptions(Map<String,String> options)
Optional parameters.DATASOURCE_NAME: Name of an existing external data source from which packages specified invaluecan be loaded
Map.- Parameters:
options- The new value foroptions.- Returns:
thisto mimic the builder pattern.
-
getSchema
public org.apache.avro.Schema getSchema()
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getSchemain interfaceorg.apache.avro.generic.GenericContainer- Returns:
- The schema object describing this class.
-
get
public Object get(int index)
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to get- Returns:
- value of the field with the given index.
- Throws:
IndexOutOfBoundsException
-
put
public void put(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
putin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to setvalue- the value to set- Throws:
IndexOutOfBoundsException
-
-