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

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

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

/**
 * (experimental) Configuration of a fleet server process.
 * 

* 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.*;
 * ServerProcess serverProcess = ServerProcess.builder()
 *         .launchPath("launchPath")
 *         // the properties below are optional
 *         .concurrentExecutions(123)
 *         .parameters("parameters")
 *         .build();
 * 
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.104.0 (build e79254c)", date = "2024-12-27T17:02:12.144Z") @software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.gamelift.alpha.$Module.class, fqn = "@aws-cdk/aws-gamelift-alpha.ServerProcess") @software.amazon.jsii.Jsii.Proxy(ServerProcess.Jsii$Proxy.class) @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public interface ServerProcess extends software.amazon.jsii.JsiiSerializable { /** * (experimental) The location of a game build executable or the Realtime script file that contains the Init() function. *

* Game builds and Realtime scripts are installed on instances at the root: *

*

    *
  • Windows (custom game builds only): C:\game. Example: C:\game\MyGame\server.exe
  • *
  • Linux: /local/game. Examples: /local/game/MyGame/server.exe or /local/game/MyRealtimeScript.js
  • *
*/ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.lang.String getLaunchPath(); /** * (experimental) The number of server processes using this configuration that run concurrently on each instance. *

* Minimum is 1 *

* Default: 1 */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.Number getConcurrentExecutions() { return null; } /** * (experimental) An optional list of parameters to pass to the server executable or Realtime script on launch. *

* Default: no parameters */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getParameters() { return null; } /** * @return a {@link Builder} of {@link ServerProcess} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link ServerProcess} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { java.lang.String launchPath; java.lang.Number concurrentExecutions; java.lang.String parameters; /** * Sets the value of {@link ServerProcess#getLaunchPath} * @param launchPath The location of a game build executable or the Realtime script file that contains the Init() function. This parameter is required. * Game builds and Realtime scripts are installed on instances at the root: *

*

    *
  • Windows (custom game builds only): C:\game. Example: C:\game\MyGame\server.exe
  • *
  • Linux: /local/game. Examples: /local/game/MyGame/server.exe or /local/game/MyRealtimeScript.js
  • *
* @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder launchPath(java.lang.String launchPath) { this.launchPath = launchPath; return this; } /** * Sets the value of {@link ServerProcess#getConcurrentExecutions} * @param concurrentExecutions The number of server processes using this configuration that run concurrently on each instance. * Minimum is 1 * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder concurrentExecutions(java.lang.Number concurrentExecutions) { this.concurrentExecutions = concurrentExecutions; return this; } /** * Sets the value of {@link ServerProcess#getParameters} * @param parameters An optional list of parameters to pass to the server executable or Realtime script on launch. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder parameters(java.lang.String parameters) { this.parameters = parameters; return this; } /** * Builds the configured instance. * @return a new instance of {@link ServerProcess} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public ServerProcess build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link ServerProcess} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ServerProcess { private final java.lang.String launchPath; private final java.lang.Number concurrentExecutions; private final java.lang.String parameters; /** * 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.launchPath = software.amazon.jsii.Kernel.get(this, "launchPath", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.concurrentExecutions = software.amazon.jsii.Kernel.get(this, "concurrentExecutions", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); this.parameters = software.amazon.jsii.Kernel.get(this, "parameters", software.amazon.jsii.NativeType.forClass(java.lang.String.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.launchPath = java.util.Objects.requireNonNull(builder.launchPath, "launchPath is required"); this.concurrentExecutions = builder.concurrentExecutions; this.parameters = builder.parameters; } @Override public final java.lang.String getLaunchPath() { return this.launchPath; } @Override public final java.lang.Number getConcurrentExecutions() { return this.concurrentExecutions; } @Override public final java.lang.String getParameters() { return this.parameters; } @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("launchPath", om.valueToTree(this.getLaunchPath())); if (this.getConcurrentExecutions() != null) { data.set("concurrentExecutions", om.valueToTree(this.getConcurrentExecutions())); } if (this.getParameters() != null) { data.set("parameters", om.valueToTree(this.getParameters())); } 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.ServerProcess")); 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; ServerProcess.Jsii$Proxy that = (ServerProcess.Jsii$Proxy) o; if (!launchPath.equals(that.launchPath)) return false; if (this.concurrentExecutions != null ? !this.concurrentExecutions.equals(that.concurrentExecutions) : that.concurrentExecutions != null) return false; return this.parameters != null ? this.parameters.equals(that.parameters) : that.parameters == null; } @Override public final int hashCode() { int result = this.launchPath.hashCode(); result = 31 * result + (this.concurrentExecutions != null ? this.concurrentExecutions.hashCode() : 0); result = 31 * result + (this.parameters != null ? this.parameters.hashCode() : 0); return result; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy