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

software.amazon.awscdk.services.gamelift.alpha.MatchmakingConfigurationProps 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 Gamelift matchmaking configuration.
 * 

* Example: *

*

 * // The code below shows an example of how to instantiate this type.
 * // The values are placeholders you should change.
 * import software.amazon.awscdk.services.gamelift.alpha.*;
 * import software.amazon.awscdk.*;
 * import software.amazon.awscdk.services.sns.*;
 * MatchmakingRuleSet matchmakingRuleSet;
 * Topic topic;
 * MatchmakingConfigurationProps matchmakingConfigurationProps = MatchmakingConfigurationProps.builder()
 *         .matchmakingConfigurationName("matchmakingConfigurationName")
 *         .ruleSet(matchmakingRuleSet)
 *         // the properties below are optional
 *         .acceptanceTimeout(Duration.minutes(30))
 *         .customEventData("customEventData")
 *         .description("description")
 *         .notificationTarget(topic)
 *         .requestTimeout(Duration.minutes(30))
 *         .requireAcceptance(false)
 *         .build();
 * 
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.104.0 (build e79254c)", date = "2024-12-27T17:02:12.132Z") @software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.gamelift.alpha.$Module.class, fqn = "@aws-cdk/aws-gamelift-alpha.MatchmakingConfigurationProps") @software.amazon.jsii.Jsii.Proxy(MatchmakingConfigurationProps.Jsii$Proxy.class) @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public interface MatchmakingConfigurationProps extends software.amazon.jsii.JsiiSerializable { /** * (experimental) A unique identifier for the matchmaking configuration. *

* This name is used to identify the configuration associated with a matchmaking request or ticket. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.lang.String getMatchmakingConfigurationName(); /** * (experimental) A matchmaking rule set to use with this configuration. *

* A matchmaking configuration can only use rule sets that are defined in the same Region. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.gamelift.alpha.IMatchmakingRuleSet getRuleSet(); /** * (experimental) The length of time (in seconds) to wait for players to accept a proposed match, if acceptance is required. *

* Default: 300 seconds */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.Duration getAcceptanceTimeout() { return null; } /** * (experimental) Information to add to all events related to the matchmaking configuration. *

* Default: no custom data added to events */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getCustomEventData() { return null; } /** * (experimental) A human-readable description of the matchmaking configuration. *

* Default: no description is provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getDescription() { return null; } /** * (experimental) An SNS topic ARN that is set up to receive matchmaking notifications. *

* Default: no notification target *

* @see https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-notification.html */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.sns.ITopic getNotificationTarget() { return null; } /** * (experimental) 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. *

* Default: 300 seconds */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.Duration getRequestTimeout() { return null; } /** * (experimental) 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. *

* Default: Acceptance is not required */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.Boolean getRequireAcceptance() { return null; } /** * @return a {@link Builder} of {@link MatchmakingConfigurationProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link MatchmakingConfigurationProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { 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 MatchmakingConfigurationProps#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 MatchmakingConfigurationProps#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 MatchmakingConfigurationProps#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 MatchmakingConfigurationProps#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 MatchmakingConfigurationProps#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 MatchmakingConfigurationProps#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 MatchmakingConfigurationProps#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 MatchmakingConfigurationProps#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 MatchmakingConfigurationProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public MatchmakingConfigurationProps build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link MatchmakingConfigurationProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements MatchmakingConfigurationProps { 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.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}. */ protected Jsii$Proxy(final Builder builder) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); 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.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("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.MatchmakingConfigurationProps")); 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; MatchmakingConfigurationProps.Jsii$Proxy that = (MatchmakingConfigurationProps.Jsii$Proxy) o; 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.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