CarpDataEndPoint constructor

CarpDataEndPoint({
  1. required CarpUploadMethod uploadMethod,
  2. required String name,
  3. String? uri,
  4. String? clientId,
  5. String? clientSecret,
  6. String? email,
  7. String? password,
  8. String? collection,
  9. bool deleteWhenUploaded = true,
  10. String dataFormat = NameSpace.CARP,
  11. int bufferSize = 500 * 1000,
  12. bool zip = true,
  13. bool encrypt = false,
  14. String? publicKey,
})

Creates a CarpDataEndPoint.

uploadMethod specified the upload method as enumerated in CarpUploadMethod.

Implementation

CarpDataEndPoint({
  required this.uploadMethod,
  required this.name,
  this.uri,
  this.clientId,
  this.clientSecret,
  this.email,
  this.password,
  String? collection,
  this.deleteWhenUploaded = true,
  super.dataFormat,
  super.bufferSize,
  super.zip,
  super.encrypt,
  super.publicKey,
}) : super(
        type: DataEndPointTypes.CARP,
      ) {
  this.collection = collection ?? DEFAULT_COLLECTION;
  // the CARP server cannot handle zipped or encrypted files (yet)
  if (this.uploadMethod == CarpUploadMethod.BATCH_DATA_POINT) {
    this.zip = false;
    this.encrypt = false;
  }
}