Skip to content

Commit

Permalink
add simple constructors for recursive delete types
Browse files Browse the repository at this point in the history
  • Loading branch information
Foxcapades committed Apr 28, 2022
1 parent a438910 commit 4f81368
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
}

Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

0 comments on commit 4f81368

Please sign in to comment.