-
Notifications
You must be signed in to change notification settings - Fork 861
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update AuthScemeParams with RegionSet for Sigv4a auth Scheme
- Loading branch information
Showing
7 changed files
with
238 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
...zon/awssdk/codegen/poet/auth/scheme/ops-auth-sigv4a-value-auth-scheme-default-params.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
package software.amazon.awssdk.services.database.auth.scheme.internal; | ||
|
||
import software.amazon.awssdk.annotations.Generated; | ||
import software.amazon.awssdk.annotations.SdkInternalApi; | ||
import software.amazon.awssdk.http.auth.aws.signer.RegionSet; | ||
import software.amazon.awssdk.regions.Region; | ||
import software.amazon.awssdk.services.database.auth.scheme.DatabaseAuthSchemeParams; | ||
import software.amazon.awssdk.utils.Validate; | ||
|
||
@Generated("software.amazon.awssdk:codegen") | ||
@SdkInternalApi | ||
public final class DefaultDatabaseAuthSchemeParams implements DatabaseAuthSchemeParams { | ||
private final String operation; | ||
|
||
private final Region region; | ||
|
||
private final RegionSet regionSet; | ||
|
||
private DefaultDatabaseAuthSchemeParams(Builder builder) { | ||
this.operation = Validate.paramNotNull(builder.operation, "operation"); | ||
this.region = builder.region; | ||
this.regionSet = builder.regionSet; | ||
} | ||
|
||
public static DatabaseAuthSchemeParams.Builder builder() { | ||
return new Builder(); | ||
} | ||
|
||
@Override | ||
public String operation() { | ||
return operation; | ||
} | ||
|
||
@Override | ||
public Region region() { | ||
return region; | ||
} | ||
|
||
@Override | ||
public RegionSet regionSet() { | ||
return regionSet; | ||
} | ||
|
||
@Override | ||
public DatabaseAuthSchemeParams.Builder toBuilder() { | ||
return new Builder(this); | ||
} | ||
|
||
private static final class Builder implements DatabaseAuthSchemeParams.Builder { | ||
private String operation; | ||
|
||
private Region region; | ||
|
||
private RegionSet regionSet; | ||
|
||
Builder() { | ||
} | ||
|
||
Builder(DefaultDatabaseAuthSchemeParams params) { | ||
this.operation = params.operation; | ||
this.region = params.region; | ||
this.regionSet = params.regionSet; | ||
} | ||
|
||
@Override | ||
public Builder operation(String operation) { | ||
this.operation = operation; | ||
return this; | ||
} | ||
|
||
@Override | ||
public Builder region(Region region) { | ||
this.region = region; | ||
return this; | ||
} | ||
|
||
@Override | ||
public Builder regionSet(RegionSet regionSet) { | ||
this.regionSet = regionSet; | ||
return this; | ||
} | ||
|
||
@Override | ||
public DatabaseAuthSchemeParams build() { | ||
return new DefaultDatabaseAuthSchemeParams(this); | ||
} | ||
} | ||
} |
69 changes: 69 additions & 0 deletions
69
...ware/amazon/awssdk/codegen/poet/auth/scheme/ops-auth-sigv4a-value-auth-scheme-params.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
package software.amazon.awssdk.services.database.auth.scheme; | ||
|
||
import software.amazon.awssdk.annotations.Generated; | ||
import software.amazon.awssdk.annotations.SdkPublicApi; | ||
import software.amazon.awssdk.http.auth.aws.signer.RegionSet; | ||
import software.amazon.awssdk.regions.Region; | ||
import software.amazon.awssdk.services.database.auth.scheme.internal.DefaultDatabaseAuthSchemeParams; | ||
import software.amazon.awssdk.utils.builder.CopyableBuilder; | ||
import software.amazon.awssdk.utils.builder.ToCopyableBuilder; | ||
|
||
/** | ||
* The parameters object used to resolve the auth schemes for the Database service. | ||
*/ | ||
@Generated("software.amazon.awssdk:codegen") | ||
@SdkPublicApi | ||
public interface DatabaseAuthSchemeParams extends ToCopyableBuilder<DatabaseAuthSchemeParams.Builder, DatabaseAuthSchemeParams> { | ||
/** | ||
* Get a new builder for creating a {@link DatabaseAuthSchemeParams}. | ||
*/ | ||
static Builder builder() { | ||
return DefaultDatabaseAuthSchemeParams.builder(); | ||
} | ||
|
||
/** | ||
* Returns the operation for which to resolve the auth scheme. | ||
*/ | ||
String operation(); | ||
|
||
/** | ||
* Returns the region. The region parameter may be used with the "aws.auth#sigv4" auth scheme. | ||
*/ | ||
Region region(); | ||
|
||
/** | ||
* Returns the RegionSet. The regionSet parameter may be used with the "aws.auth#sigv4a" auth scheme. | ||
*/ | ||
RegionSet regionSet(); | ||
|
||
/** | ||
* Returns a {@link Builder} to customize the parameters. | ||
*/ | ||
Builder toBuilder(); | ||
|
||
/** | ||
* A builder for a {@link DatabaseAuthSchemeParams}. | ||
*/ | ||
interface Builder extends CopyableBuilder<Builder, DatabaseAuthSchemeParams> { | ||
/** | ||
* Set the operation for which to resolve the auth scheme. | ||
*/ | ||
Builder operation(String operation); | ||
|
||
/** | ||
* Set the region. The region parameter may be used with the "aws.auth#sigv4" auth scheme. | ||
*/ | ||
Builder region(Region region); | ||
|
||
/** | ||
* Set the RegionSet. The regionSet parameter may be used with the "aws.auth#sigv4a" auth scheme. | ||
*/ | ||
Builder regionSet(RegionSet regionSet); | ||
|
||
/** | ||
* Returns a {@link DatabaseAuthSchemeParams} object that is created from the properties that have been set on | ||
* the builder. | ||
*/ | ||
DatabaseAuthSchemeParams build(); | ||
} | ||
} |