From 4f81368152ce232712f352d98447d2d7f7fcf7e6 Mon Sep 17 00:00:00 2001 From: Elizabeth Date: Thu, 28 Apr 2022 10:26:36 -0400 Subject: [PATCH] add simple constructors for recursive delete types --- ...asicS3ClientRecursiveBucketDeleteParams.kt | 17 ++++++++- .../BasicS3RecursiveBucketDeleteParams.kt | 35 ++++++++++++++++--- 2 files changed, 46 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/org/veupathdb/lib/s3/s34k/core/requests/bucket/recursive/BasicS3ClientRecursiveBucketDeleteParams.kt b/src/main/kotlin/org/veupathdb/lib/s3/s34k/core/requests/bucket/recursive/BasicS3ClientRecursiveBucketDeleteParams.kt index c6672a8..4ca6dd2 100644 --- a/src/main/kotlin/org/veupathdb/lib/s3/s34k/core/requests/bucket/recursive/BasicS3ClientRecursiveBucketDeleteParams.kt +++ b/src/main/kotlin/org/veupathdb/lib/s3/s34k/core/requests/bucket/recursive/BasicS3ClientRecursiveBucketDeleteParams.kt @@ -2,8 +2,23 @@ package org.veupathdb.lib.s3.s34k.core.requests.bucket.recursive import org.veupathdb.lib.s3.s34k.fields.BucketName import org.veupathdb.lib.s3.s34k.requests.bucket.recursive.S3ClientRecursiveBucketDeleteParams +import org.veupathdb.lib.s3.s34k.requests.bucket.recursive.S3RecursiveBucketDeleteParams -open class BasicS3ClientRecursiveBucketDeleteParams : S3ClientRecursiveBucketDeleteParams, BasicS3RecursiveBucketDeleteParams() { +open class BasicS3ClientRecursiveBucketDeleteParams : S3ClientRecursiveBucketDeleteParams, BasicS3RecursiveBucketDeleteParams { override var bucketName: BucketName? = null + + constructor() : super() + + constructor( + bucketName: BucketName, + source: S3RecursiveBucketDeleteParams, + ) : super ( + source.headers, + source.queryParams, + source.region, + source.bucketDelete, + source.objectDelete, + source.objectFetch + ) } diff --git a/src/main/kotlin/org/veupathdb/lib/s3/s34k/core/requests/bucket/recursive/BasicS3RecursiveBucketDeleteParams.kt b/src/main/kotlin/org/veupathdb/lib/s3/s34k/core/requests/bucket/recursive/BasicS3RecursiveBucketDeleteParams.kt index 842e75a..6872a9e 100644 --- a/src/main/kotlin/org/veupathdb/lib/s3/s34k/core/requests/bucket/recursive/BasicS3RecursiveBucketDeleteParams.kt +++ b/src/main/kotlin/org/veupathdb/lib/s3/s34k/core/requests/bucket/recursive/BasicS3RecursiveBucketDeleteParams.kt @@ -10,15 +10,40 @@ import org.veupathdb.lib.s3.s34k.requests.bucket.recursive.S3RBDObjectListParams import org.veupathdb.lib.s3.s34k.requests.bucket.recursive.S3RecursiveBucketDeleteParams open class BasicS3RecursiveBucketDeleteParams : S3RecursiveBucketDeleteParams { - override val headers: S3HeadersMutable = BasicS3HeadersMutable() + override val headers: S3HeadersMutable - override val queryParams: S3QueryParamsMutable = BasicS3QueryParamsMutable() + override val queryParams: S3QueryParamsMutable override var region: String? = null - override val bucketDelete: S3RBDBucketDeleteParams = BasicS3RBDBucketDeleteParams() + override val bucketDelete: S3RBDBucketDeleteParams - override val objectDelete: S3RBDObjectDeleteParams = BasicS3RBDObjectDeleteParams() + override val objectDelete: S3RBDObjectDeleteParams - override val objectFetch: S3RBDObjectListParams = BasicS3RBDObjectListParams() + override val objectFetch: S3RBDObjectListParams + + constructor() { + headers = BasicS3HeadersMutable() + queryParams = BasicS3QueryParamsMutable() + region = null + bucketDelete = BasicS3RBDBucketDeleteParams() + objectDelete = BasicS3RBDObjectDeleteParams() + objectFetch = BasicS3RBDObjectListParams() + } + + internal constructor( + headers: S3HeadersMutable, + queryParams: S3QueryParamsMutable, + region: String?, + bucketDelete: S3RBDBucketDeleteParams, + objectDelete: S3RBDObjectDeleteParams, + objectFetch: S3RBDObjectListParams, + ) { + this.headers = headers + this.queryParams = queryParams + this.region = region + this.bucketDelete = bucketDelete + this.objectDelete = objectDelete + this.objectFetch = objectFetch + } } \ No newline at end of file