Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #356 from commercetools/gen-sdk-updates
- Loading branch information
Showing
13 changed files
with
272 additions
and
106 deletions.
There are no files selected for viewing
74 changes: 74 additions & 0 deletions
74
.../main/java-generated/com/commercetools/api/models/subscription/AwsAuthenticationMode.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,74 @@ | ||
|
||
package com.commercetools.api.models.subscription; | ||
|
||
import java.util.Arrays; | ||
import java.util.Optional; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonValue; | ||
|
||
import io.vrap.rmf.base.client.utils.Generated; | ||
|
||
/** | ||
* <p>Defines the method of authentication for AWS SQS and SNS Destinations. Subscriptions with <code>Credentials</code> authentication mode are authenticated using an <code>accessKey</code> and <code>accessSecret</code> pair. Subscriptions with <code>IAM</code> authentication mode are authenticated using Identity and Access Management (IAM). In this case, the user <code>arn:aws:iam::362576667341:user/subscriptions</code> requires permissions to send messages to the queue or publish to the topic. This is the recommended <code>authenticationMode</code>, as it doesn't require additional key management.</p> | ||
*/ | ||
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") | ||
public interface AwsAuthenticationMode { | ||
|
||
AwsAuthenticationMode CREDENTIALS = AwsAuthenticationModeEnum.CREDENTIALS; | ||
|
||
AwsAuthenticationMode IAM = AwsAuthenticationModeEnum.IAM; | ||
|
||
enum AwsAuthenticationModeEnum implements AwsAuthenticationMode { | ||
CREDENTIALS("Credentials"), | ||
|
||
IAM("IAM"); | ||
private final String jsonName; | ||
|
||
private AwsAuthenticationModeEnum(final String jsonName) { | ||
this.jsonName = jsonName; | ||
} | ||
|
||
public String getJsonName() { | ||
return jsonName; | ||
} | ||
|
||
public String toString() { | ||
return jsonName; | ||
} | ||
} | ||
|
||
@JsonValue | ||
String getJsonName(); | ||
|
||
String name(); | ||
|
||
String toString(); | ||
|
||
@JsonCreator | ||
public static AwsAuthenticationMode findEnum(String value) { | ||
return findEnumViaJsonName(value).orElse(new AwsAuthenticationMode() { | ||
@Override | ||
public String getJsonName() { | ||
return value; | ||
} | ||
|
||
@Override | ||
public String name() { | ||
return value.toUpperCase(); | ||
} | ||
|
||
public String toString() { | ||
return value; | ||
} | ||
}); | ||
} | ||
|
||
public static Optional<AwsAuthenticationMode> findEnumViaJsonName(String jsonName) { | ||
return Arrays.stream(values()).filter(t -> t.getJsonName().equals(jsonName)).findFirst(); | ||
} | ||
|
||
public static AwsAuthenticationMode[] values() { | ||
return AwsAuthenticationModeEnum.values(); | ||
} | ||
} |
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
Oops, something went wrong.