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

software.amazon.awssdk.services.appstream.model.Fleet Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon AppStream module holds the client classes that are used for communicating with Amazon AppStream.

There is a newer version: 2.29.39
Show newest version
/*
 * 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.appstream.model;

import java.io.Serializable;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collection;
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 java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
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.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Describes a fleet. *

*/ @Generated("software.amazon.awssdk:codegen") public final class Fleet implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField ARN_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(Fleet::arn)).setter(setter(Builder::arn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Arn").build()).build(); private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(Fleet::name)).setter(setter(Builder::name)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Name").build()).build(); private static final SdkField DISPLAY_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(Fleet::displayName)).setter(setter(Builder::displayName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DisplayName").build()).build(); private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(Fleet::description)).setter(setter(Builder::description)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Description").build()).build(); private static final SdkField IMAGE_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(Fleet::imageName)).setter(setter(Builder::imageName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ImageName").build()).build(); private static final SdkField IMAGE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(Fleet::imageArn)).setter(setter(Builder::imageArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ImageArn").build()).build(); private static final SdkField INSTANCE_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(Fleet::instanceType)).setter(setter(Builder::instanceType)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InstanceType").build()).build(); private static final SdkField FLEET_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(Fleet::fleetTypeAsString)).setter(setter(Builder::fleetType)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FleetType").build()).build(); private static final SdkField COMPUTE_CAPACITY_STATUS_FIELD = SdkField . builder(MarshallingType.SDK_POJO).getter(getter(Fleet::computeCapacityStatus)) .setter(setter(Builder::computeCapacityStatus)).constructor(ComputeCapacityStatus::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ComputeCapacityStatus").build()) .build(); private static final SdkField MAX_USER_DURATION_IN_SECONDS_FIELD = SdkField . builder(MarshallingType.INTEGER).getter(getter(Fleet::maxUserDurationInSeconds)) .setter(setter(Builder::maxUserDurationInSeconds)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MaxUserDurationInSeconds").build()) .build(); private static final SdkField DISCONNECT_TIMEOUT_IN_SECONDS_FIELD = SdkField . builder(MarshallingType.INTEGER) .getter(getter(Fleet::disconnectTimeoutInSeconds)) .setter(setter(Builder::disconnectTimeoutInSeconds)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DisconnectTimeoutInSeconds").build()) .build(); private static final SdkField STATE_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(Fleet::stateAsString)).setter(setter(Builder::state)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("State").build()).build(); private static final SdkField VPC_CONFIG_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .getter(getter(Fleet::vpcConfig)).setter(setter(Builder::vpcConfig)).constructor(VpcConfig::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VpcConfig").build()).build(); private static final SdkField CREATED_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .getter(getter(Fleet::createdTime)).setter(setter(Builder::createdTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreatedTime").build()).build(); private static final SdkField> FLEET_ERRORS_FIELD = SdkField .> builder(MarshallingType.LIST) .getter(getter(Fleet::fleetErrors)) .setter(setter(Builder::fleetErrors)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FleetErrors").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(FleetError::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField ENABLE_DEFAULT_INTERNET_ACCESS_FIELD = SdkField . builder(MarshallingType.BOOLEAN) .getter(getter(Fleet::enableDefaultInternetAccess)) .setter(setter(Builder::enableDefaultInternetAccess)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EnableDefaultInternetAccess") .build()).build(); private static final SdkField DOMAIN_JOIN_INFO_FIELD = SdkField . builder(MarshallingType.SDK_POJO).getter(getter(Fleet::domainJoinInfo)) .setter(setter(Builder::domainJoinInfo)).constructor(DomainJoinInfo::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DomainJoinInfo").build()).build(); private static final SdkField IDLE_DISCONNECT_TIMEOUT_IN_SECONDS_FIELD = SdkField . builder(MarshallingType.INTEGER) .getter(getter(Fleet::idleDisconnectTimeoutInSeconds)) .setter(setter(Builder::idleDisconnectTimeoutInSeconds)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IdleDisconnectTimeoutInSeconds") .build()).build(); private static final SdkField IAM_ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(Fleet::iamRoleArn)).setter(setter(Builder::iamRoleArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IamRoleArn").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ARN_FIELD, NAME_FIELD, DISPLAY_NAME_FIELD, DESCRIPTION_FIELD, IMAGE_NAME_FIELD, IMAGE_ARN_FIELD, INSTANCE_TYPE_FIELD, FLEET_TYPE_FIELD, COMPUTE_CAPACITY_STATUS_FIELD, MAX_USER_DURATION_IN_SECONDS_FIELD, DISCONNECT_TIMEOUT_IN_SECONDS_FIELD, STATE_FIELD, VPC_CONFIG_FIELD, CREATED_TIME_FIELD, FLEET_ERRORS_FIELD, ENABLE_DEFAULT_INTERNET_ACCESS_FIELD, DOMAIN_JOIN_INFO_FIELD, IDLE_DISCONNECT_TIMEOUT_IN_SECONDS_FIELD, IAM_ROLE_ARN_FIELD)); private static final long serialVersionUID = 1L; private final String arn; private final String name; private final String displayName; private final String description; private final String imageName; private final String imageArn; private final String instanceType; private final String fleetType; private final ComputeCapacityStatus computeCapacityStatus; private final Integer maxUserDurationInSeconds; private final Integer disconnectTimeoutInSeconds; private final String state; private final VpcConfig vpcConfig; private final Instant createdTime; private final List fleetErrors; private final Boolean enableDefaultInternetAccess; private final DomainJoinInfo domainJoinInfo; private final Integer idleDisconnectTimeoutInSeconds; private final String iamRoleArn; private Fleet(BuilderImpl builder) { this.arn = builder.arn; this.name = builder.name; this.displayName = builder.displayName; this.description = builder.description; this.imageName = builder.imageName; this.imageArn = builder.imageArn; this.instanceType = builder.instanceType; this.fleetType = builder.fleetType; this.computeCapacityStatus = builder.computeCapacityStatus; this.maxUserDurationInSeconds = builder.maxUserDurationInSeconds; this.disconnectTimeoutInSeconds = builder.disconnectTimeoutInSeconds; this.state = builder.state; this.vpcConfig = builder.vpcConfig; this.createdTime = builder.createdTime; this.fleetErrors = builder.fleetErrors; this.enableDefaultInternetAccess = builder.enableDefaultInternetAccess; this.domainJoinInfo = builder.domainJoinInfo; this.idleDisconnectTimeoutInSeconds = builder.idleDisconnectTimeoutInSeconds; this.iamRoleArn = builder.iamRoleArn; } /** *

* The Amazon Resource Name (ARN) for the fleet. *

* * @return The Amazon Resource Name (ARN) for the fleet. */ public String arn() { return arn; } /** *

* The name of the fleet. *

* * @return The name of the fleet. */ public String name() { return name; } /** *

* The fleet name to display. *

* * @return The fleet name to display. */ public String displayName() { return displayName; } /** *

* The description to display. *

* * @return The description to display. */ public String description() { return description; } /** *

* The name of the image used to create the fleet. *

* * @return The name of the image used to create the fleet. */ public String imageName() { return imageName; } /** *

* The ARN for the public, private, or shared image. *

* * @return The ARN for the public, private, or shared image. */ public String imageArn() { return imageArn; } /** *

* The instance type to use when launching fleet instances. The following instance types are available: *

*
    *
  • *

    * stream.standard.medium *

    *
  • *
  • *

    * stream.standard.large *

    *
  • *
  • *

    * stream.compute.large *

    *
  • *
  • *

    * stream.compute.xlarge *

    *
  • *
  • *

    * stream.compute.2xlarge *

    *
  • *
  • *

    * stream.compute.4xlarge *

    *
  • *
  • *

    * stream.compute.8xlarge *

    *
  • *
  • *

    * stream.memory.large *

    *
  • *
  • *

    * stream.memory.xlarge *

    *
  • *
  • *

    * stream.memory.2xlarge *

    *
  • *
  • *

    * stream.memory.4xlarge *

    *
  • *
  • *

    * stream.memory.8xlarge *

    *
  • *
  • *

    * stream.graphics-design.large *

    *
  • *
  • *

    * stream.graphics-design.xlarge *

    *
  • *
  • *

    * stream.graphics-design.2xlarge *

    *
  • *
  • *

    * stream.graphics-design.4xlarge *

    *
  • *
  • *

    * stream.graphics-desktop.2xlarge *

    *
  • *
  • *

    * stream.graphics-pro.4xlarge *

    *
  • *
  • *

    * stream.graphics-pro.8xlarge *

    *
  • *
  • *

    * stream.graphics-pro.16xlarge *

    *
  • *
* * @return The instance type to use when launching fleet instances. The following instance types are available:

*
    *
  • *

    * stream.standard.medium *

    *
  • *
  • *

    * stream.standard.large *

    *
  • *
  • *

    * stream.compute.large *

    *
  • *
  • *

    * stream.compute.xlarge *

    *
  • *
  • *

    * stream.compute.2xlarge *

    *
  • *
  • *

    * stream.compute.4xlarge *

    *
  • *
  • *

    * stream.compute.8xlarge *

    *
  • *
  • *

    * stream.memory.large *

    *
  • *
  • *

    * stream.memory.xlarge *

    *
  • *
  • *

    * stream.memory.2xlarge *

    *
  • *
  • *

    * stream.memory.4xlarge *

    *
  • *
  • *

    * stream.memory.8xlarge *

    *
  • *
  • *

    * stream.graphics-design.large *

    *
  • *
  • *

    * stream.graphics-design.xlarge *

    *
  • *
  • *

    * stream.graphics-design.2xlarge *

    *
  • *
  • *

    * stream.graphics-design.4xlarge *

    *
  • *
  • *

    * stream.graphics-desktop.2xlarge *

    *
  • *
  • *

    * stream.graphics-pro.4xlarge *

    *
  • *
  • *

    * stream.graphics-pro.8xlarge *

    *
  • *
  • *

    * stream.graphics-pro.16xlarge *

    *
  • */ public String instanceType() { return instanceType; } /** *

    * The fleet type. *

    *
    *
    ALWAYS_ON
    *
    *

    * Provides users with instant-on access to their apps. You are charged for all running instances in your fleet, * even if no users are streaming apps. *

    *
    *
    ON_DEMAND
    *
    *

    * Provide users with access to applications after they connect, which takes one to two minutes. You are charged for * instance streaming when users are connected and a small hourly fee for instances that are not streaming apps. *

    *
    *
    *

    * If the service returns an enum value that is not available in the current SDK version, {@link #fleetType} will * return {@link FleetType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #fleetTypeAsString}. *

    * * @return The fleet type.

    *
    *
    ALWAYS_ON
    *
    *

    * Provides users with instant-on access to their apps. You are charged for all running instances in your * fleet, even if no users are streaming apps. *

    *
    *
    ON_DEMAND
    *
    *

    * Provide users with access to applications after they connect, which takes one to two minutes. You are * charged for instance streaming when users are connected and a small hourly fee for instances that are not * streaming apps. *

    *
    * @see FleetType */ public FleetType fleetType() { return FleetType.fromValue(fleetType); } /** *

    * The fleet type. *

    *
    *
    ALWAYS_ON
    *
    *

    * Provides users with instant-on access to their apps. You are charged for all running instances in your fleet, * even if no users are streaming apps. *

    *
    *
    ON_DEMAND
    *
    *

    * Provide users with access to applications after they connect, which takes one to two minutes. You are charged for * instance streaming when users are connected and a small hourly fee for instances that are not streaming apps. *

    *
    *
    *

    * If the service returns an enum value that is not available in the current SDK version, {@link #fleetType} will * return {@link FleetType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #fleetTypeAsString}. *

    * * @return The fleet type.

    *
    *
    ALWAYS_ON
    *
    *

    * Provides users with instant-on access to their apps. You are charged for all running instances in your * fleet, even if no users are streaming apps. *

    *
    *
    ON_DEMAND
    *
    *

    * Provide users with access to applications after they connect, which takes one to two minutes. You are * charged for instance streaming when users are connected and a small hourly fee for instances that are not * streaming apps. *

    *
    * @see FleetType */ public String fleetTypeAsString() { return fleetType; } /** *

    * The capacity status for the fleet. *

    * * @return The capacity status for the fleet. */ public ComputeCapacityStatus computeCapacityStatus() { return computeCapacityStatus; } /** *

    * The maximum amount of time that a streaming session can remain active, in seconds. If users are still connected * to a streaming instance five minutes before this limit is reached, they are prompted to save any open documents * before being disconnected. After this time elapses, the instance is terminated and replaced by a new instance. *

    *

    * Specify a value between 600 and 360000. *

    * * @return The maximum amount of time that a streaming session can remain active, in seconds. If users are still * connected to a streaming instance five minutes before this limit is reached, they are prompted to save * any open documents before being disconnected. After this time elapses, the instance is terminated and * replaced by a new instance.

    *

    * Specify a value between 600 and 360000. */ public Integer maxUserDurationInSeconds() { return maxUserDurationInSeconds; } /** *

    * The amount of time that a streaming session remains active after users disconnect. If they try to reconnect to * the streaming session after a disconnection or network interruption within this time interval, they are connected * to their previous session. Otherwise, they are connected to a new session with a new streaming instance. *

    *

    * Specify a value between 60 and 360000. *

    * * @return The amount of time that a streaming session remains active after users disconnect. If they try to * reconnect to the streaming session after a disconnection or network interruption within this time * interval, they are connected to their previous session. Otherwise, they are connected to a new session * with a new streaming instance.

    *

    * Specify a value between 60 and 360000. */ public Integer disconnectTimeoutInSeconds() { return disconnectTimeoutInSeconds; } /** *

    * The current state for the fleet. *

    *

    * If the service returns an enum value that is not available in the current SDK version, {@link #state} will return * {@link FleetState#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #stateAsString}. *

    * * @return The current state for the fleet. * @see FleetState */ public FleetState state() { return FleetState.fromValue(state); } /** *

    * The current state for the fleet. *

    *

    * If the service returns an enum value that is not available in the current SDK version, {@link #state} will return * {@link FleetState#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #stateAsString}. *

    * * @return The current state for the fleet. * @see FleetState */ public String stateAsString() { return state; } /** *

    * The VPC configuration for the fleet. *

    * * @return The VPC configuration for the fleet. */ public VpcConfig vpcConfig() { return vpcConfig; } /** *

    * The time the fleet was created. *

    * * @return The time the fleet was created. */ public Instant createdTime() { return createdTime; } /** * Returns true if the FleetErrors property was specified by the sender (it may be empty), or false if the sender * did not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service. */ public boolean hasFleetErrors() { return fleetErrors != null && !(fleetErrors instanceof SdkAutoConstructList); } /** *

    * The fleet errors. *

    *

    * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

    *

    * You can use {@link #hasFleetErrors()} to see if a value was sent in this field. *

    * * @return The fleet errors. */ public List fleetErrors() { return fleetErrors; } /** *

    * Indicates whether default internet access is enabled for the fleet. *

    * * @return Indicates whether default internet access is enabled for the fleet. */ public Boolean enableDefaultInternetAccess() { return enableDefaultInternetAccess; } /** *

    * The name of the directory and organizational unit (OU) to use to join the fleet to a Microsoft Active Directory * domain. *

    * * @return The name of the directory and organizational unit (OU) to use to join the fleet to a Microsoft Active * Directory domain. */ public DomainJoinInfo domainJoinInfo() { return domainJoinInfo; } /** *

    * The amount of time that users can be idle (inactive) before they are disconnected from their streaming session * and the DisconnectTimeoutInSeconds time interval begins. Users are notified before they are * disconnected due to inactivity. If users try to reconnect to the streaming session before the time interval * specified in DisconnectTimeoutInSeconds elapses, they are connected to their previous session. Users * are considered idle when they stop providing keyboard or mouse input during their streaming session. File uploads * and downloads, audio in, audio out, and pixels changing do not qualify as user activity. If users continue to be * idle after the time interval in IdleDisconnectTimeoutInSeconds elapses, they are disconnected. *

    *

    * To prevent users from being disconnected due to inactivity, specify a value of 0. Otherwise, specify a value * between 60 and 3600. The default value is 0. *

    * *

    * If you enable this feature, we recommend that you specify a value that corresponds exactly to a whole number of * minutes (for example, 60, 120, and 180). If you don't do this, the value is rounded to the nearest minute. For * example, if you specify a value of 70, users are disconnected after 1 minute of inactivity. If you specify a * value that is at the midpoint between two different minutes, the value is rounded up. For example, if you specify * a value of 90, users are disconnected after 2 minutes of inactivity. *

    *
    * * @return The amount of time that users can be idle (inactive) before they are disconnected from their streaming * session and the DisconnectTimeoutInSeconds time interval begins. Users are notified before * they are disconnected due to inactivity. If users try to reconnect to the streaming session before the * time interval specified in DisconnectTimeoutInSeconds elapses, they are connected to their * previous session. Users are considered idle when they stop providing keyboard or mouse input during their * streaming session. File uploads and downloads, audio in, audio out, and pixels changing do not qualify as * user activity. If users continue to be idle after the time interval in * IdleDisconnectTimeoutInSeconds elapses, they are disconnected.

    *

    * To prevent users from being disconnected due to inactivity, specify a value of 0. Otherwise, specify a * value between 60 and 3600. The default value is 0. *

    * *

    * If you enable this feature, we recommend that you specify a value that corresponds exactly to a whole * number of minutes (for example, 60, 120, and 180). If you don't do this, the value is rounded to the * nearest minute. For example, if you specify a value of 70, users are disconnected after 1 minute of * inactivity. If you specify a value that is at the midpoint between two different minutes, the value is * rounded up. For example, if you specify a value of 90, users are disconnected after 2 minutes of * inactivity. *

    */ public Integer idleDisconnectTimeoutInSeconds() { return idleDisconnectTimeoutInSeconds; } /** *

    * The ARN of the IAM role that is applied to the fleet. To assume a role, the fleet instance calls the AWS Security * Token Service (STS) AssumeRole API operation and passes the ARN of the role to use. The operation * creates a new session with temporary credentials. AppStream 2.0 retrieves the temporary credentials and creates * the AppStream_Machine_Role credential profile on the instance. *

    *

    * For more information, see Using an IAM Role to Grant Permissions to Applications and Scripts Running on AppStream 2.0 Streaming * Instances in the Amazon AppStream 2.0 Administration Guide. *

    * * @return The ARN of the IAM role that is applied to the fleet. To assume a role, the fleet instance calls the AWS * Security Token Service (STS) AssumeRole API operation and passes the ARN of the role to use. * The operation creates a new session with temporary credentials. AppStream 2.0 retrieves the temporary * credentials and creates the AppStream_Machine_Role credential profile on the instance.

    *

    * For more information, see Using an IAM Role to Grant Permissions to Applications and Scripts Running on AppStream 2.0 Streaming * Instances in the Amazon AppStream 2.0 Administration Guide. */ public String iamRoleArn() { return iamRoleArn; } @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 + Objects.hashCode(arn()); hashCode = 31 * hashCode + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(displayName()); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(imageName()); hashCode = 31 * hashCode + Objects.hashCode(imageArn()); hashCode = 31 * hashCode + Objects.hashCode(instanceType()); hashCode = 31 * hashCode + Objects.hashCode(fleetTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(computeCapacityStatus()); hashCode = 31 * hashCode + Objects.hashCode(maxUserDurationInSeconds()); hashCode = 31 * hashCode + Objects.hashCode(disconnectTimeoutInSeconds()); hashCode = 31 * hashCode + Objects.hashCode(stateAsString()); hashCode = 31 * hashCode + Objects.hashCode(vpcConfig()); hashCode = 31 * hashCode + Objects.hashCode(createdTime()); hashCode = 31 * hashCode + Objects.hashCode(fleetErrors()); hashCode = 31 * hashCode + Objects.hashCode(enableDefaultInternetAccess()); hashCode = 31 * hashCode + Objects.hashCode(domainJoinInfo()); hashCode = 31 * hashCode + Objects.hashCode(idleDisconnectTimeoutInSeconds()); hashCode = 31 * hashCode + Objects.hashCode(iamRoleArn()); return hashCode; } @Override public boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Fleet)) { return false; } Fleet other = (Fleet) obj; return Objects.equals(arn(), other.arn()) && Objects.equals(name(), other.name()) && Objects.equals(displayName(), other.displayName()) && Objects.equals(description(), other.description()) && Objects.equals(imageName(), other.imageName()) && Objects.equals(imageArn(), other.imageArn()) && Objects.equals(instanceType(), other.instanceType()) && Objects.equals(fleetTypeAsString(), other.fleetTypeAsString()) && Objects.equals(computeCapacityStatus(), other.computeCapacityStatus()) && Objects.equals(maxUserDurationInSeconds(), other.maxUserDurationInSeconds()) && Objects.equals(disconnectTimeoutInSeconds(), other.disconnectTimeoutInSeconds()) && Objects.equals(stateAsString(), other.stateAsString()) && Objects.equals(vpcConfig(), other.vpcConfig()) && Objects.equals(createdTime(), other.createdTime()) && Objects.equals(fleetErrors(), other.fleetErrors()) && Objects.equals(enableDefaultInternetAccess(), other.enableDefaultInternetAccess()) && Objects.equals(domainJoinInfo(), other.domainJoinInfo()) && Objects.equals(idleDisconnectTimeoutInSeconds(), other.idleDisconnectTimeoutInSeconds()) && Objects.equals(iamRoleArn(), other.iamRoleArn()); } /** * 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("Fleet").add("Arn", arn()).add("Name", name()).add("DisplayName", displayName()) .add("Description", description()).add("ImageName", imageName()).add("ImageArn", imageArn()) .add("InstanceType", instanceType()).add("FleetType", fleetTypeAsString()) .add("ComputeCapacityStatus", computeCapacityStatus()) .add("MaxUserDurationInSeconds", maxUserDurationInSeconds()) .add("DisconnectTimeoutInSeconds", disconnectTimeoutInSeconds()).add("State", stateAsString()) .add("VpcConfig", vpcConfig()).add("CreatedTime", createdTime()).add("FleetErrors", fleetErrors()) .add("EnableDefaultInternetAccess", enableDefaultInternetAccess()).add("DomainJoinInfo", domainJoinInfo()) .add("IdleDisconnectTimeoutInSeconds", idleDisconnectTimeoutInSeconds()).add("IamRoleArn", iamRoleArn()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "Arn": return Optional.ofNullable(clazz.cast(arn())); case "Name": return Optional.ofNullable(clazz.cast(name())); case "DisplayName": return Optional.ofNullable(clazz.cast(displayName())); case "Description": return Optional.ofNullable(clazz.cast(description())); case "ImageName": return Optional.ofNullable(clazz.cast(imageName())); case "ImageArn": return Optional.ofNullable(clazz.cast(imageArn())); case "InstanceType": return Optional.ofNullable(clazz.cast(instanceType())); case "FleetType": return Optional.ofNullable(clazz.cast(fleetTypeAsString())); case "ComputeCapacityStatus": return Optional.ofNullable(clazz.cast(computeCapacityStatus())); case "MaxUserDurationInSeconds": return Optional.ofNullable(clazz.cast(maxUserDurationInSeconds())); case "DisconnectTimeoutInSeconds": return Optional.ofNullable(clazz.cast(disconnectTimeoutInSeconds())); case "State": return Optional.ofNullable(clazz.cast(stateAsString())); case "VpcConfig": return Optional.ofNullable(clazz.cast(vpcConfig())); case "CreatedTime": return Optional.ofNullable(clazz.cast(createdTime())); case "FleetErrors": return Optional.ofNullable(clazz.cast(fleetErrors())); case "EnableDefaultInternetAccess": return Optional.ofNullable(clazz.cast(enableDefaultInternetAccess())); case "DomainJoinInfo": return Optional.ofNullable(clazz.cast(domainJoinInfo())); case "IdleDisconnectTimeoutInSeconds": return Optional.ofNullable(clazz.cast(idleDisconnectTimeoutInSeconds())); case "IamRoleArn": return Optional.ofNullable(clazz.cast(iamRoleArn())); default: return Optional.empty(); } } @Override public List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((Fleet) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

    * The Amazon Resource Name (ARN) for the fleet. *

    * * @param arn * The Amazon Resource Name (ARN) for the fleet. * @return Returns a reference to this object so that method calls can be chained together. */ Builder arn(String arn); /** *

    * The name of the fleet. *

    * * @param name * The name of the fleet. * @return Returns a reference to this object so that method calls can be chained together. */ Builder name(String name); /** *

    * The fleet name to display. *

    * * @param displayName * The fleet name to display. * @return Returns a reference to this object so that method calls can be chained together. */ Builder displayName(String displayName); /** *

    * The description to display. *

    * * @param description * The description to display. * @return Returns a reference to this object so that method calls can be chained together. */ Builder description(String description); /** *

    * The name of the image used to create the fleet. *

    * * @param imageName * The name of the image used to create the fleet. * @return Returns a reference to this object so that method calls can be chained together. */ Builder imageName(String imageName); /** *

    * The ARN for the public, private, or shared image. *

    * * @param imageArn * The ARN for the public, private, or shared image. * @return Returns a reference to this object so that method calls can be chained together. */ Builder imageArn(String imageArn); /** *

    * The instance type to use when launching fleet instances. The following instance types are available: *

    *
      *
    • *

      * stream.standard.medium *

      *
    • *
    • *

      * stream.standard.large *

      *
    • *
    • *

      * stream.compute.large *

      *
    • *
    • *

      * stream.compute.xlarge *

      *
    • *
    • *

      * stream.compute.2xlarge *

      *
    • *
    • *

      * stream.compute.4xlarge *

      *
    • *
    • *

      * stream.compute.8xlarge *

      *
    • *
    • *

      * stream.memory.large *

      *
    • *
    • *

      * stream.memory.xlarge *

      *
    • *
    • *

      * stream.memory.2xlarge *

      *
    • *
    • *

      * stream.memory.4xlarge *

      *
    • *
    • *

      * stream.memory.8xlarge *

      *
    • *
    • *

      * stream.graphics-design.large *

      *
    • *
    • *

      * stream.graphics-design.xlarge *

      *
    • *
    • *

      * stream.graphics-design.2xlarge *

      *
    • *
    • *

      * stream.graphics-design.4xlarge *

      *
    • *
    • *

      * stream.graphics-desktop.2xlarge *

      *
    • *
    • *

      * stream.graphics-pro.4xlarge *

      *
    • *
    • *

      * stream.graphics-pro.8xlarge *

      *
    • *
    • *

      * stream.graphics-pro.16xlarge *

      *
    • *
    * * @param instanceType * The instance type to use when launching fleet instances. The following instance types are * available:

    *
      *
    • *

      * stream.standard.medium *

      *
    • *
    • *

      * stream.standard.large *

      *
    • *
    • *

      * stream.compute.large *

      *
    • *
    • *

      * stream.compute.xlarge *

      *
    • *
    • *

      * stream.compute.2xlarge *

      *
    • *
    • *

      * stream.compute.4xlarge *

      *
    • *
    • *

      * stream.compute.8xlarge *

      *
    • *
    • *

      * stream.memory.large *

      *
    • *
    • *

      * stream.memory.xlarge *

      *
    • *
    • *

      * stream.memory.2xlarge *

      *
    • *
    • *

      * stream.memory.4xlarge *

      *
    • *
    • *

      * stream.memory.8xlarge *

      *
    • *
    • *

      * stream.graphics-design.large *

      *
    • *
    • *

      * stream.graphics-design.xlarge *

      *
    • *
    • *

      * stream.graphics-design.2xlarge *

      *
    • *
    • *

      * stream.graphics-design.4xlarge *

      *
    • *
    • *

      * stream.graphics-desktop.2xlarge *

      *
    • *
    • *

      * stream.graphics-pro.4xlarge *

      *
    • *
    • *

      * stream.graphics-pro.8xlarge *

      *
    • *
    • *

      * stream.graphics-pro.16xlarge *

      *
    • * @return Returns a reference to this object so that method calls can be chained together. */ Builder instanceType(String instanceType); /** *

      * The fleet type. *

      *
      *
      ALWAYS_ON
      *
      *

      * Provides users with instant-on access to their apps. You are charged for all running instances in your fleet, * even if no users are streaming apps. *

      *
      *
      ON_DEMAND
      *
      *

      * Provide users with access to applications after they connect, which takes one to two minutes. You are charged * for instance streaming when users are connected and a small hourly fee for instances that are not streaming * apps. *

      *
      *
      * * @param fleetType * The fleet type.

      *
      *
      ALWAYS_ON
      *
      *

      * Provides users with instant-on access to their apps. You are charged for all running instances in your * fleet, even if no users are streaming apps. *

      *
      *
      ON_DEMAND
      *
      *

      * Provide users with access to applications after they connect, which takes one to two minutes. You are * charged for instance streaming when users are connected and a small hourly fee for instances that are * not streaming apps. *

      *
      * @see FleetType * @return Returns a reference to this object so that method calls can be chained together. * @see FleetType */ Builder fleetType(String fleetType); /** *

      * The fleet type. *

      *
      *
      ALWAYS_ON
      *
      *

      * Provides users with instant-on access to their apps. You are charged for all running instances in your fleet, * even if no users are streaming apps. *

      *
      *
      ON_DEMAND
      *
      *

      * Provide users with access to applications after they connect, which takes one to two minutes. You are charged * for instance streaming when users are connected and a small hourly fee for instances that are not streaming * apps. *

      *
      *
      * * @param fleetType * The fleet type.

      *
      *
      ALWAYS_ON
      *
      *

      * Provides users with instant-on access to their apps. You are charged for all running instances in your * fleet, even if no users are streaming apps. *

      *
      *
      ON_DEMAND
      *
      *

      * Provide users with access to applications after they connect, which takes one to two minutes. You are * charged for instance streaming when users are connected and a small hourly fee for instances that are * not streaming apps. *

      *
      * @see FleetType * @return Returns a reference to this object so that method calls can be chained together. * @see FleetType */ Builder fleetType(FleetType fleetType); /** *

      * The capacity status for the fleet. *

      * * @param computeCapacityStatus * The capacity status for the fleet. * @return Returns a reference to this object so that method calls can be chained together. */ Builder computeCapacityStatus(ComputeCapacityStatus computeCapacityStatus); /** *

      * The capacity status for the fleet. *

      * This is a convenience that creates an instance of the {@link ComputeCapacityStatus.Builder} avoiding the need * to create one manually via {@link ComputeCapacityStatus#builder()}. * * When the {@link Consumer} completes, {@link ComputeCapacityStatus.Builder#build()} is called immediately and * its result is passed to {@link #computeCapacityStatus(ComputeCapacityStatus)}. * * @param computeCapacityStatus * a consumer that will call methods on {@link ComputeCapacityStatus.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #computeCapacityStatus(ComputeCapacityStatus) */ default Builder computeCapacityStatus(Consumer computeCapacityStatus) { return computeCapacityStatus(ComputeCapacityStatus.builder().applyMutation(computeCapacityStatus).build()); } /** *

      * The maximum amount of time that a streaming session can remain active, in seconds. If users are still * connected to a streaming instance five minutes before this limit is reached, they are prompted to save any * open documents before being disconnected. After this time elapses, the instance is terminated and replaced by * a new instance. *

      *

      * Specify a value between 600 and 360000. *

      * * @param maxUserDurationInSeconds * The maximum amount of time that a streaming session can remain active, in seconds. If users are still * connected to a streaming instance five minutes before this limit is reached, they are prompted to save * any open documents before being disconnected. After this time elapses, the instance is terminated and * replaced by a new instance.

      *

      * Specify a value between 600 and 360000. * @return Returns a reference to this object so that method calls can be chained together. */ Builder maxUserDurationInSeconds(Integer maxUserDurationInSeconds); /** *

      * The amount of time that a streaming session remains active after users disconnect. If they try to reconnect * to the streaming session after a disconnection or network interruption within this time interval, they are * connected to their previous session. Otherwise, they are connected to a new session with a new streaming * instance. *

      *

      * Specify a value between 60 and 360000. *

      * * @param disconnectTimeoutInSeconds * The amount of time that a streaming session remains active after users disconnect. If they try to * reconnect to the streaming session after a disconnection or network interruption within this time * interval, they are connected to their previous session. Otherwise, they are connected to a new session * with a new streaming instance.

      *

      * Specify a value between 60 and 360000. * @return Returns a reference to this object so that method calls can be chained together. */ Builder disconnectTimeoutInSeconds(Integer disconnectTimeoutInSeconds); /** *

      * The current state for the fleet. *

      * * @param state * The current state for the fleet. * @see FleetState * @return Returns a reference to this object so that method calls can be chained together. * @see FleetState */ Builder state(String state); /** *

      * The current state for the fleet. *

      * * @param state * The current state for the fleet. * @see FleetState * @return Returns a reference to this object so that method calls can be chained together. * @see FleetState */ Builder state(FleetState state); /** *

      * The VPC configuration for the fleet. *

      * * @param vpcConfig * The VPC configuration for the fleet. * @return Returns a reference to this object so that method calls can be chained together. */ Builder vpcConfig(VpcConfig vpcConfig); /** *

      * The VPC configuration for the fleet. *

      * This is a convenience that creates an instance of the {@link VpcConfig.Builder} avoiding the need to create * one manually via {@link VpcConfig#builder()}. * * When the {@link Consumer} completes, {@link VpcConfig.Builder#build()} is called immediately and its result * is passed to {@link #vpcConfig(VpcConfig)}. * * @param vpcConfig * a consumer that will call methods on {@link VpcConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #vpcConfig(VpcConfig) */ default Builder vpcConfig(Consumer vpcConfig) { return vpcConfig(VpcConfig.builder().applyMutation(vpcConfig).build()); } /** *

      * The time the fleet was created. *

      * * @param createdTime * The time the fleet was created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder createdTime(Instant createdTime); /** *

      * The fleet errors. *

      * * @param fleetErrors * The fleet errors. * @return Returns a reference to this object so that method calls can be chained together. */ Builder fleetErrors(Collection fleetErrors); /** *

      * The fleet errors. *

      * * @param fleetErrors * The fleet errors. * @return Returns a reference to this object so that method calls can be chained together. */ Builder fleetErrors(FleetError... fleetErrors); /** *

      * The fleet errors. *

      * This is a convenience that creates an instance of the {@link List.Builder} avoiding the need to * create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and its * result is passed to {@link #fleetErrors(List)}. * * @param fleetErrors * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #fleetErrors(List) */ Builder fleetErrors(Consumer... fleetErrors); /** *

      * Indicates whether default internet access is enabled for the fleet. *

      * * @param enableDefaultInternetAccess * Indicates whether default internet access is enabled for the fleet. * @return Returns a reference to this object so that method calls can be chained together. */ Builder enableDefaultInternetAccess(Boolean enableDefaultInternetAccess); /** *

      * The name of the directory and organizational unit (OU) to use to join the fleet to a Microsoft Active * Directory domain. *

      * * @param domainJoinInfo * The name of the directory and organizational unit (OU) to use to join the fleet to a Microsoft Active * Directory domain. * @return Returns a reference to this object so that method calls can be chained together. */ Builder domainJoinInfo(DomainJoinInfo domainJoinInfo); /** *

      * The name of the directory and organizational unit (OU) to use to join the fleet to a Microsoft Active * Directory domain. *

      * This is a convenience that creates an instance of the {@link DomainJoinInfo.Builder} avoiding the need to * create one manually via {@link DomainJoinInfo#builder()}. * * When the {@link Consumer} completes, {@link DomainJoinInfo.Builder#build()} is called immediately and its * result is passed to {@link #domainJoinInfo(DomainJoinInfo)}. * * @param domainJoinInfo * a consumer that will call methods on {@link DomainJoinInfo.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #domainJoinInfo(DomainJoinInfo) */ default Builder domainJoinInfo(Consumer domainJoinInfo) { return domainJoinInfo(DomainJoinInfo.builder().applyMutation(domainJoinInfo).build()); } /** *

      * The amount of time that users can be idle (inactive) before they are disconnected from their streaming * session and the DisconnectTimeoutInSeconds time interval begins. Users are notified before they * are disconnected due to inactivity. If users try to reconnect to the streaming session before the time * interval specified in DisconnectTimeoutInSeconds elapses, they are connected to their previous * session. Users are considered idle when they stop providing keyboard or mouse input during their streaming * session. File uploads and downloads, audio in, audio out, and pixels changing do not qualify as user * activity. If users continue to be idle after the time interval in IdleDisconnectTimeoutInSeconds * elapses, they are disconnected. *

      *

      * To prevent users from being disconnected due to inactivity, specify a value of 0. Otherwise, specify a value * between 60 and 3600. The default value is 0. *

      * *

      * If you enable this feature, we recommend that you specify a value that corresponds exactly to a whole number * of minutes (for example, 60, 120, and 180). If you don't do this, the value is rounded to the nearest minute. * For example, if you specify a value of 70, users are disconnected after 1 minute of inactivity. If you * specify a value that is at the midpoint between two different minutes, the value is rounded up. For example, * if you specify a value of 90, users are disconnected after 2 minutes of inactivity. *

      *
      * * @param idleDisconnectTimeoutInSeconds * The amount of time that users can be idle (inactive) before they are disconnected from their streaming * session and the DisconnectTimeoutInSeconds time interval begins. Users are notified * before they are disconnected due to inactivity. If users try to reconnect to the streaming session * before the time interval specified in DisconnectTimeoutInSeconds elapses, they are * connected to their previous session. Users are considered idle when they stop providing keyboard or * mouse input during their streaming session. File uploads and downloads, audio in, audio out, and * pixels changing do not qualify as user activity. If users continue to be idle after the time interval * in IdleDisconnectTimeoutInSeconds elapses, they are disconnected.

      *

      * To prevent users from being disconnected due to inactivity, specify a value of 0. Otherwise, specify a * value between 60 and 3600. The default value is 0. *

      * *

      * If you enable this feature, we recommend that you specify a value that corresponds exactly to a whole * number of minutes (for example, 60, 120, and 180). If you don't do this, the value is rounded to the * nearest minute. For example, if you specify a value of 70, users are disconnected after 1 minute of * inactivity. If you specify a value that is at the midpoint between two different minutes, the value is * rounded up. For example, if you specify a value of 90, users are disconnected after 2 minutes of * inactivity. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder idleDisconnectTimeoutInSeconds(Integer idleDisconnectTimeoutInSeconds); /** *

      * The ARN of the IAM role that is applied to the fleet. To assume a role, the fleet instance calls the AWS * Security Token Service (STS) AssumeRole API operation and passes the ARN of the role to use. The * operation creates a new session with temporary credentials. AppStream 2.0 retrieves the temporary credentials * and creates the AppStream_Machine_Role credential profile on the instance. *

      *

      * For more information, see Using an IAM Role to Grant Permissions to Applications and Scripts Running on AppStream 2.0 Streaming * Instances in the Amazon AppStream 2.0 Administration Guide. *

      * * @param iamRoleArn * The ARN of the IAM role that is applied to the fleet. To assume a role, the fleet instance calls the * AWS Security Token Service (STS) AssumeRole API operation and passes the ARN of the role * to use. The operation creates a new session with temporary credentials. AppStream 2.0 retrieves the * temporary credentials and creates the AppStream_Machine_Role credential profile on the * instance.

      *

      * For more information, see Using an IAM Role to Grant Permissions to Applications and Scripts Running on AppStream 2.0 Streaming * Instances in the Amazon AppStream 2.0 Administration Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder iamRoleArn(String iamRoleArn); } static final class BuilderImpl implements Builder { private String arn; private String name; private String displayName; private String description; private String imageName; private String imageArn; private String instanceType; private String fleetType; private ComputeCapacityStatus computeCapacityStatus; private Integer maxUserDurationInSeconds; private Integer disconnectTimeoutInSeconds; private String state; private VpcConfig vpcConfig; private Instant createdTime; private List fleetErrors = DefaultSdkAutoConstructList.getInstance(); private Boolean enableDefaultInternetAccess; private DomainJoinInfo domainJoinInfo; private Integer idleDisconnectTimeoutInSeconds; private String iamRoleArn; private BuilderImpl() { } private BuilderImpl(Fleet model) { arn(model.arn); name(model.name); displayName(model.displayName); description(model.description); imageName(model.imageName); imageArn(model.imageArn); instanceType(model.instanceType); fleetType(model.fleetType); computeCapacityStatus(model.computeCapacityStatus); maxUserDurationInSeconds(model.maxUserDurationInSeconds); disconnectTimeoutInSeconds(model.disconnectTimeoutInSeconds); state(model.state); vpcConfig(model.vpcConfig); createdTime(model.createdTime); fleetErrors(model.fleetErrors); enableDefaultInternetAccess(model.enableDefaultInternetAccess); domainJoinInfo(model.domainJoinInfo); idleDisconnectTimeoutInSeconds(model.idleDisconnectTimeoutInSeconds); iamRoleArn(model.iamRoleArn); } public final String getArn() { return arn; } @Override public final Builder arn(String arn) { this.arn = arn; return this; } public final void setArn(String arn) { this.arn = arn; } public final String getName() { return name; } @Override public final Builder name(String name) { this.name = name; return this; } public final void setName(String name) { this.name = name; } public final String getDisplayName() { return displayName; } @Override public final Builder displayName(String displayName) { this.displayName = displayName; return this; } public final void setDisplayName(String displayName) { this.displayName = displayName; } public final String getDescription() { return description; } @Override public final Builder description(String description) { this.description = description; return this; } public final void setDescription(String description) { this.description = description; } public final String getImageName() { return imageName; } @Override public final Builder imageName(String imageName) { this.imageName = imageName; return this; } public final void setImageName(String imageName) { this.imageName = imageName; } public final String getImageArn() { return imageArn; } @Override public final Builder imageArn(String imageArn) { this.imageArn = imageArn; return this; } public final void setImageArn(String imageArn) { this.imageArn = imageArn; } public final String getInstanceType() { return instanceType; } @Override public final Builder instanceType(String instanceType) { this.instanceType = instanceType; return this; } public final void setInstanceType(String instanceType) { this.instanceType = instanceType; } public final String getFleetType() { return fleetType; } @Override public final Builder fleetType(String fleetType) { this.fleetType = fleetType; return this; } @Override public final Builder fleetType(FleetType fleetType) { this.fleetType(fleetType == null ? null : fleetType.toString()); return this; } public final void setFleetType(String fleetType) { this.fleetType = fleetType; } public final ComputeCapacityStatus.Builder getComputeCapacityStatus() { return computeCapacityStatus != null ? computeCapacityStatus.toBuilder() : null; } @Override public final Builder computeCapacityStatus(ComputeCapacityStatus computeCapacityStatus) { this.computeCapacityStatus = computeCapacityStatus; return this; } public final void setComputeCapacityStatus(ComputeCapacityStatus.BuilderImpl computeCapacityStatus) { this.computeCapacityStatus = computeCapacityStatus != null ? computeCapacityStatus.build() : null; } public final Integer getMaxUserDurationInSeconds() { return maxUserDurationInSeconds; } @Override public final Builder maxUserDurationInSeconds(Integer maxUserDurationInSeconds) { this.maxUserDurationInSeconds = maxUserDurationInSeconds; return this; } public final void setMaxUserDurationInSeconds(Integer maxUserDurationInSeconds) { this.maxUserDurationInSeconds = maxUserDurationInSeconds; } public final Integer getDisconnectTimeoutInSeconds() { return disconnectTimeoutInSeconds; } @Override public final Builder disconnectTimeoutInSeconds(Integer disconnectTimeoutInSeconds) { this.disconnectTimeoutInSeconds = disconnectTimeoutInSeconds; return this; } public final void setDisconnectTimeoutInSeconds(Integer disconnectTimeoutInSeconds) { this.disconnectTimeoutInSeconds = disconnectTimeoutInSeconds; } public final String getState() { return state; } @Override public final Builder state(String state) { this.state = state; return this; } @Override public final Builder state(FleetState state) { this.state(state == null ? null : state.toString()); return this; } public final void setState(String state) { this.state = state; } public final VpcConfig.Builder getVpcConfig() { return vpcConfig != null ? vpcConfig.toBuilder() : null; } @Override public final Builder vpcConfig(VpcConfig vpcConfig) { this.vpcConfig = vpcConfig; return this; } public final void setVpcConfig(VpcConfig.BuilderImpl vpcConfig) { this.vpcConfig = vpcConfig != null ? vpcConfig.build() : null; } public final Instant getCreatedTime() { return createdTime; } @Override public final Builder createdTime(Instant createdTime) { this.createdTime = createdTime; return this; } public final void setCreatedTime(Instant createdTime) { this.createdTime = createdTime; } public final Collection getFleetErrors() { return fleetErrors != null ? fleetErrors.stream().map(FleetError::toBuilder).collect(Collectors.toList()) : null; } @Override public final Builder fleetErrors(Collection fleetErrors) { this.fleetErrors = FleetErrorsCopier.copy(fleetErrors); return this; } @Override @SafeVarargs public final Builder fleetErrors(FleetError... fleetErrors) { fleetErrors(Arrays.asList(fleetErrors)); return this; } @Override @SafeVarargs public final Builder fleetErrors(Consumer... fleetErrors) { fleetErrors(Stream.of(fleetErrors).map(c -> FleetError.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final void setFleetErrors(Collection fleetErrors) { this.fleetErrors = FleetErrorsCopier.copyFromBuilder(fleetErrors); } public final Boolean getEnableDefaultInternetAccess() { return enableDefaultInternetAccess; } @Override public final Builder enableDefaultInternetAccess(Boolean enableDefaultInternetAccess) { this.enableDefaultInternetAccess = enableDefaultInternetAccess; return this; } public final void setEnableDefaultInternetAccess(Boolean enableDefaultInternetAccess) { this.enableDefaultInternetAccess = enableDefaultInternetAccess; } public final DomainJoinInfo.Builder getDomainJoinInfo() { return domainJoinInfo != null ? domainJoinInfo.toBuilder() : null; } @Override public final Builder domainJoinInfo(DomainJoinInfo domainJoinInfo) { this.domainJoinInfo = domainJoinInfo; return this; } public final void setDomainJoinInfo(DomainJoinInfo.BuilderImpl domainJoinInfo) { this.domainJoinInfo = domainJoinInfo != null ? domainJoinInfo.build() : null; } public final Integer getIdleDisconnectTimeoutInSeconds() { return idleDisconnectTimeoutInSeconds; } @Override public final Builder idleDisconnectTimeoutInSeconds(Integer idleDisconnectTimeoutInSeconds) { this.idleDisconnectTimeoutInSeconds = idleDisconnectTimeoutInSeconds; return this; } public final void setIdleDisconnectTimeoutInSeconds(Integer idleDisconnectTimeoutInSeconds) { this.idleDisconnectTimeoutInSeconds = idleDisconnectTimeoutInSeconds; } public final String getIamRoleArn() { return iamRoleArn; } @Override public final Builder iamRoleArn(String iamRoleArn) { this.iamRoleArn = iamRoleArn; return this; } public final void setIamRoleArn(String iamRoleArn) { this.iamRoleArn = iamRoleArn; } @Override public Fleet build() { return new Fleet(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy