All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awscdk.services.gamelift.alpha.RuleSetContent Maven / Gradle / Ivy

There is a newer version: 2.170.0-alpha.0
Show newest version
package software.amazon.awscdk.services.gamelift.alpha;

/**
 * (experimental) The rule set determines the two key elements of a match: your game's team structure and size, and how to group players together for the best possible match.
 * 

* For example, a rule set might describe a match like this: *

*

    *
  • Create a match with two teams of five players each, one team is the defenders and the other team the invaders.
  • *
  • A team can have novice and experienced players, but the average skill of the two teams must be within 10 points of each other.
  • *
  • If no match is made after 30 seconds, gradually relax the skill requirements.
  • *
*

* Example: *

*

 * MatchmakingRuleSet.Builder.create(this, "RuleSet")
 *         .matchmakingRuleSetName("my-test-ruleset")
 *         .content(RuleSetContent.fromJsonFile(join(__dirname, "my-ruleset", "ruleset.json")))
 *         .build();
 * 
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.104.0 (build e79254c)", date = "2024-12-27T17:02:12.141Z") @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.gamelift.alpha.$Module.class, fqn = "@aws-cdk/aws-gamelift-alpha.RuleSetContent") public class RuleSetContent extends software.amazon.jsii.JsiiObject implements software.amazon.awscdk.services.gamelift.alpha.IRuleSetContent { protected RuleSetContent(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected RuleSetContent(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { super(initializationMode); } /** * @param props This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public RuleSetContent(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.gamelift.alpha.RuleSetContentProps props) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(props, "props is required") }); } /** * (experimental) Inline body for Matchmaking ruleSet. *

* @return RuleSetContent with inline code. * @param body The actual ruleSet body (maximum 65535 characters). This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.gamelift.alpha.IRuleSetContent fromInline(final @org.jetbrains.annotations.NotNull java.lang.String body) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.gamelift.alpha.RuleSetContent.class, "fromInline", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.IRuleSetContent.class), new Object[] { java.util.Objects.requireNonNull(body, "body is required") }); } /** * (experimental) Matchmaking ruleSet body from a file. *

* @return RuleSetContentBase based on JSON file content. * @param path The path to the ruleSet body file. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.gamelift.alpha.IRuleSetContent fromJsonFile(final @org.jetbrains.annotations.NotNull java.lang.String path) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.gamelift.alpha.RuleSetContent.class, "fromJsonFile", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.IRuleSetContent.class), new Object[] { java.util.Objects.requireNonNull(path, "path is required") }); } /** * (experimental) Called when the matchmaking ruleSet is initialized to allow this object to bind to the stack and add resources. *

* @param _scope The binding scope. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.gamelift.alpha.RuleSetBodyConfig bind(final @org.jetbrains.annotations.NotNull software.constructs.Construct _scope) { return software.amazon.jsii.Kernel.call(this, "bind", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.RuleSetBodyConfig.class), new Object[] { java.util.Objects.requireNonNull(_scope, "_scope is required") }); } /** * (experimental) RuleSet body content. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.gamelift.alpha.IRuleSetBody getContent() { return software.amazon.jsii.Kernel.get(this, "content", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.IRuleSetBody.class)); } /** * (experimental) A fluent builder for {@link software.amazon.awscdk.services.gamelift.alpha.RuleSetContent}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { /** * @return a new instance of {@link Builder}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static Builder create() { return new Builder(); } private final software.amazon.awscdk.services.gamelift.alpha.RuleSetContentProps.Builder props; private Builder() { this.props = new software.amazon.awscdk.services.gamelift.alpha.RuleSetContentProps.Builder(); } /** * (experimental) RuleSet body content. *

* Default: use a default empty RuleSet body *

* @return {@code this} * @param content RuleSet body content. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder content(final software.amazon.awscdk.services.gamelift.alpha.IRuleSetBody content) { this.props.content(content); return this; } /** * @return a newly built instance of {@link software.amazon.awscdk.services.gamelift.alpha.RuleSetContent}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public software.amazon.awscdk.services.gamelift.alpha.RuleSetContent build() { return new software.amazon.awscdk.services.gamelift.alpha.RuleSetContent( this.props.build() ); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy