Class CreateDatasourceRequest

  • All Implemented Interfaces:
    org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecord

    public class CreateDatasourceRequest
    extends Object
    implements org.apache.avro.generic.IndexedRecord
    A set of parameters for GPUdb.createDatasource.

    Creates a data source, which contains the location and connection information for a data store that is external to the database.

    • Constructor Detail

      • CreateDatasourceRequest

        public CreateDatasourceRequest()
        Constructs a CreateDatasourceRequest object with default parameters.
      • CreateDatasourceRequest

        public CreateDatasourceRequest​(String name,
                                       String location,
                                       String userName,
                                       String password,
                                       Map<String,​String> options)
        Constructs a CreateDatasourceRequest object with the specified parameters.
        Parameters:
        name - Name of the data source to be created.
        location - Location of the remote storage in 'storage_provider_type://[storage_path[:storage_port]]' format. Supported storage provider types are 'azure', 'gcs', 'hdfs', 'jdbc', 'kafka', 'confluent', and 's3'.
        userName - Name of the remote system user; may be an empty string
        password - Password for the remote system user; may be an empty string
        options - Optional parameters. The default value is an empty 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.
      • getName

        public String getName()
        Name of the data source to be created.
        Returns:
        The current value of name.
      • setName

        public CreateDatasourceRequest setName​(String name)
        Name of the data source to be created.
        Parameters:
        name - The new value for name.
        Returns:
        this to mimic the builder pattern.
      • getLocation

        public String getLocation()
        Location of the remote storage in 'storage_provider_type://[storage_path[:storage_port]]' format.

        Supported storage provider types are 'azure', 'gcs', 'hdfs', 'jdbc', 'kafka', 'confluent', and 's3'.

        Returns:
        The current value of location.
      • setLocation

        public CreateDatasourceRequest setLocation​(String location)
        Location of the remote storage in 'storage_provider_type://[storage_path[:storage_port]]' format.

        Supported storage provider types are 'azure', 'gcs', 'hdfs', 'jdbc', 'kafka', 'confluent', and 's3'.

        Parameters:
        location - The new value for location.
        Returns:
        this to mimic the builder pattern.
      • getUserName

        public String getUserName()
        Name of the remote system user; may be an empty string
        Returns:
        The current value of userName.
      • setUserName

        public CreateDatasourceRequest setUserName​(String userName)
        Name of the remote system user; may be an empty string
        Parameters:
        userName - The new value for userName.
        Returns:
        this to mimic the builder pattern.
      • getPassword

        public String getPassword()
        Password for the remote system user; may be an empty string
        Returns:
        The current value of password.
      • setPassword

        public CreateDatasourceRequest setPassword​(String password)
        Password for the remote system user; may be an empty string
        Parameters:
        password - The new value for password.
        Returns:
        this to 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:
        getSchema in interface org.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:
        get in interface org.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:
        put in interface org.apache.avro.generic.IndexedRecord
        Parameters:
        index - the position of the field to set
        value - the value to set
        Throws:
        IndexOutOfBoundsException
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object