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

software.amazon.awssdk.services.gamelift.model.DescribeGameSessionDetailsRequest Maven / Gradle / Ivy

/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.gamelift.model;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Represents the input for a request action. *

*/ @Generated("software.amazon.awssdk:codegen") public final class DescribeGameSessionDetailsRequest extends GameLiftRequest implements ToCopyableBuilder { private static final SdkField FLEET_ID_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(DescribeGameSessionDetailsRequest::fleetId)).setter(setter(Builder::fleetId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FleetId").build()).build(); private static final SdkField GAME_SESSION_ID_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(DescribeGameSessionDetailsRequest::gameSessionId)).setter(setter(Builder::gameSessionId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("GameSessionId").build()).build(); private static final SdkField ALIAS_ID_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(DescribeGameSessionDetailsRequest::aliasId)).setter(setter(Builder::aliasId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AliasId").build()).build(); private static final SdkField STATUS_FILTER_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(DescribeGameSessionDetailsRequest::statusFilter)).setter(setter(Builder::statusFilter)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StatusFilter").build()).build(); private static final SdkField LIMIT_FIELD = SdkField. builder(MarshallingType.INTEGER) .getter(getter(DescribeGameSessionDetailsRequest::limit)).setter(setter(Builder::limit)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Limit").build()).build(); private static final SdkField NEXT_TOKEN_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(DescribeGameSessionDetailsRequest::nextToken)).setter(setter(Builder::nextToken)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NextToken").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(FLEET_ID_FIELD, GAME_SESSION_ID_FIELD, ALIAS_ID_FIELD, STATUS_FILTER_FIELD, LIMIT_FIELD, NEXT_TOKEN_FIELD)); private final String fleetId; private final String gameSessionId; private final String aliasId; private final String statusFilter; private final Integer limit; private final String nextToken; private DescribeGameSessionDetailsRequest(BuilderImpl builder) { super(builder); this.fleetId = builder.fleetId; this.gameSessionId = builder.gameSessionId; this.aliasId = builder.aliasId; this.statusFilter = builder.statusFilter; this.limit = builder.limit; this.nextToken = builder.nextToken; } /** *

* A unique identifier for a fleet to retrieve all game sessions active on the fleet. You can use either the fleet * ID or ARN value. *

* * @return A unique identifier for a fleet to retrieve all game sessions active on the fleet. You can use either the * fleet ID or ARN value. */ public String fleetId() { return fleetId; } /** *

* A unique identifier for the game session to retrieve. *

* * @return A unique identifier for the game session to retrieve. */ public String gameSessionId() { return gameSessionId; } /** *

* A unique identifier for an alias associated with the fleet to retrieve all game sessions for. You can use either * the alias ID or ARN value. *

* * @return A unique identifier for an alias associated with the fleet to retrieve all game sessions for. You can use * either the alias ID or ARN value. */ public String aliasId() { return aliasId; } /** *

* Game session status to filter results on. Possible game session statuses include ACTIVE, * TERMINATED, ACTIVATING and TERMINATING (the last two are transitory). *

* * @return Game session status to filter results on. Possible game session statuses include ACTIVE, * TERMINATED, ACTIVATING and TERMINATING (the last two are * transitory). */ public String statusFilter() { return statusFilter; } /** *

* The maximum number of results to return. Use this parameter with NextToken to get results as a set * of sequential pages. *

* * @return The maximum number of results to return. Use this parameter with NextToken to get results as * a set of sequential pages. */ public Integer limit() { return limit; } /** *

* Token that indicates the start of the next sequential page of results. Use the token that is returned with a * previous call to this action. To start at the beginning of the result set, do not specify a value. *

* * @return Token that indicates the start of the next sequential page of results. Use the token that is returned * with a previous call to this action. To start at the beginning of the result set, do not specify a value. */ public String nextToken() { return nextToken; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(fleetId()); hashCode = 31 * hashCode + Objects.hashCode(gameSessionId()); hashCode = 31 * hashCode + Objects.hashCode(aliasId()); hashCode = 31 * hashCode + Objects.hashCode(statusFilter()); hashCode = 31 * hashCode + Objects.hashCode(limit()); hashCode = 31 * hashCode + Objects.hashCode(nextToken()); return hashCode; } @Override public boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof DescribeGameSessionDetailsRequest)) { return false; } DescribeGameSessionDetailsRequest other = (DescribeGameSessionDetailsRequest) obj; return Objects.equals(fleetId(), other.fleetId()) && Objects.equals(gameSessionId(), other.gameSessionId()) && Objects.equals(aliasId(), other.aliasId()) && Objects.equals(statusFilter(), other.statusFilter()) && Objects.equals(limit(), other.limit()) && Objects.equals(nextToken(), other.nextToken()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public String toString() { return ToString.builder("DescribeGameSessionDetailsRequest").add("FleetId", fleetId()) .add("GameSessionId", gameSessionId()).add("AliasId", aliasId()).add("StatusFilter", statusFilter()) .add("Limit", limit()).add("NextToken", nextToken()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "FleetId": return Optional.ofNullable(clazz.cast(fleetId())); case "GameSessionId": return Optional.ofNullable(clazz.cast(gameSessionId())); case "AliasId": return Optional.ofNullable(clazz.cast(aliasId())); case "StatusFilter": return Optional.ofNullable(clazz.cast(statusFilter())); case "Limit": return Optional.ofNullable(clazz.cast(limit())); case "NextToken": return Optional.ofNullable(clazz.cast(nextToken())); default: return Optional.empty(); } } @Override public List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((DescribeGameSessionDetailsRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends GameLiftRequest.Builder, SdkPojo, CopyableBuilder { /** *

* A unique identifier for a fleet to retrieve all game sessions active on the fleet. You can use either the * fleet ID or ARN value. *

* * @param fleetId * A unique identifier for a fleet to retrieve all game sessions active on the fleet. You can use either * the fleet ID or ARN value. * @return Returns a reference to this object so that method calls can be chained together. */ Builder fleetId(String fleetId); /** *

* A unique identifier for the game session to retrieve. *

* * @param gameSessionId * A unique identifier for the game session to retrieve. * @return Returns a reference to this object so that method calls can be chained together. */ Builder gameSessionId(String gameSessionId); /** *

* A unique identifier for an alias associated with the fleet to retrieve all game sessions for. You can use * either the alias ID or ARN value. *

* * @param aliasId * A unique identifier for an alias associated with the fleet to retrieve all game sessions for. You can * use either the alias ID or ARN value. * @return Returns a reference to this object so that method calls can be chained together. */ Builder aliasId(String aliasId); /** *

* Game session status to filter results on. Possible game session statuses include ACTIVE, * TERMINATED, ACTIVATING and TERMINATING (the last two are transitory). *

* * @param statusFilter * Game session status to filter results on. Possible game session statuses include ACTIVE, * TERMINATED, ACTIVATING and TERMINATING (the last two are * transitory). * @return Returns a reference to this object so that method calls can be chained together. */ Builder statusFilter(String statusFilter); /** *

* The maximum number of results to return. Use this parameter with NextToken to get results as a * set of sequential pages. *

* * @param limit * The maximum number of results to return. Use this parameter with NextToken to get results * as a set of sequential pages. * @return Returns a reference to this object so that method calls can be chained together. */ Builder limit(Integer limit); /** *

* Token that indicates the start of the next sequential page of results. Use the token that is returned with a * previous call to this action. To start at the beginning of the result set, do not specify a value. *

* * @param nextToken * Token that indicates the start of the next sequential page of results. Use the token that is returned * with a previous call to this action. To start at the beginning of the result set, do not specify a * value. * @return Returns a reference to this object so that method calls can be chained together. */ Builder nextToken(String nextToken); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends GameLiftRequest.BuilderImpl implements Builder { private String fleetId; private String gameSessionId; private String aliasId; private String statusFilter; private Integer limit; private String nextToken; private BuilderImpl() { } private BuilderImpl(DescribeGameSessionDetailsRequest model) { super(model); fleetId(model.fleetId); gameSessionId(model.gameSessionId); aliasId(model.aliasId); statusFilter(model.statusFilter); limit(model.limit); nextToken(model.nextToken); } public final String getFleetId() { return fleetId; } @Override public final Builder fleetId(String fleetId) { this.fleetId = fleetId; return this; } public final void setFleetId(String fleetId) { this.fleetId = fleetId; } public final String getGameSessionId() { return gameSessionId; } @Override public final Builder gameSessionId(String gameSessionId) { this.gameSessionId = gameSessionId; return this; } public final void setGameSessionId(String gameSessionId) { this.gameSessionId = gameSessionId; } public final String getAliasId() { return aliasId; } @Override public final Builder aliasId(String aliasId) { this.aliasId = aliasId; return this; } public final void setAliasId(String aliasId) { this.aliasId = aliasId; } public final String getStatusFilter() { return statusFilter; } @Override public final Builder statusFilter(String statusFilter) { this.statusFilter = statusFilter; return this; } public final void setStatusFilter(String statusFilter) { this.statusFilter = statusFilter; } public final Integer getLimit() { return limit; } @Override public final Builder limit(Integer limit) { this.limit = limit; return this; } public final void setLimit(Integer limit) { this.limit = limit; } public final String getNextToken() { return nextToken; } @Override public final Builder nextToken(String nextToken) { this.nextToken = nextToken; return this; } public final void setNextToken(String nextToken) { this.nextToken = nextToken; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public DescribeGameSessionDetailsRequest build() { return new DescribeGameSessionDetailsRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy