/* * Copyright 2018-2023 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 com.amazonaws.services.gamelift.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UpdateFleetAttributesRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* A unique identifier for the fleet to update attribute metadata for. You can use either the fleet ID or ARN value. *
*/ private String fleetId; /** ** A descriptive label that is associated with a fleet. Fleet names do not need to be unique. *
*/ private String name; /** ** A human-readable description of a fleet. *
*/ private String description; /** ** The game session protection policy to apply to all new instances created in this fleet. Instances that already * exist are not affected. You can set protection for individual instances using UpdateGameSession * . *
** NoProtection -- The game session can be terminated during a scale-down event. *
*
* FullProtection -- If the game session is in an ACTIVE
status, it cannot be terminated during
* a scale-down event.
*
* Policy settings that limit the number of game sessions an individual player can create over a span of time. *
*/ private ResourceCreationLimitPolicy resourceCreationLimitPolicy; /** ** The name of a metric group to add this fleet to. Use a metric group in Amazon CloudWatch to aggregate the metrics * from multiple fleets. Provide an existing metric group name, or create a new metric group by providing a new * name. A fleet can only be in one metric group at a time. *
*/ private java.util.List* Amazon GameLift Anywhere configuration options. *
*/ private AnywhereConfiguration anywhereConfiguration; /** ** A unique identifier for the fleet to update attribute metadata for. You can use either the fleet ID or ARN value. *
* * @param fleetId * A unique identifier for the fleet to update attribute metadata for. You can use either the fleet ID or ARN * value. */ public void setFleetId(String fleetId) { this.fleetId = fleetId; } /** ** A unique identifier for the fleet to update attribute metadata for. You can use either the fleet ID or ARN value. *
* * @return A unique identifier for the fleet to update attribute metadata for. You can use either the fleet ID or * ARN value. */ public String getFleetId() { return this.fleetId; } /** ** A unique identifier for the fleet to update attribute metadata for. You can use either the fleet ID or ARN value. *
* * @param fleetId * A unique identifier for the fleet to update attribute metadata for. 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. */ public UpdateFleetAttributesRequest withFleetId(String fleetId) { setFleetId(fleetId); return this; } /** ** A descriptive label that is associated with a fleet. Fleet names do not need to be unique. *
* * @param name * A descriptive label that is associated with a fleet. Fleet names do not need to be unique. */ public void setName(String name) { this.name = name; } /** ** A descriptive label that is associated with a fleet. Fleet names do not need to be unique. *
* * @return A descriptive label that is associated with a fleet. Fleet names do not need to be unique. */ public String getName() { return this.name; } /** ** A descriptive label that is associated with a fleet. Fleet names do not need to be unique. *
* * @param name * A descriptive label that is associated with a fleet. Fleet names do not need to be unique. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateFleetAttributesRequest withName(String name) { setName(name); return this; } /** ** A human-readable description of a fleet. *
* * @param description * A human-readable description of a fleet. */ public void setDescription(String description) { this.description = description; } /** ** A human-readable description of a fleet. *
* * @return A human-readable description of a fleet. */ public String getDescription() { return this.description; } /** ** A human-readable description of a fleet. *
* * @param description * A human-readable description of a fleet. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateFleetAttributesRequest withDescription(String description) { setDescription(description); return this; } /** ** The game session protection policy to apply to all new instances created in this fleet. Instances that already * exist are not affected. You can set protection for individual instances using UpdateGameSession * . *
** NoProtection -- The game session can be terminated during a scale-down event. *
*
* FullProtection -- If the game session is in an ACTIVE
status, it cannot be terminated during
* a scale-down event.
*
* NoProtection -- The game session can be terminated during a scale-down event. *
*
* FullProtection -- If the game session is in an ACTIVE
status, it cannot be terminated
* during a scale-down event.
*
* The game session protection policy to apply to all new instances created in this fleet. Instances that already * exist are not affected. You can set protection for individual instances using UpdateGameSession * . *
** NoProtection -- The game session can be terminated during a scale-down event. *
*
* FullProtection -- If the game session is in an ACTIVE
status, it cannot be terminated during
* a scale-down event.
*
* NoProtection -- The game session can be terminated during a scale-down event. *
*
* FullProtection -- If the game session is in an ACTIVE
status, it cannot be terminated
* during a scale-down event.
*
* The game session protection policy to apply to all new instances created in this fleet. Instances that already * exist are not affected. You can set protection for individual instances using UpdateGameSession * . *
** NoProtection -- The game session can be terminated during a scale-down event. *
*
* FullProtection -- If the game session is in an ACTIVE
status, it cannot be terminated during
* a scale-down event.
*
* NoProtection -- The game session can be terminated during a scale-down event. *
*
* FullProtection -- If the game session is in an ACTIVE
status, it cannot be terminated
* during a scale-down event.
*
* The game session protection policy to apply to all new instances created in this fleet. Instances that already * exist are not affected. You can set protection for individual instances using UpdateGameSession * . *
** NoProtection -- The game session can be terminated during a scale-down event. *
*
* FullProtection -- If the game session is in an ACTIVE
status, it cannot be terminated during
* a scale-down event.
*
* NoProtection -- The game session can be terminated during a scale-down event. *
*
* FullProtection -- If the game session is in an ACTIVE
status, it cannot be terminated
* during a scale-down event.
*
* The game session protection policy to apply to all new instances created in this fleet. Instances that already * exist are not affected. You can set protection for individual instances using UpdateGameSession * . *
** NoProtection -- The game session can be terminated during a scale-down event. *
*
* FullProtection -- If the game session is in an ACTIVE
status, it cannot be terminated during
* a scale-down event.
*
* NoProtection -- The game session can be terminated during a scale-down event. *
*
* FullProtection -- If the game session is in an ACTIVE
status, it cannot be terminated
* during a scale-down event.
*
* Policy settings that limit the number of game sessions an individual player can create over a span of time. *
* * @param resourceCreationLimitPolicy * Policy settings that limit the number of game sessions an individual player can create over a span of * time. */ public void setResourceCreationLimitPolicy(ResourceCreationLimitPolicy resourceCreationLimitPolicy) { this.resourceCreationLimitPolicy = resourceCreationLimitPolicy; } /** ** Policy settings that limit the number of game sessions an individual player can create over a span of time. *
* * @return Policy settings that limit the number of game sessions an individual player can create over a span of * time. */ public ResourceCreationLimitPolicy getResourceCreationLimitPolicy() { return this.resourceCreationLimitPolicy; } /** ** Policy settings that limit the number of game sessions an individual player can create over a span of time. *
* * @param resourceCreationLimitPolicy * Policy settings that limit the number of game sessions an individual player can create over a span of * time. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateFleetAttributesRequest withResourceCreationLimitPolicy(ResourceCreationLimitPolicy resourceCreationLimitPolicy) { setResourceCreationLimitPolicy(resourceCreationLimitPolicy); return this; } /** ** The name of a metric group to add this fleet to. Use a metric group in Amazon CloudWatch to aggregate the metrics * from multiple fleets. Provide an existing metric group name, or create a new metric group by providing a new * name. A fleet can only be in one metric group at a time. *
* * @return The name of a metric group to add this fleet to. Use a metric group in Amazon CloudWatch to aggregate the * metrics from multiple fleets. Provide an existing metric group name, or create a new metric group by * providing a new name. A fleet can only be in one metric group at a time. */ public java.util.List* The name of a metric group to add this fleet to. Use a metric group in Amazon CloudWatch to aggregate the metrics * from multiple fleets. Provide an existing metric group name, or create a new metric group by providing a new * name. A fleet can only be in one metric group at a time. *
* * @param metricGroups * The name of a metric group to add this fleet to. Use a metric group in Amazon CloudWatch to aggregate the * metrics from multiple fleets. Provide an existing metric group name, or create a new metric group by * providing a new name. A fleet can only be in one metric group at a time. */ public void setMetricGroups(java.util.Collection* The name of a metric group to add this fleet to. Use a metric group in Amazon CloudWatch to aggregate the metrics * from multiple fleets. Provide an existing metric group name, or create a new metric group by providing a new * name. A fleet can only be in one metric group at a time. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setMetricGroups(java.util.Collection)} or {@link #withMetricGroups(java.util.Collection)} if you want to * override the existing values. *
* * @param metricGroups * The name of a metric group to add this fleet to. Use a metric group in Amazon CloudWatch to aggregate the * metrics from multiple fleets. Provide an existing metric group name, or create a new metric group by * providing a new name. A fleet can only be in one metric group at a time. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateFleetAttributesRequest withMetricGroups(String... metricGroups) { if (this.metricGroups == null) { setMetricGroups(new java.util.ArrayList* The name of a metric group to add this fleet to. Use a metric group in Amazon CloudWatch to aggregate the metrics * from multiple fleets. Provide an existing metric group name, or create a new metric group by providing a new * name. A fleet can only be in one metric group at a time. *
* * @param metricGroups * The name of a metric group to add this fleet to. Use a metric group in Amazon CloudWatch to aggregate the * metrics from multiple fleets. Provide an existing metric group name, or create a new metric group by * providing a new name. A fleet can only be in one metric group at a time. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateFleetAttributesRequest withMetricGroups(java.util.Collection* Amazon GameLift Anywhere configuration options. *
* * @param anywhereConfiguration * Amazon GameLift Anywhere configuration options. */ public void setAnywhereConfiguration(AnywhereConfiguration anywhereConfiguration) { this.anywhereConfiguration = anywhereConfiguration; } /** ** Amazon GameLift Anywhere configuration options. *
* * @return Amazon GameLift Anywhere configuration options. */ public AnywhereConfiguration getAnywhereConfiguration() { return this.anywhereConfiguration; } /** ** Amazon GameLift Anywhere configuration options. *
* * @param anywhereConfiguration * Amazon GameLift Anywhere configuration options. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateFleetAttributesRequest withAnywhereConfiguration(AnywhereConfiguration anywhereConfiguration) { setAnywhereConfiguration(anywhereConfiguration); return this; } /** * 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. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getFleetId() != null) sb.append("FleetId: ").append(getFleetId()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getNewGameSessionProtectionPolicy() != null) sb.append("NewGameSessionProtectionPolicy: ").append(getNewGameSessionProtectionPolicy()).append(","); if (getResourceCreationLimitPolicy() != null) sb.append("ResourceCreationLimitPolicy: ").append(getResourceCreationLimitPolicy()).append(","); if (getMetricGroups() != null) sb.append("MetricGroups: ").append(getMetricGroups()).append(","); if (getAnywhereConfiguration() != null) sb.append("AnywhereConfiguration: ").append(getAnywhereConfiguration()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateFleetAttributesRequest == false) return false; UpdateFleetAttributesRequest other = (UpdateFleetAttributesRequest) obj; if (other.getFleetId() == null ^ this.getFleetId() == null) return false; if (other.getFleetId() != null && other.getFleetId().equals(this.getFleetId()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getNewGameSessionProtectionPolicy() == null ^ this.getNewGameSessionProtectionPolicy() == null) return false; if (other.getNewGameSessionProtectionPolicy() != null && other.getNewGameSessionProtectionPolicy().equals(this.getNewGameSessionProtectionPolicy()) == false) return false; if (other.getResourceCreationLimitPolicy() == null ^ this.getResourceCreationLimitPolicy() == null) return false; if (other.getResourceCreationLimitPolicy() != null && other.getResourceCreationLimitPolicy().equals(this.getResourceCreationLimitPolicy()) == false) return false; if (other.getMetricGroups() == null ^ this.getMetricGroups() == null) return false; if (other.getMetricGroups() != null && other.getMetricGroups().equals(this.getMetricGroups()) == false) return false; if (other.getAnywhereConfiguration() == null ^ this.getAnywhereConfiguration() == null) return false; if (other.getAnywhereConfiguration() != null && other.getAnywhereConfiguration().equals(this.getAnywhereConfiguration()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFleetId() == null) ? 0 : getFleetId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getNewGameSessionProtectionPolicy() == null) ? 0 : getNewGameSessionProtectionPolicy().hashCode()); hashCode = prime * hashCode + ((getResourceCreationLimitPolicy() == null) ? 0 : getResourceCreationLimitPolicy().hashCode()); hashCode = prime * hashCode + ((getMetricGroups() == null) ? 0 : getMetricGroups().hashCode()); hashCode = prime * hashCode + ((getAnywhereConfiguration() == null) ? 0 : getAnywhereConfiguration().hashCode()); return hashCode; } @Override public UpdateFleetAttributesRequest clone() { return (UpdateFleetAttributesRequest) super.clone(); } }