
io.gs2.cdk.identifier.model.Statement Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gs2-java-cdk Show documentation
Show all versions of gs2-java-cdk Show documentation
Game Server Services CDK for Java
The newest version!
package io.gs2.cdk.identifier.model;
import java.util.*;
public class Statement {
String effect;
List actions;
public static Statement allow(
List actions
) {
var statement = new Statement();
statement.effect = "Allow";
statement.actions = actions;
return statement;
}
public static Statement allowAll() {
var statement = new Statement();
statement.effect = "Allow";
statement.actions = List.of("*");
return statement;
}
public static Statement deny(
List actions
) {
var statement = new Statement();
statement.effect = "Deny";
statement.actions = actions;
return statement;
}
public static Statement denyAll() {
var statement = new Statement();
statement.effect = "Deny";
statement.actions = List.of("*");
return statement;
}
public Statement action(String action) {
this.actions.add(action);
return this;
}
public Map properties() {
return new HashMap<>() {
{
put("Effect", effect);
put("Actions", actions);
put("Resources", List.of("*"));
}
};
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy