
io.gs2.cdk.core.model.CdkResource 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.core.model;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
abstract public class CdkResource {
public String resourceName;
List dependsOn;
public CdkResource(
String resourceName
) {
this.resourceName = resourceName;
this.dependsOn = new ArrayList<>();
}
public CdkResource addDependsOn(
CdkResource resource
) {
this.dependsOn.add(resource.resourceName);
return this;
}
abstract public String resourceType();
abstract public Map properties();
public Map template() {
return new HashMap<>() {
{
put("Type", resourceType());
put("Properties", properties());
put("DependsOn", dependsOn);
}
};
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy