software.amazon.awscdk.services.gamelift.alpha.IngressRule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gamelift-alpha Show documentation
Show all versions of gamelift-alpha Show documentation
The CDK Construct Library for AWS::GameLift
package software.amazon.awscdk.services.gamelift.alpha;
/**
* (experimental) A range of IP addresses and port settings that allow inbound traffic to connect to server processes on an instance in a fleet.
*
* New game sessions are assigned an IP address/port number combination, which must fall into the fleet's allowed ranges.
*
* Fleets with custom game builds must have permissions explicitly set.
* For Realtime Servers fleets, GameLift automatically opens two port ranges, one for TCP messaging and one for UDP.
*
* 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.*;
* IPeer peer;
* Port port;
* IngressRule ingressRule = IngressRule.builder()
* .port(port)
* .source(peer)
* .build();
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.104.0 (build e79254c)", date = "2024-12-27T17:02:12.129Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.gamelift.alpha.$Module.class, fqn = "@aws-cdk/aws-gamelift-alpha.IngressRule")
@software.amazon.jsii.Jsii.Proxy(IngressRule.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface IngressRule extends software.amazon.jsii.JsiiSerializable {
/**
* (experimental) The port range used for ingress traffic.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull software.amazon.awscdk.services.gamelift.alpha.Port getPort();
/**
* (experimental) A range of allowed IP addresses .
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull software.amazon.awscdk.services.gamelift.alpha.IPeer getSource();
/**
* @return a {@link Builder} of {@link IngressRule}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link IngressRule}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
software.amazon.awscdk.services.gamelift.alpha.Port port;
software.amazon.awscdk.services.gamelift.alpha.IPeer source;
/**
* Sets the value of {@link IngressRule#getPort}
* @param port The port range used for ingress traffic. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder port(software.amazon.awscdk.services.gamelift.alpha.Port port) {
this.port = port;
return this;
}
/**
* Sets the value of {@link IngressRule#getSource}
* @param source A range of allowed IP addresses . This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder source(software.amazon.awscdk.services.gamelift.alpha.IPeer source) {
this.source = source;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link IngressRule}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public IngressRule build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link IngressRule}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements IngressRule {
private final software.amazon.awscdk.services.gamelift.alpha.Port port;
private final software.amazon.awscdk.services.gamelift.alpha.IPeer source;
/**
* 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.port = software.amazon.jsii.Kernel.get(this, "port", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.Port.class));
this.source = software.amazon.jsii.Kernel.get(this, "source", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.IPeer.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.port = java.util.Objects.requireNonNull(builder.port, "port is required");
this.source = java.util.Objects.requireNonNull(builder.source, "source is required");
}
@Override
public final software.amazon.awscdk.services.gamelift.alpha.Port getPort() {
return this.port;
}
@Override
public final software.amazon.awscdk.services.gamelift.alpha.IPeer getSource() {
return this.source;
}
@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("port", om.valueToTree(this.getPort()));
data.set("source", om.valueToTree(this.getSource()));
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.IngressRule"));
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;
IngressRule.Jsii$Proxy that = (IngressRule.Jsii$Proxy) o;
if (!port.equals(that.port)) return false;
return this.source.equals(that.source);
}
@Override
public final int hashCode() {
int result = this.port.hashCode();
result = 31 * result + (this.source.hashCode());
return result;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy