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

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

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

/**
 * (experimental) Properties for a new queued matchmaking configuration.
 * 

* Example: *

*

 * GameSessionQueue queue;
 * MatchmakingRuleSet ruleSet;
 * QueuedMatchmakingConfiguration.Builder.create(this, "QueuedMatchmakingConfiguration")
 *         .matchmakingConfigurationName("test-queued-config-name")
 *         .gameSessionQueues(List.of(queue))
 *         .ruleSet(ruleSet)
 *         .build();
 * 
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.104.0 (build e79254c)", date = "2024-12-27T17:02:12.139Z") @software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.gamelift.alpha.$Module.class, fqn = "@aws-cdk/aws-gamelift-alpha.QueuedMatchmakingConfigurationProps") @software.amazon.jsii.Jsii.Proxy(QueuedMatchmakingConfigurationProps.Jsii$Proxy.class) @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public interface QueuedMatchmakingConfigurationProps extends software.amazon.jsii.JsiiSerializable, software.amazon.awscdk.services.gamelift.alpha.MatchmakingConfigurationProps { /** * (experimental) Queues are used to start new GameLift-hosted game sessions for matches that are created with this matchmaking configuration. *

* Queues can be located in any Region. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.util.List getGameSessionQueues(); /** * (experimental) The number of player slots in a match to keep open for future players. *

* For example, if the configuration's rule set specifies a match for a single 12-person team, and the additional player count is set to 2, only 10 players are selected for the match. *

* Default: no additional player slots */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.Number getAdditionalPlayerCount() { return null; } /** * (experimental) A set of custom properties for a game session, formatted as key-value pairs. *

* These properties are passed to a game server process with a request to start a new game session. *

* Default: no additional game properties *

* @see https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.util.List getGameProperties() { return null; } /** * (experimental) A set of custom game session properties, formatted as a single string value. *

* This data is passed to a game server process with a request to start a new game session. *

* Default: no additional game session data *

* @see https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getGameSessionData() { return null; } /** * (experimental) The method used to backfill game sessions that are created with this matchmaking configuration. *

*

    *
  • Choose manual when your game manages backfill requests manually or does not use the match backfill feature.
  • *
  • Otherwise backfill is settled to automatic to have GameLift create a StartMatchBackfill request whenever a game session has one or more open slots.
  • *
*

* Default: automatic backfill mode *

* @see https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-backfill.html */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.Boolean getManualBackfillMode() { return null; } /** * @return a {@link Builder} of {@link QueuedMatchmakingConfigurationProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link QueuedMatchmakingConfigurationProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { java.util.List gameSessionQueues; java.lang.Number additionalPlayerCount; java.util.List gameProperties; java.lang.String gameSessionData; java.lang.Boolean manualBackfillMode; java.lang.String matchmakingConfigurationName; software.amazon.awscdk.services.gamelift.alpha.IMatchmakingRuleSet ruleSet; software.amazon.awscdk.Duration acceptanceTimeout; java.lang.String customEventData; java.lang.String description; software.amazon.awscdk.services.sns.ITopic notificationTarget; software.amazon.awscdk.Duration requestTimeout; java.lang.Boolean requireAcceptance; /** * Sets the value of {@link QueuedMatchmakingConfigurationProps#getGameSessionQueues} * @param gameSessionQueues Queues are used to start new GameLift-hosted game sessions for matches that are created with this matchmaking configuration. This parameter is required. * Queues can be located in any Region. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder gameSessionQueues(java.util.List gameSessionQueues) { this.gameSessionQueues = (java.util.List)gameSessionQueues; return this; } /** * Sets the value of {@link QueuedMatchmakingConfigurationProps#getAdditionalPlayerCount} * @param additionalPlayerCount The number of player slots in a match to keep open for future players. * For example, if the configuration's rule set specifies a match for a single 12-person team, and the additional player count is set to 2, only 10 players are selected for the match. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder additionalPlayerCount(java.lang.Number additionalPlayerCount) { this.additionalPlayerCount = additionalPlayerCount; return this; } /** * Sets the value of {@link QueuedMatchmakingConfigurationProps#getGameProperties} * @param gameProperties A set of custom properties for a game session, formatted as key-value pairs. * These properties are passed to a game server process with a request to start a new game session. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder gameProperties(java.util.List gameProperties) { this.gameProperties = (java.util.List)gameProperties; return this; } /** * Sets the value of {@link QueuedMatchmakingConfigurationProps#getGameSessionData} * @param gameSessionData A set of custom game session properties, formatted as a single string value. * This data is passed to a game server process with a request to start a new game session. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder gameSessionData(java.lang.String gameSessionData) { this.gameSessionData = gameSessionData; return this; } /** * Sets the value of {@link QueuedMatchmakingConfigurationProps#getManualBackfillMode} * @param manualBackfillMode The method used to backfill game sessions that are created with this matchmaking configuration. *

    *
  • Choose manual when your game manages backfill requests manually or does not use the match backfill feature.
  • *
  • Otherwise backfill is settled to automatic to have GameLift create a StartMatchBackfill request whenever a game session has one or more open slots.
  • *
* @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder manualBackfillMode(java.lang.Boolean manualBackfillMode) { this.manualBackfillMode = manualBackfillMode; return this; } /** * Sets the value of {@link QueuedMatchmakingConfigurationProps#getMatchmakingConfigurationName} * @param matchmakingConfigurationName A unique identifier for the matchmaking configuration. This parameter is required. * This name is used to identify the configuration associated with a matchmaking request or ticket. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder matchmakingConfigurationName(java.lang.String matchmakingConfigurationName) { this.matchmakingConfigurationName = matchmakingConfigurationName; return this; } /** * Sets the value of {@link QueuedMatchmakingConfigurationProps#getRuleSet} * @param ruleSet A matchmaking rule set to use with this configuration. This parameter is required. * A matchmaking configuration can only use rule sets that are defined in the same Region. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder ruleSet(software.amazon.awscdk.services.gamelift.alpha.IMatchmakingRuleSet ruleSet) { this.ruleSet = ruleSet; return this; } /** * Sets the value of {@link QueuedMatchmakingConfigurationProps#getAcceptanceTimeout} * @param acceptanceTimeout The length of time (in seconds) to wait for players to accept a proposed match, if acceptance is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder acceptanceTimeout(software.amazon.awscdk.Duration acceptanceTimeout) { this.acceptanceTimeout = acceptanceTimeout; return this; } /** * Sets the value of {@link QueuedMatchmakingConfigurationProps#getCustomEventData} * @param customEventData Information to add to all events related to the matchmaking configuration. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder customEventData(java.lang.String customEventData) { this.customEventData = customEventData; return this; } /** * Sets the value of {@link QueuedMatchmakingConfigurationProps#getDescription} * @param description A human-readable description of the matchmaking configuration. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder description(java.lang.String description) { this.description = description; return this; } /** * Sets the value of {@link QueuedMatchmakingConfigurationProps#getNotificationTarget} * @param notificationTarget An SNS topic ARN that is set up to receive matchmaking notifications. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder notificationTarget(software.amazon.awscdk.services.sns.ITopic notificationTarget) { this.notificationTarget = notificationTarget; return this; } /** * Sets the value of {@link QueuedMatchmakingConfigurationProps#getRequestTimeout} * @param requestTimeout The maximum duration, that a matchmaking ticket can remain in process before timing out. * Requests that fail due to timing out can be resubmitted as needed. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder requestTimeout(software.amazon.awscdk.Duration requestTimeout) { this.requestTimeout = requestTimeout; return this; } /** * Sets the value of {@link QueuedMatchmakingConfigurationProps#getRequireAcceptance} * @param requireAcceptance A flag that determines whether a match that was created with this configuration must be accepted by the matched players. * With this option enabled, matchmaking tickets use the status REQUIRES_ACCEPTANCE to indicate when a completed potential match is waiting for player acceptance. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder requireAcceptance(java.lang.Boolean requireAcceptance) { this.requireAcceptance = requireAcceptance; return this; } /** * Builds the configured instance. * @return a new instance of {@link QueuedMatchmakingConfigurationProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public QueuedMatchmakingConfigurationProps build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link QueuedMatchmakingConfigurationProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements QueuedMatchmakingConfigurationProps { private final java.util.List gameSessionQueues; private final java.lang.Number additionalPlayerCount; private final java.util.List gameProperties; private final java.lang.String gameSessionData; private final java.lang.Boolean manualBackfillMode; private final java.lang.String matchmakingConfigurationName; private final software.amazon.awscdk.services.gamelift.alpha.IMatchmakingRuleSet ruleSet; private final software.amazon.awscdk.Duration acceptanceTimeout; private final java.lang.String customEventData; private final java.lang.String description; private final software.amazon.awscdk.services.sns.ITopic notificationTarget; private final software.amazon.awscdk.Duration requestTimeout; private final java.lang.Boolean requireAcceptance; /** * Constructor that initializes the object based on values retrieved from the JsiiObject. * @param objRef Reference to the JSII managed object. */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); this.gameSessionQueues = software.amazon.jsii.Kernel.get(this, "gameSessionQueues", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.IGameSessionQueue.class))); this.additionalPlayerCount = software.amazon.jsii.Kernel.get(this, "additionalPlayerCount", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); this.gameProperties = software.amazon.jsii.Kernel.get(this, "gameProperties", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.GameProperty.class))); this.gameSessionData = software.amazon.jsii.Kernel.get(this, "gameSessionData", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.manualBackfillMode = software.amazon.jsii.Kernel.get(this, "manualBackfillMode", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); this.matchmakingConfigurationName = software.amazon.jsii.Kernel.get(this, "matchmakingConfigurationName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.ruleSet = software.amazon.jsii.Kernel.get(this, "ruleSet", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.IMatchmakingRuleSet.class)); this.acceptanceTimeout = software.amazon.jsii.Kernel.get(this, "acceptanceTimeout", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.Duration.class)); this.customEventData = software.amazon.jsii.Kernel.get(this, "customEventData", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.description = software.amazon.jsii.Kernel.get(this, "description", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.notificationTarget = software.amazon.jsii.Kernel.get(this, "notificationTarget", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.sns.ITopic.class)); this.requestTimeout = software.amazon.jsii.Kernel.get(this, "requestTimeout", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.Duration.class)); this.requireAcceptance = software.amazon.jsii.Kernel.get(this, "requireAcceptance", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ @SuppressWarnings("unchecked") protected Jsii$Proxy(final Builder builder) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.gameSessionQueues = (java.util.List)java.util.Objects.requireNonNull(builder.gameSessionQueues, "gameSessionQueues is required"); this.additionalPlayerCount = builder.additionalPlayerCount; this.gameProperties = (java.util.List)builder.gameProperties; this.gameSessionData = builder.gameSessionData; this.manualBackfillMode = builder.manualBackfillMode; this.matchmakingConfigurationName = java.util.Objects.requireNonNull(builder.matchmakingConfigurationName, "matchmakingConfigurationName is required"); this.ruleSet = java.util.Objects.requireNonNull(builder.ruleSet, "ruleSet is required"); this.acceptanceTimeout = builder.acceptanceTimeout; this.customEventData = builder.customEventData; this.description = builder.description; this.notificationTarget = builder.notificationTarget; this.requestTimeout = builder.requestTimeout; this.requireAcceptance = builder.requireAcceptance; } @Override public final java.util.List getGameSessionQueues() { return this.gameSessionQueues; } @Override public final java.lang.Number getAdditionalPlayerCount() { return this.additionalPlayerCount; } @Override public final java.util.List getGameProperties() { return this.gameProperties; } @Override public final java.lang.String getGameSessionData() { return this.gameSessionData; } @Override public final java.lang.Boolean getManualBackfillMode() { return this.manualBackfillMode; } @Override public final java.lang.String getMatchmakingConfigurationName() { return this.matchmakingConfigurationName; } @Override public final software.amazon.awscdk.services.gamelift.alpha.IMatchmakingRuleSet getRuleSet() { return this.ruleSet; } @Override public final software.amazon.awscdk.Duration getAcceptanceTimeout() { return this.acceptanceTimeout; } @Override public final java.lang.String getCustomEventData() { return this.customEventData; } @Override public final java.lang.String getDescription() { return this.description; } @Override public final software.amazon.awscdk.services.sns.ITopic getNotificationTarget() { return this.notificationTarget; } @Override public final software.amazon.awscdk.Duration getRequestTimeout() { return this.requestTimeout; } @Override public final java.lang.Boolean getRequireAcceptance() { return this.requireAcceptance; } @Override @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); data.set("gameSessionQueues", om.valueToTree(this.getGameSessionQueues())); if (this.getAdditionalPlayerCount() != null) { data.set("additionalPlayerCount", om.valueToTree(this.getAdditionalPlayerCount())); } if (this.getGameProperties() != null) { data.set("gameProperties", om.valueToTree(this.getGameProperties())); } if (this.getGameSessionData() != null) { data.set("gameSessionData", om.valueToTree(this.getGameSessionData())); } if (this.getManualBackfillMode() != null) { data.set("manualBackfillMode", om.valueToTree(this.getManualBackfillMode())); } data.set("matchmakingConfigurationName", om.valueToTree(this.getMatchmakingConfigurationName())); data.set("ruleSet", om.valueToTree(this.getRuleSet())); if (this.getAcceptanceTimeout() != null) { data.set("acceptanceTimeout", om.valueToTree(this.getAcceptanceTimeout())); } if (this.getCustomEventData() != null) { data.set("customEventData", om.valueToTree(this.getCustomEventData())); } if (this.getDescription() != null) { data.set("description", om.valueToTree(this.getDescription())); } if (this.getNotificationTarget() != null) { data.set("notificationTarget", om.valueToTree(this.getNotificationTarget())); } if (this.getRequestTimeout() != null) { data.set("requestTimeout", om.valueToTree(this.getRequestTimeout())); } if (this.getRequireAcceptance() != null) { data.set("requireAcceptance", om.valueToTree(this.getRequireAcceptance())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("@aws-cdk/aws-gamelift-alpha.QueuedMatchmakingConfigurationProps")); struct.set("data", data); final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); obj.set("$jsii.struct", struct); return obj; } @Override public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; QueuedMatchmakingConfigurationProps.Jsii$Proxy that = (QueuedMatchmakingConfigurationProps.Jsii$Proxy) o; if (!gameSessionQueues.equals(that.gameSessionQueues)) return false; if (this.additionalPlayerCount != null ? !this.additionalPlayerCount.equals(that.additionalPlayerCount) : that.additionalPlayerCount != null) return false; if (this.gameProperties != null ? !this.gameProperties.equals(that.gameProperties) : that.gameProperties != null) return false; if (this.gameSessionData != null ? !this.gameSessionData.equals(that.gameSessionData) : that.gameSessionData != null) return false; if (this.manualBackfillMode != null ? !this.manualBackfillMode.equals(that.manualBackfillMode) : that.manualBackfillMode != null) return false; if (!matchmakingConfigurationName.equals(that.matchmakingConfigurationName)) return false; if (!ruleSet.equals(that.ruleSet)) return false; if (this.acceptanceTimeout != null ? !this.acceptanceTimeout.equals(that.acceptanceTimeout) : that.acceptanceTimeout != null) return false; if (this.customEventData != null ? !this.customEventData.equals(that.customEventData) : that.customEventData != null) return false; if (this.description != null ? !this.description.equals(that.description) : that.description != null) return false; if (this.notificationTarget != null ? !this.notificationTarget.equals(that.notificationTarget) : that.notificationTarget != null) return false; if (this.requestTimeout != null ? !this.requestTimeout.equals(that.requestTimeout) : that.requestTimeout != null) return false; return this.requireAcceptance != null ? this.requireAcceptance.equals(that.requireAcceptance) : that.requireAcceptance == null; } @Override public final int hashCode() { int result = this.gameSessionQueues.hashCode(); result = 31 * result + (this.additionalPlayerCount != null ? this.additionalPlayerCount.hashCode() : 0); result = 31 * result + (this.gameProperties != null ? this.gameProperties.hashCode() : 0); result = 31 * result + (this.gameSessionData != null ? this.gameSessionData.hashCode() : 0); result = 31 * result + (this.manualBackfillMode != null ? this.manualBackfillMode.hashCode() : 0); result = 31 * result + (this.matchmakingConfigurationName.hashCode()); result = 31 * result + (this.ruleSet.hashCode()); result = 31 * result + (this.acceptanceTimeout != null ? this.acceptanceTimeout.hashCode() : 0); result = 31 * result + (this.customEventData != null ? this.customEventData.hashCode() : 0); result = 31 * result + (this.description != null ? this.description.hashCode() : 0); result = 31 * result + (this.notificationTarget != null ? this.notificationTarget.hashCode() : 0); result = 31 * result + (this.requestTimeout != null ? this.requestTimeout.hashCode() : 0); result = 31 * result + (this.requireAcceptance != null ? this.requireAcceptance.hashCode() : 0); return result; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy