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

software.amazon.awscdk.services.gamelift.alpha.GameSessionQueueProps 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 Fleet gameSessionQueue.
 * 

* Example: *

*

 * BuildFleet fleet;
 * Alias alias;
 * GameSessionQueue queue = GameSessionQueue.Builder.create(this, "GameSessionQueue")
 *         .gameSessionQueueName("my-queue-name")
 *         .destinations(List.of(fleet))
 *         .build();
 * queue.addDestination(alias);
 * 
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.104.0 (build e79254c)", date = "2024-12-27T17:02:12.107Z") @software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.gamelift.alpha.$Module.class, fqn = "@aws-cdk/aws-gamelift-alpha.GameSessionQueueProps") @software.amazon.jsii.Jsii.Proxy(GameSessionQueueProps.Jsii$Proxy.class) @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public interface GameSessionQueueProps extends software.amazon.jsii.JsiiSerializable { /** * (experimental) A list of fleets and/or fleet alias that can be used to fulfill game session placement requests in the queue. *

* Destinations are listed in order of placement preference. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.util.List getDestinations(); /** * (experimental) Name of this gameSessionQueue. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.lang.String getGameSessionQueueName(); /** * (experimental) A list of locations where a queue is allowed to place new game sessions. *

* Locations are specified in the form of AWS Region codes, such as us-west-2. *

* For queues that have multi-location fleets, you can use a filter configuration allow placement with some, but not all of these locations. *

* Default: game sessions can be placed in any queue location */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.util.List getAllowedLocations() { return null; } /** * (experimental) Information to be added to all events that are related to this game session queue. *

* Default: no customer event data */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getCustomEventData() { return null; } /** * (experimental) An SNS topic is set up to receive game session placement notifications. *

* Default: no notification *

* @see https://docs.aws.amazon.com/gamelift/latest/developerguide/queue-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) A set of policies that act as a sliding cap on player latency. *

* FleetIQ works to deliver low latency for most players in a game session. * These policies ensure that no individual player can be placed into a game with unreasonably high latency. * Use multiple policies to gradually relax latency requirements a step at a time. * Multiple policies are applied based on their maximum allowed latency, starting with the lowest value. *

* Default: no player latency policy */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.util.List getPlayerLatencyPolicies() { return null; } /** * (experimental) Custom settings to use when prioritizing destinations and locations for game session placements. *

* This configuration replaces the FleetIQ default prioritization process. *

* Priority types that are not explicitly named will be automatically applied at the end of the prioritization process. *

* Default: no priority configuration */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.gamelift.alpha.PriorityConfiguration getPriorityConfiguration() { return null; } /** * (experimental) The maximum time, that a new game session placement request remains in the queue. *

* When a request exceeds this time, the game session placement changes to a TIMED_OUT status. *

* Default: 50 seconds */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.Duration getTimeout() { return null; } /** * @return a {@link Builder} of {@link GameSessionQueueProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link GameSessionQueueProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { java.util.List destinations; java.lang.String gameSessionQueueName; java.util.List allowedLocations; java.lang.String customEventData; software.amazon.awscdk.services.sns.ITopic notificationTarget; java.util.List playerLatencyPolicies; software.amazon.awscdk.services.gamelift.alpha.PriorityConfiguration priorityConfiguration; software.amazon.awscdk.Duration timeout; /** * Sets the value of {@link GameSessionQueueProps#getDestinations} * @param destinations A list of fleets and/or fleet alias that can be used to fulfill game session placement requests in the queue. This parameter is required. * Destinations are listed in order of placement preference. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder destinations(java.util.List destinations) { this.destinations = (java.util.List)destinations; return this; } /** * Sets the value of {@link GameSessionQueueProps#getGameSessionQueueName} * @param gameSessionQueueName Name of this gameSessionQueue. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder gameSessionQueueName(java.lang.String gameSessionQueueName) { this.gameSessionQueueName = gameSessionQueueName; return this; } /** * Sets the value of {@link GameSessionQueueProps#getAllowedLocations} * @param allowedLocations A list of locations where a queue is allowed to place new game sessions. * Locations are specified in the form of AWS Region codes, such as us-west-2. *

* For queues that have multi-location fleets, you can use a filter configuration allow placement with some, but not all of these locations. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder allowedLocations(java.util.List allowedLocations) { this.allowedLocations = allowedLocations; return this; } /** * Sets the value of {@link GameSessionQueueProps#getCustomEventData} * @param customEventData Information to be added to all events that are related to this game session queue. * @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 GameSessionQueueProps#getNotificationTarget} * @param notificationTarget An SNS topic is set up to receive game session placement 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 GameSessionQueueProps#getPlayerLatencyPolicies} * @param playerLatencyPolicies A set of policies that act as a sliding cap on player latency. * FleetIQ works to deliver low latency for most players in a game session. * These policies ensure that no individual player can be placed into a game with unreasonably high latency. * Use multiple policies to gradually relax latency requirements a step at a time. * Multiple policies are applied based on their maximum allowed latency, starting with the lowest value. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder playerLatencyPolicies(java.util.List playerLatencyPolicies) { this.playerLatencyPolicies = (java.util.List)playerLatencyPolicies; return this; } /** * Sets the value of {@link GameSessionQueueProps#getPriorityConfiguration} * @param priorityConfiguration Custom settings to use when prioritizing destinations and locations for game session placements. * This configuration replaces the FleetIQ default prioritization process. *

* Priority types that are not explicitly named will be automatically applied at the end of the prioritization process. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder priorityConfiguration(software.amazon.awscdk.services.gamelift.alpha.PriorityConfiguration priorityConfiguration) { this.priorityConfiguration = priorityConfiguration; return this; } /** * Sets the value of {@link GameSessionQueueProps#getTimeout} * @param timeout The maximum time, that a new game session placement request remains in the queue. * When a request exceeds this time, the game session placement changes to a TIMED_OUT status. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder timeout(software.amazon.awscdk.Duration timeout) { this.timeout = timeout; return this; } /** * Builds the configured instance. * @return a new instance of {@link GameSessionQueueProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public GameSessionQueueProps build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link GameSessionQueueProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements GameSessionQueueProps { private final java.util.List destinations; private final java.lang.String gameSessionQueueName; private final java.util.List allowedLocations; private final java.lang.String customEventData; private final software.amazon.awscdk.services.sns.ITopic notificationTarget; private final java.util.List playerLatencyPolicies; private final software.amazon.awscdk.services.gamelift.alpha.PriorityConfiguration priorityConfiguration; private final software.amazon.awscdk.Duration timeout; /** * 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.destinations = software.amazon.jsii.Kernel.get(this, "destinations", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.IGameSessionQueueDestination.class))); this.gameSessionQueueName = software.amazon.jsii.Kernel.get(this, "gameSessionQueueName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.allowedLocations = software.amazon.jsii.Kernel.get(this, "allowedLocations", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))); this.customEventData = software.amazon.jsii.Kernel.get(this, "customEventData", 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.playerLatencyPolicies = software.amazon.jsii.Kernel.get(this, "playerLatencyPolicies", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.PlayerLatencyPolicy.class))); this.priorityConfiguration = software.amazon.jsii.Kernel.get(this, "priorityConfiguration", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.PriorityConfiguration.class)); this.timeout = software.amazon.jsii.Kernel.get(this, "timeout", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.Duration.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.destinations = (java.util.List)java.util.Objects.requireNonNull(builder.destinations, "destinations is required"); this.gameSessionQueueName = java.util.Objects.requireNonNull(builder.gameSessionQueueName, "gameSessionQueueName is required"); this.allowedLocations = builder.allowedLocations; this.customEventData = builder.customEventData; this.notificationTarget = builder.notificationTarget; this.playerLatencyPolicies = (java.util.List)builder.playerLatencyPolicies; this.priorityConfiguration = builder.priorityConfiguration; this.timeout = builder.timeout; } @Override public final java.util.List getDestinations() { return this.destinations; } @Override public final java.lang.String getGameSessionQueueName() { return this.gameSessionQueueName; } @Override public final java.util.List getAllowedLocations() { return this.allowedLocations; } @Override public final java.lang.String getCustomEventData() { return this.customEventData; } @Override public final software.amazon.awscdk.services.sns.ITopic getNotificationTarget() { return this.notificationTarget; } @Override public final java.util.List getPlayerLatencyPolicies() { return this.playerLatencyPolicies; } @Override public final software.amazon.awscdk.services.gamelift.alpha.PriorityConfiguration getPriorityConfiguration() { return this.priorityConfiguration; } @Override public final software.amazon.awscdk.Duration getTimeout() { return this.timeout; } @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("destinations", om.valueToTree(this.getDestinations())); data.set("gameSessionQueueName", om.valueToTree(this.getGameSessionQueueName())); if (this.getAllowedLocations() != null) { data.set("allowedLocations", om.valueToTree(this.getAllowedLocations())); } if (this.getCustomEventData() != null) { data.set("customEventData", om.valueToTree(this.getCustomEventData())); } if (this.getNotificationTarget() != null) { data.set("notificationTarget", om.valueToTree(this.getNotificationTarget())); } if (this.getPlayerLatencyPolicies() != null) { data.set("playerLatencyPolicies", om.valueToTree(this.getPlayerLatencyPolicies())); } if (this.getPriorityConfiguration() != null) { data.set("priorityConfiguration", om.valueToTree(this.getPriorityConfiguration())); } if (this.getTimeout() != null) { data.set("timeout", om.valueToTree(this.getTimeout())); } 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.GameSessionQueueProps")); 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; GameSessionQueueProps.Jsii$Proxy that = (GameSessionQueueProps.Jsii$Proxy) o; if (!destinations.equals(that.destinations)) return false; if (!gameSessionQueueName.equals(that.gameSessionQueueName)) return false; if (this.allowedLocations != null ? !this.allowedLocations.equals(that.allowedLocations) : that.allowedLocations != null) return false; if (this.customEventData != null ? !this.customEventData.equals(that.customEventData) : that.customEventData != null) return false; if (this.notificationTarget != null ? !this.notificationTarget.equals(that.notificationTarget) : that.notificationTarget != null) return false; if (this.playerLatencyPolicies != null ? !this.playerLatencyPolicies.equals(that.playerLatencyPolicies) : that.playerLatencyPolicies != null) return false; if (this.priorityConfiguration != null ? !this.priorityConfiguration.equals(that.priorityConfiguration) : that.priorityConfiguration != null) return false; return this.timeout != null ? this.timeout.equals(that.timeout) : that.timeout == null; } @Override public final int hashCode() { int result = this.destinations.hashCode(); result = 31 * result + (this.gameSessionQueueName.hashCode()); result = 31 * result + (this.allowedLocations != null ? this.allowedLocations.hashCode() : 0); result = 31 * result + (this.customEventData != null ? this.customEventData.hashCode() : 0); result = 31 * result + (this.notificationTarget != null ? this.notificationTarget.hashCode() : 0); result = 31 * result + (this.playerLatencyPolicies != null ? this.playerLatencyPolicies.hashCode() : 0); result = 31 * result + (this.priorityConfiguration != null ? this.priorityConfiguration.hashCode() : 0); result = 31 * result + (this.timeout != null ? this.timeout.hashCode() : 0); return result; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy