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

software.amazon.awssdk.services.appstream.model.Image 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.30.1
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.HashMap;
import java.util.List;
import java.util.Map;
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 an image. *

*/ @Generated("software.amazon.awssdk:codegen") public final class Image implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Name") .getter(getter(Image::name)).setter(setter(Builder::name)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Name").build()).build(); private static final SdkField ARN_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Arn") .getter(getter(Image::arn)).setter(setter(Builder::arn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Arn").build()).build(); private static final SdkField BASE_IMAGE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("BaseImageArn").getter(getter(Image::baseImageArn)).setter(setter(Builder::baseImageArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BaseImageArn").build()).build(); private static final SdkField DISPLAY_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("DisplayName").getter(getter(Image::displayName)).setter(setter(Builder::displayName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DisplayName").build()).build(); private static final SdkField STATE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("State") .getter(getter(Image::stateAsString)).setter(setter(Builder::state)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("State").build()).build(); private static final SdkField VISIBILITY_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("Visibility").getter(getter(Image::visibilityAsString)).setter(setter(Builder::visibility)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Visibility").build()).build(); private static final SdkField IMAGE_BUILDER_SUPPORTED_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("ImageBuilderSupported").getter(getter(Image::imageBuilderSupported)) .setter(setter(Builder::imageBuilderSupported)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ImageBuilderSupported").build()) .build(); private static final SdkField IMAGE_BUILDER_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ImageBuilderName").getter(getter(Image::imageBuilderName)).setter(setter(Builder::imageBuilderName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ImageBuilderName").build()).build(); private static final SdkField PLATFORM_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("Platform").getter(getter(Image::platformAsString)).setter(setter(Builder::platform)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Platform").build()).build(); private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("Description").getter(getter(Image::description)).setter(setter(Builder::description)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Description").build()).build(); private static final SdkField STATE_CHANGE_REASON_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("StateChangeReason") .getter(getter(Image::stateChangeReason)).setter(setter(Builder::stateChangeReason)) .constructor(ImageStateChangeReason::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StateChangeReason").build()).build(); private static final SdkField> APPLICATIONS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Applications") .getter(getter(Image::applications)) .setter(setter(Builder::applications)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Applications").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(Application::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField CREATED_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("CreatedTime").getter(getter(Image::createdTime)).setter(setter(Builder::createdTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreatedTime").build()).build(); private static final SdkField PUBLIC_BASE_IMAGE_RELEASED_DATE_FIELD = SdkField . builder(MarshallingType.INSTANT) .memberName("PublicBaseImageReleasedDate") .getter(getter(Image::publicBaseImageReleasedDate)) .setter(setter(Builder::publicBaseImageReleasedDate)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PublicBaseImageReleasedDate") .build()).build(); private static final SdkField APPSTREAM_AGENT_VERSION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("AppstreamAgentVersion").getter(getter(Image::appstreamAgentVersion)) .setter(setter(Builder::appstreamAgentVersion)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AppstreamAgentVersion").build()) .build(); private static final SdkField IMAGE_PERMISSIONS_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("ImagePermissions") .getter(getter(Image::imagePermissions)).setter(setter(Builder::imagePermissions)) .constructor(ImagePermissions::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ImagePermissions").build()).build(); private static final SdkField> IMAGE_ERRORS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("ImageErrors") .getter(getter(Image::imageErrors)) .setter(setter(Builder::imageErrors)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ImageErrors").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(ResourceError::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField LATEST_APPSTREAM_AGENT_VERSION_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("LatestAppstreamAgentVersion") .getter(getter(Image::latestAppstreamAgentVersionAsString)) .setter(setter(Builder::latestAppstreamAgentVersion)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LatestAppstreamAgentVersion") .build()).build(); private static final SdkField> SUPPORTED_INSTANCE_FAMILIES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("SupportedInstanceFamilies") .getter(getter(Image::supportedInstanceFamilies)) .setter(setter(Builder::supportedInstanceFamilies)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SupportedInstanceFamilies").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField DYNAMIC_APP_PROVIDERS_ENABLED_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("DynamicAppProvidersEnabled") .getter(getter(Image::dynamicAppProvidersEnabledAsString)) .setter(setter(Builder::dynamicAppProvidersEnabled)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DynamicAppProvidersEnabled").build()) .build(); private static final SdkField IMAGE_SHARED_WITH_OTHERS_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ImageSharedWithOthers").getter(getter(Image::imageSharedWithOthersAsString)) .setter(setter(Builder::imageSharedWithOthers)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ImageSharedWithOthers").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(NAME_FIELD, ARN_FIELD, BASE_IMAGE_ARN_FIELD, DISPLAY_NAME_FIELD, STATE_FIELD, VISIBILITY_FIELD, IMAGE_BUILDER_SUPPORTED_FIELD, IMAGE_BUILDER_NAME_FIELD, PLATFORM_FIELD, DESCRIPTION_FIELD, STATE_CHANGE_REASON_FIELD, APPLICATIONS_FIELD, CREATED_TIME_FIELD, PUBLIC_BASE_IMAGE_RELEASED_DATE_FIELD, APPSTREAM_AGENT_VERSION_FIELD, IMAGE_PERMISSIONS_FIELD, IMAGE_ERRORS_FIELD, LATEST_APPSTREAM_AGENT_VERSION_FIELD, SUPPORTED_INSTANCE_FAMILIES_FIELD, DYNAMIC_APP_PROVIDERS_ENABLED_FIELD, IMAGE_SHARED_WITH_OTHERS_FIELD)); private static final Map> SDK_NAME_TO_FIELD = memberNameToFieldInitializer(); private static final long serialVersionUID = 1L; private final String name; private final String arn; private final String baseImageArn; private final String displayName; private final String state; private final String visibility; private final Boolean imageBuilderSupported; private final String imageBuilderName; private final String platform; private final String description; private final ImageStateChangeReason stateChangeReason; private final List applications; private final Instant createdTime; private final Instant publicBaseImageReleasedDate; private final String appstreamAgentVersion; private final ImagePermissions imagePermissions; private final List imageErrors; private final String latestAppstreamAgentVersion; private final List supportedInstanceFamilies; private final String dynamicAppProvidersEnabled; private final String imageSharedWithOthers; private Image(BuilderImpl builder) { this.name = builder.name; this.arn = builder.arn; this.baseImageArn = builder.baseImageArn; this.displayName = builder.displayName; this.state = builder.state; this.visibility = builder.visibility; this.imageBuilderSupported = builder.imageBuilderSupported; this.imageBuilderName = builder.imageBuilderName; this.platform = builder.platform; this.description = builder.description; this.stateChangeReason = builder.stateChangeReason; this.applications = builder.applications; this.createdTime = builder.createdTime; this.publicBaseImageReleasedDate = builder.publicBaseImageReleasedDate; this.appstreamAgentVersion = builder.appstreamAgentVersion; this.imagePermissions = builder.imagePermissions; this.imageErrors = builder.imageErrors; this.latestAppstreamAgentVersion = builder.latestAppstreamAgentVersion; this.supportedInstanceFamilies = builder.supportedInstanceFamilies; this.dynamicAppProvidersEnabled = builder.dynamicAppProvidersEnabled; this.imageSharedWithOthers = builder.imageSharedWithOthers; } /** *

* The name of the image. *

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

* The ARN of the image. *

* * @return The ARN of the image. */ public final String arn() { return arn; } /** *

* The ARN of the image from which this image was created. *

* * @return The ARN of the image from which this image was created. */ public final String baseImageArn() { return baseImageArn; } /** *

* The image name to display. *

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

* The image starts in the PENDING state. If image creation succeeds, the state is * AVAILABLE. If image creation fails, the state is FAILED. *

*

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

* * @return The image starts in the PENDING state. If image creation succeeds, the state is * AVAILABLE. If image creation fails, the state is FAILED. * @see ImageState */ public final ImageState state() { return ImageState.fromValue(state); } /** *

* The image starts in the PENDING state. If image creation succeeds, the state is * AVAILABLE. If image creation fails, the state is FAILED. *

*

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

* * @return The image starts in the PENDING state. If image creation succeeds, the state is * AVAILABLE. If image creation fails, the state is FAILED. * @see ImageState */ public final String stateAsString() { return state; } /** *

* Indicates whether the image is public or private. *

*

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

* * @return Indicates whether the image is public or private. * @see VisibilityType */ public final VisibilityType visibility() { return VisibilityType.fromValue(visibility); } /** *

* Indicates whether the image is public or private. *

*

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

* * @return Indicates whether the image is public or private. * @see VisibilityType */ public final String visibilityAsString() { return visibility; } /** *

* Indicates whether an image builder can be launched from this image. *

* * @return Indicates whether an image builder can be launched from this image. */ public final Boolean imageBuilderSupported() { return imageBuilderSupported; } /** *

* The name of the image builder that was used to create the private image. If the image is shared, this value is * null. *

* * @return The name of the image builder that was used to create the private image. If the image is shared, this * value is null. */ public final String imageBuilderName() { return imageBuilderName; } /** *

* The operating system platform of the image. *

*

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

* * @return The operating system platform of the image. * @see PlatformType */ public final PlatformType platform() { return PlatformType.fromValue(platform); } /** *

* The operating system platform of the image. *

*

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

* * @return The operating system platform of the image. * @see PlatformType */ public final String platformAsString() { return platform; } /** *

* The description to display. *

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

* The reason why the last state change occurred. *

* * @return The reason why the last state change occurred. */ public final ImageStateChangeReason stateChangeReason() { return stateChangeReason; } /** * For responses, this returns true if the service returned a value for the Applications property. This DOES NOT * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasApplications() { return applications != null && !(applications instanceof SdkAutoConstructList); } /** *

* The applications associated with the image. *

*

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

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasApplications} method. *

* * @return The applications associated with the image. */ public final List applications() { return applications; } /** *

* The time the image was created. *

* * @return The time the image was created. */ public final Instant createdTime() { return createdTime; } /** *

* The release date of the public base image. For private images, this date is the release date of the base image * from which the image was created. *

* * @return The release date of the public base image. For private images, this date is the release date of the base * image from which the image was created. */ public final Instant publicBaseImageReleasedDate() { return publicBaseImageReleasedDate; } /** *

* The version of the AppStream 2.0 agent to use for instances that are launched from this image. *

* * @return The version of the AppStream 2.0 agent to use for instances that are launched from this image. */ public final String appstreamAgentVersion() { return appstreamAgentVersion; } /** *

* The permissions to provide to the destination AWS account for the specified image. *

* * @return The permissions to provide to the destination AWS account for the specified image. */ public final ImagePermissions imagePermissions() { return imagePermissions; } /** * For responses, this returns true if the service returned a value for the ImageErrors property. This DOES NOT * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasImageErrors() { return imageErrors != null && !(imageErrors instanceof SdkAutoConstructList); } /** *

* Describes the errors that are returned when a new image can't be created. *

*

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

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasImageErrors} method. *

* * @return Describes the errors that are returned when a new image can't be created. */ public final List imageErrors() { return imageErrors; } /** *

* Indicates whether the image is using the latest AppStream 2.0 agent version or not. *

*

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

* * @return Indicates whether the image is using the latest AppStream 2.0 agent version or not. * @see LatestAppstreamAgentVersion */ public final LatestAppstreamAgentVersion latestAppstreamAgentVersion() { return LatestAppstreamAgentVersion.fromValue(latestAppstreamAgentVersion); } /** *

* Indicates whether the image is using the latest AppStream 2.0 agent version or not. *

*

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

* * @return Indicates whether the image is using the latest AppStream 2.0 agent version or not. * @see LatestAppstreamAgentVersion */ public final String latestAppstreamAgentVersionAsString() { return latestAppstreamAgentVersion; } /** * For responses, this returns true if the service returned a value for the SupportedInstanceFamilies property. This * DOES NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the * property). This is useful because the SDK will never return a null collection or map, but you may need to * differentiate between the service returning nothing (or null) and the service returning an empty collection or * map. For requests, this returns true if a value for the property was specified in the request builder, and false * if a value was not specified. */ public final boolean hasSupportedInstanceFamilies() { return supportedInstanceFamilies != null && !(supportedInstanceFamilies instanceof SdkAutoConstructList); } /** *

* The supported instances families that determine which image a customer can use when the customer launches a fleet * or image builder. The following instances families are supported: *

*
    *
  • *

    * General Purpose *

    *
  • *
  • *

    * Compute Optimized *

    *
  • *
  • *

    * Memory Optimized *

    *
  • *
  • *

    * Graphics *

    *
  • *
  • *

    * Graphics Design *

    *
  • *
  • *

    * Graphics Pro *

    *
  • *
  • *

    * Graphics G4 *

    *
  • *
  • *

    * Graphics G5 *

    *
  • *
*

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

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasSupportedInstanceFamilies} method. *

* * @return The supported instances families that determine which image a customer can use when the customer launches * a fleet or image builder. The following instances families are supported:

*
    *
  • *

    * General Purpose *

    *
  • *
  • *

    * Compute Optimized *

    *
  • *
  • *

    * Memory Optimized *

    *
  • *
  • *

    * Graphics *

    *
  • *
  • *

    * Graphics Design *

    *
  • *
  • *

    * Graphics Pro *

    *
  • *
  • *

    * Graphics G4 *

    *
  • *
  • *

    * Graphics G5 *

    *
  • */ public final List supportedInstanceFamilies() { return supportedInstanceFamilies; } /** *

    * Indicates whether dynamic app providers are enabled within an AppStream 2.0 image or not. *

    *

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

    * * @return Indicates whether dynamic app providers are enabled within an AppStream 2.0 image or not. * @see DynamicAppProvidersEnabled */ public final DynamicAppProvidersEnabled dynamicAppProvidersEnabled() { return DynamicAppProvidersEnabled.fromValue(dynamicAppProvidersEnabled); } /** *

    * Indicates whether dynamic app providers are enabled within an AppStream 2.0 image or not. *

    *

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

    * * @return Indicates whether dynamic app providers are enabled within an AppStream 2.0 image or not. * @see DynamicAppProvidersEnabled */ public final String dynamicAppProvidersEnabledAsString() { return dynamicAppProvidersEnabled; } /** *

    * Indicates whether the image is shared with another account ID. *

    *

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

    * * @return Indicates whether the image is shared with another account ID. * @see ImageSharedWithOthers */ public final ImageSharedWithOthers imageSharedWithOthers() { return ImageSharedWithOthers.fromValue(imageSharedWithOthers); } /** *

    * Indicates whether the image is shared with another account ID. *

    *

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

    * * @return Indicates whether the image is shared with another account ID. * @see ImageSharedWithOthers */ public final String imageSharedWithOthersAsString() { return imageSharedWithOthers; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(arn()); hashCode = 31 * hashCode + Objects.hashCode(baseImageArn()); hashCode = 31 * hashCode + Objects.hashCode(displayName()); hashCode = 31 * hashCode + Objects.hashCode(stateAsString()); hashCode = 31 * hashCode + Objects.hashCode(visibilityAsString()); hashCode = 31 * hashCode + Objects.hashCode(imageBuilderSupported()); hashCode = 31 * hashCode + Objects.hashCode(imageBuilderName()); hashCode = 31 * hashCode + Objects.hashCode(platformAsString()); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(stateChangeReason()); hashCode = 31 * hashCode + Objects.hashCode(hasApplications() ? applications() : null); hashCode = 31 * hashCode + Objects.hashCode(createdTime()); hashCode = 31 * hashCode + Objects.hashCode(publicBaseImageReleasedDate()); hashCode = 31 * hashCode + Objects.hashCode(appstreamAgentVersion()); hashCode = 31 * hashCode + Objects.hashCode(imagePermissions()); hashCode = 31 * hashCode + Objects.hashCode(hasImageErrors() ? imageErrors() : null); hashCode = 31 * hashCode + Objects.hashCode(latestAppstreamAgentVersionAsString()); hashCode = 31 * hashCode + Objects.hashCode(hasSupportedInstanceFamilies() ? supportedInstanceFamilies() : null); hashCode = 31 * hashCode + Objects.hashCode(dynamicAppProvidersEnabledAsString()); hashCode = 31 * hashCode + Objects.hashCode(imageSharedWithOthersAsString()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Image)) { return false; } Image other = (Image) obj; return Objects.equals(name(), other.name()) && Objects.equals(arn(), other.arn()) && Objects.equals(baseImageArn(), other.baseImageArn()) && Objects.equals(displayName(), other.displayName()) && Objects.equals(stateAsString(), other.stateAsString()) && Objects.equals(visibilityAsString(), other.visibilityAsString()) && Objects.equals(imageBuilderSupported(), other.imageBuilderSupported()) && Objects.equals(imageBuilderName(), other.imageBuilderName()) && Objects.equals(platformAsString(), other.platformAsString()) && Objects.equals(description(), other.description()) && Objects.equals(stateChangeReason(), other.stateChangeReason()) && hasApplications() == other.hasApplications() && Objects.equals(applications(), other.applications()) && Objects.equals(createdTime(), other.createdTime()) && Objects.equals(publicBaseImageReleasedDate(), other.publicBaseImageReleasedDate()) && Objects.equals(appstreamAgentVersion(), other.appstreamAgentVersion()) && Objects.equals(imagePermissions(), other.imagePermissions()) && hasImageErrors() == other.hasImageErrors() && Objects.equals(imageErrors(), other.imageErrors()) && Objects.equals(latestAppstreamAgentVersionAsString(), other.latestAppstreamAgentVersionAsString()) && hasSupportedInstanceFamilies() == other.hasSupportedInstanceFamilies() && Objects.equals(supportedInstanceFamilies(), other.supportedInstanceFamilies()) && Objects.equals(dynamicAppProvidersEnabledAsString(), other.dynamicAppProvidersEnabledAsString()) && Objects.equals(imageSharedWithOthersAsString(), other.imageSharedWithOthersAsString()); } /** * 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 final String toString() { return ToString.builder("Image").add("Name", name()).add("Arn", arn()).add("BaseImageArn", baseImageArn()) .add("DisplayName", displayName()).add("State", stateAsString()).add("Visibility", visibilityAsString()) .add("ImageBuilderSupported", imageBuilderSupported()).add("ImageBuilderName", imageBuilderName()) .add("Platform", platformAsString()).add("Description", description()) .add("StateChangeReason", stateChangeReason()).add("Applications", hasApplications() ? applications() : null) .add("CreatedTime", createdTime()).add("PublicBaseImageReleasedDate", publicBaseImageReleasedDate()) .add("AppstreamAgentVersion", appstreamAgentVersion()).add("ImagePermissions", imagePermissions()) .add("ImageErrors", hasImageErrors() ? imageErrors() : null) .add("LatestAppstreamAgentVersion", latestAppstreamAgentVersionAsString()) .add("SupportedInstanceFamilies", hasSupportedInstanceFamilies() ? supportedInstanceFamilies() : null) .add("DynamicAppProvidersEnabled", dynamicAppProvidersEnabledAsString()) .add("ImageSharedWithOthers", imageSharedWithOthersAsString()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "Name": return Optional.ofNullable(clazz.cast(name())); case "Arn": return Optional.ofNullable(clazz.cast(arn())); case "BaseImageArn": return Optional.ofNullable(clazz.cast(baseImageArn())); case "DisplayName": return Optional.ofNullable(clazz.cast(displayName())); case "State": return Optional.ofNullable(clazz.cast(stateAsString())); case "Visibility": return Optional.ofNullable(clazz.cast(visibilityAsString())); case "ImageBuilderSupported": return Optional.ofNullable(clazz.cast(imageBuilderSupported())); case "ImageBuilderName": return Optional.ofNullable(clazz.cast(imageBuilderName())); case "Platform": return Optional.ofNullable(clazz.cast(platformAsString())); case "Description": return Optional.ofNullable(clazz.cast(description())); case "StateChangeReason": return Optional.ofNullable(clazz.cast(stateChangeReason())); case "Applications": return Optional.ofNullable(clazz.cast(applications())); case "CreatedTime": return Optional.ofNullable(clazz.cast(createdTime())); case "PublicBaseImageReleasedDate": return Optional.ofNullable(clazz.cast(publicBaseImageReleasedDate())); case "AppstreamAgentVersion": return Optional.ofNullable(clazz.cast(appstreamAgentVersion())); case "ImagePermissions": return Optional.ofNullable(clazz.cast(imagePermissions())); case "ImageErrors": return Optional.ofNullable(clazz.cast(imageErrors())); case "LatestAppstreamAgentVersion": return Optional.ofNullable(clazz.cast(latestAppstreamAgentVersionAsString())); case "SupportedInstanceFamilies": return Optional.ofNullable(clazz.cast(supportedInstanceFamilies())); case "DynamicAppProvidersEnabled": return Optional.ofNullable(clazz.cast(dynamicAppProvidersEnabledAsString())); case "ImageSharedWithOthers": return Optional.ofNullable(clazz.cast(imageSharedWithOthersAsString())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } @Override public final Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } private static Map> memberNameToFieldInitializer() { Map> map = new HashMap<>(); map.put("Name", NAME_FIELD); map.put("Arn", ARN_FIELD); map.put("BaseImageArn", BASE_IMAGE_ARN_FIELD); map.put("DisplayName", DISPLAY_NAME_FIELD); map.put("State", STATE_FIELD); map.put("Visibility", VISIBILITY_FIELD); map.put("ImageBuilderSupported", IMAGE_BUILDER_SUPPORTED_FIELD); map.put("ImageBuilderName", IMAGE_BUILDER_NAME_FIELD); map.put("Platform", PLATFORM_FIELD); map.put("Description", DESCRIPTION_FIELD); map.put("StateChangeReason", STATE_CHANGE_REASON_FIELD); map.put("Applications", APPLICATIONS_FIELD); map.put("CreatedTime", CREATED_TIME_FIELD); map.put("PublicBaseImageReleasedDate", PUBLIC_BASE_IMAGE_RELEASED_DATE_FIELD); map.put("AppstreamAgentVersion", APPSTREAM_AGENT_VERSION_FIELD); map.put("ImagePermissions", IMAGE_PERMISSIONS_FIELD); map.put("ImageErrors", IMAGE_ERRORS_FIELD); map.put("LatestAppstreamAgentVersion", LATEST_APPSTREAM_AGENT_VERSION_FIELD); map.put("SupportedInstanceFamilies", SUPPORTED_INSTANCE_FAMILIES_FIELD); map.put("DynamicAppProvidersEnabled", DYNAMIC_APP_PROVIDERS_ENABLED_FIELD); map.put("ImageSharedWithOthers", IMAGE_SHARED_WITH_OTHERS_FIELD); return Collections.unmodifiableMap(map); } private static Function getter(Function g) { return obj -> g.apply((Image) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

    * The name of the image. *

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

    * The ARN of the image. *

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

    * The ARN of the image from which this image was created. *

    * * @param baseImageArn * The ARN of the image from which this image was created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder baseImageArn(String baseImageArn); /** *

    * The image name to display. *

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

    * The image starts in the PENDING state. If image creation succeeds, the state is * AVAILABLE. If image creation fails, the state is FAILED. *

    * * @param state * The image starts in the PENDING state. If image creation succeeds, the state is * AVAILABLE. If image creation fails, the state is FAILED. * @see ImageState * @return Returns a reference to this object so that method calls can be chained together. * @see ImageState */ Builder state(String state); /** *

    * The image starts in the PENDING state. If image creation succeeds, the state is * AVAILABLE. If image creation fails, the state is FAILED. *

    * * @param state * The image starts in the PENDING state. If image creation succeeds, the state is * AVAILABLE. If image creation fails, the state is FAILED. * @see ImageState * @return Returns a reference to this object so that method calls can be chained together. * @see ImageState */ Builder state(ImageState state); /** *

    * Indicates whether the image is public or private. *

    * * @param visibility * Indicates whether the image is public or private. * @see VisibilityType * @return Returns a reference to this object so that method calls can be chained together. * @see VisibilityType */ Builder visibility(String visibility); /** *

    * Indicates whether the image is public or private. *

    * * @param visibility * Indicates whether the image is public or private. * @see VisibilityType * @return Returns a reference to this object so that method calls can be chained together. * @see VisibilityType */ Builder visibility(VisibilityType visibility); /** *

    * Indicates whether an image builder can be launched from this image. *

    * * @param imageBuilderSupported * Indicates whether an image builder can be launched from this image. * @return Returns a reference to this object so that method calls can be chained together. */ Builder imageBuilderSupported(Boolean imageBuilderSupported); /** *

    * The name of the image builder that was used to create the private image. If the image is shared, this value * is null. *

    * * @param imageBuilderName * The name of the image builder that was used to create the private image. If the image is shared, this * value is null. * @return Returns a reference to this object so that method calls can be chained together. */ Builder imageBuilderName(String imageBuilderName); /** *

    * The operating system platform of the image. *

    * * @param platform * The operating system platform of the image. * @see PlatformType * @return Returns a reference to this object so that method calls can be chained together. * @see PlatformType */ Builder platform(String platform); /** *

    * The operating system platform of the image. *

    * * @param platform * The operating system platform of the image. * @see PlatformType * @return Returns a reference to this object so that method calls can be chained together. * @see PlatformType */ Builder platform(PlatformType platform); /** *

    * 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 reason why the last state change occurred. *

    * * @param stateChangeReason * The reason why the last state change occurred. * @return Returns a reference to this object so that method calls can be chained together. */ Builder stateChangeReason(ImageStateChangeReason stateChangeReason); /** *

    * The reason why the last state change occurred. *

    * This is a convenience method that creates an instance of the {@link ImageStateChangeReason.Builder} avoiding * the need to create one manually via {@link ImageStateChangeReason#builder()}. * *

    * When the {@link Consumer} completes, {@link ImageStateChangeReason.Builder#build()} is called immediately and * its result is passed to {@link #stateChangeReason(ImageStateChangeReason)}. * * @param stateChangeReason * a consumer that will call methods on {@link ImageStateChangeReason.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #stateChangeReason(ImageStateChangeReason) */ default Builder stateChangeReason(Consumer stateChangeReason) { return stateChangeReason(ImageStateChangeReason.builder().applyMutation(stateChangeReason).build()); } /** *

    * The applications associated with the image. *

    * * @param applications * The applications associated with the image. * @return Returns a reference to this object so that method calls can be chained together. */ Builder applications(Collection applications); /** *

    * The applications associated with the image. *

    * * @param applications * The applications associated with the image. * @return Returns a reference to this object so that method calls can be chained together. */ Builder applications(Application... applications); /** *

    * The applications associated with the image. *

    * This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.appstream.model.Application.Builder} avoiding the need to create one * manually via {@link software.amazon.awssdk.services.appstream.model.Application#builder()}. * *

    * When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.appstream.model.Application.Builder#build()} is called immediately and * its result is passed to {@link #applications(List)}. * * @param applications * a consumer that will call methods on * {@link software.amazon.awssdk.services.appstream.model.Application.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #applications(java.util.Collection) */ Builder applications(Consumer... applications); /** *

    * The time the image was created. *

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

    * The release date of the public base image. For private images, this date is the release date of the base * image from which the image was created. *

    * * @param publicBaseImageReleasedDate * The release date of the public base image. For private images, this date is the release date of the * base image from which the image was created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder publicBaseImageReleasedDate(Instant publicBaseImageReleasedDate); /** *

    * The version of the AppStream 2.0 agent to use for instances that are launched from this image. *

    * * @param appstreamAgentVersion * The version of the AppStream 2.0 agent to use for instances that are launched from this image. * @return Returns a reference to this object so that method calls can be chained together. */ Builder appstreamAgentVersion(String appstreamAgentVersion); /** *

    * The permissions to provide to the destination AWS account for the specified image. *

    * * @param imagePermissions * The permissions to provide to the destination AWS account for the specified image. * @return Returns a reference to this object so that method calls can be chained together. */ Builder imagePermissions(ImagePermissions imagePermissions); /** *

    * The permissions to provide to the destination AWS account for the specified image. *

    * This is a convenience method that creates an instance of the {@link ImagePermissions.Builder} avoiding the * need to create one manually via {@link ImagePermissions#builder()}. * *

    * When the {@link Consumer} completes, {@link ImagePermissions.Builder#build()} is called immediately and its * result is passed to {@link #imagePermissions(ImagePermissions)}. * * @param imagePermissions * a consumer that will call methods on {@link ImagePermissions.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #imagePermissions(ImagePermissions) */ default Builder imagePermissions(Consumer imagePermissions) { return imagePermissions(ImagePermissions.builder().applyMutation(imagePermissions).build()); } /** *

    * Describes the errors that are returned when a new image can't be created. *

    * * @param imageErrors * Describes the errors that are returned when a new image can't be created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder imageErrors(Collection imageErrors); /** *

    * Describes the errors that are returned when a new image can't be created. *

    * * @param imageErrors * Describes the errors that are returned when a new image can't be created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder imageErrors(ResourceError... imageErrors); /** *

    * Describes the errors that are returned when a new image can't be created. *

    * This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.appstream.model.ResourceError.Builder} avoiding the need to create one * manually via {@link software.amazon.awssdk.services.appstream.model.ResourceError#builder()}. * *

    * When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.appstream.model.ResourceError.Builder#build()} is called immediately * and its result is passed to {@link #imageErrors(List)}. * * @param imageErrors * a consumer that will call methods on * {@link software.amazon.awssdk.services.appstream.model.ResourceError.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #imageErrors(java.util.Collection) */ Builder imageErrors(Consumer... imageErrors); /** *

    * Indicates whether the image is using the latest AppStream 2.0 agent version or not. *

    * * @param latestAppstreamAgentVersion * Indicates whether the image is using the latest AppStream 2.0 agent version or not. * @see LatestAppstreamAgentVersion * @return Returns a reference to this object so that method calls can be chained together. * @see LatestAppstreamAgentVersion */ Builder latestAppstreamAgentVersion(String latestAppstreamAgentVersion); /** *

    * Indicates whether the image is using the latest AppStream 2.0 agent version or not. *

    * * @param latestAppstreamAgentVersion * Indicates whether the image is using the latest AppStream 2.0 agent version or not. * @see LatestAppstreamAgentVersion * @return Returns a reference to this object so that method calls can be chained together. * @see LatestAppstreamAgentVersion */ Builder latestAppstreamAgentVersion(LatestAppstreamAgentVersion latestAppstreamAgentVersion); /** *

    * The supported instances families that determine which image a customer can use when the customer launches a * fleet or image builder. The following instances families are supported: *

    *
      *
    • *

      * General Purpose *

      *
    • *
    • *

      * Compute Optimized *

      *
    • *
    • *

      * Memory Optimized *

      *
    • *
    • *

      * Graphics *

      *
    • *
    • *

      * Graphics Design *

      *
    • *
    • *

      * Graphics Pro *

      *
    • *
    • *

      * Graphics G4 *

      *
    • *
    • *

      * Graphics G5 *

      *
    • *
    * * @param supportedInstanceFamilies * The supported instances families that determine which image a customer can use when the customer * launches a fleet or image builder. The following instances families are supported:

    *
      *
    • *

      * General Purpose *

      *
    • *
    • *

      * Compute Optimized *

      *
    • *
    • *

      * Memory Optimized *

      *
    • *
    • *

      * Graphics *

      *
    • *
    • *

      * Graphics Design *

      *
    • *
    • *

      * Graphics Pro *

      *
    • *
    • *

      * Graphics G4 *

      *
    • *
    • *

      * Graphics G5 *

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

      * The supported instances families that determine which image a customer can use when the customer launches a * fleet or image builder. The following instances families are supported: *

      *
        *
      • *

        * General Purpose *

        *
      • *
      • *

        * Compute Optimized *

        *
      • *
      • *

        * Memory Optimized *

        *
      • *
      • *

        * Graphics *

        *
      • *
      • *

        * Graphics Design *

        *
      • *
      • *

        * Graphics Pro *

        *
      • *
      • *

        * Graphics G4 *

        *
      • *
      • *

        * Graphics G5 *

        *
      • *
      * * @param supportedInstanceFamilies * The supported instances families that determine which image a customer can use when the customer * launches a fleet or image builder. The following instances families are supported:

      *
        *
      • *

        * General Purpose *

        *
      • *
      • *

        * Compute Optimized *

        *
      • *
      • *

        * Memory Optimized *

        *
      • *
      • *

        * Graphics *

        *
      • *
      • *

        * Graphics Design *

        *
      • *
      • *

        * Graphics Pro *

        *
      • *
      • *

        * Graphics G4 *

        *
      • *
      • *

        * Graphics G5 *

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

        * Indicates whether dynamic app providers are enabled within an AppStream 2.0 image or not. *

        * * @param dynamicAppProvidersEnabled * Indicates whether dynamic app providers are enabled within an AppStream 2.0 image or not. * @see DynamicAppProvidersEnabled * @return Returns a reference to this object so that method calls can be chained together. * @see DynamicAppProvidersEnabled */ Builder dynamicAppProvidersEnabled(String dynamicAppProvidersEnabled); /** *

        * Indicates whether dynamic app providers are enabled within an AppStream 2.0 image or not. *

        * * @param dynamicAppProvidersEnabled * Indicates whether dynamic app providers are enabled within an AppStream 2.0 image or not. * @see DynamicAppProvidersEnabled * @return Returns a reference to this object so that method calls can be chained together. * @see DynamicAppProvidersEnabled */ Builder dynamicAppProvidersEnabled(DynamicAppProvidersEnabled dynamicAppProvidersEnabled); /** *

        * Indicates whether the image is shared with another account ID. *

        * * @param imageSharedWithOthers * Indicates whether the image is shared with another account ID. * @see ImageSharedWithOthers * @return Returns a reference to this object so that method calls can be chained together. * @see ImageSharedWithOthers */ Builder imageSharedWithOthers(String imageSharedWithOthers); /** *

        * Indicates whether the image is shared with another account ID. *

        * * @param imageSharedWithOthers * Indicates whether the image is shared with another account ID. * @see ImageSharedWithOthers * @return Returns a reference to this object so that method calls can be chained together. * @see ImageSharedWithOthers */ Builder imageSharedWithOthers(ImageSharedWithOthers imageSharedWithOthers); } static final class BuilderImpl implements Builder { private String name; private String arn; private String baseImageArn; private String displayName; private String state; private String visibility; private Boolean imageBuilderSupported; private String imageBuilderName; private String platform; private String description; private ImageStateChangeReason stateChangeReason; private List applications = DefaultSdkAutoConstructList.getInstance(); private Instant createdTime; private Instant publicBaseImageReleasedDate; private String appstreamAgentVersion; private ImagePermissions imagePermissions; private List imageErrors = DefaultSdkAutoConstructList.getInstance(); private String latestAppstreamAgentVersion; private List supportedInstanceFamilies = DefaultSdkAutoConstructList.getInstance(); private String dynamicAppProvidersEnabled; private String imageSharedWithOthers; private BuilderImpl() { } private BuilderImpl(Image model) { name(model.name); arn(model.arn); baseImageArn(model.baseImageArn); displayName(model.displayName); state(model.state); visibility(model.visibility); imageBuilderSupported(model.imageBuilderSupported); imageBuilderName(model.imageBuilderName); platform(model.platform); description(model.description); stateChangeReason(model.stateChangeReason); applications(model.applications); createdTime(model.createdTime); publicBaseImageReleasedDate(model.publicBaseImageReleasedDate); appstreamAgentVersion(model.appstreamAgentVersion); imagePermissions(model.imagePermissions); imageErrors(model.imageErrors); latestAppstreamAgentVersion(model.latestAppstreamAgentVersion); supportedInstanceFamilies(model.supportedInstanceFamilies); dynamicAppProvidersEnabled(model.dynamicAppProvidersEnabled); imageSharedWithOthers(model.imageSharedWithOthers); } public final String getName() { return name; } public final void setName(String name) { this.name = name; } @Override public final Builder name(String name) { this.name = name; return this; } public final String getArn() { return arn; } public final void setArn(String arn) { this.arn = arn; } @Override public final Builder arn(String arn) { this.arn = arn; return this; } public final String getBaseImageArn() { return baseImageArn; } public final void setBaseImageArn(String baseImageArn) { this.baseImageArn = baseImageArn; } @Override public final Builder baseImageArn(String baseImageArn) { this.baseImageArn = baseImageArn; return this; } public final String getDisplayName() { return displayName; } public final void setDisplayName(String displayName) { this.displayName = displayName; } @Override public final Builder displayName(String displayName) { this.displayName = displayName; return this; } public final String getState() { return state; } public final void setState(String state) { this.state = state; } @Override public final Builder state(String state) { this.state = state; return this; } @Override public final Builder state(ImageState state) { this.state(state == null ? null : state.toString()); return this; } public final String getVisibility() { return visibility; } public final void setVisibility(String visibility) { this.visibility = visibility; } @Override public final Builder visibility(String visibility) { this.visibility = visibility; return this; } @Override public final Builder visibility(VisibilityType visibility) { this.visibility(visibility == null ? null : visibility.toString()); return this; } public final Boolean getImageBuilderSupported() { return imageBuilderSupported; } public final void setImageBuilderSupported(Boolean imageBuilderSupported) { this.imageBuilderSupported = imageBuilderSupported; } @Override public final Builder imageBuilderSupported(Boolean imageBuilderSupported) { this.imageBuilderSupported = imageBuilderSupported; return this; } public final String getImageBuilderName() { return imageBuilderName; } public final void setImageBuilderName(String imageBuilderName) { this.imageBuilderName = imageBuilderName; } @Override public final Builder imageBuilderName(String imageBuilderName) { this.imageBuilderName = imageBuilderName; return this; } public final String getPlatform() { return platform; } public final void setPlatform(String platform) { this.platform = platform; } @Override public final Builder platform(String platform) { this.platform = platform; return this; } @Override public final Builder platform(PlatformType platform) { this.platform(platform == null ? null : platform.toString()); return this; } public final String getDescription() { return description; } public final void setDescription(String description) { this.description = description; } @Override public final Builder description(String description) { this.description = description; return this; } public final ImageStateChangeReason.Builder getStateChangeReason() { return stateChangeReason != null ? stateChangeReason.toBuilder() : null; } public final void setStateChangeReason(ImageStateChangeReason.BuilderImpl stateChangeReason) { this.stateChangeReason = stateChangeReason != null ? stateChangeReason.build() : null; } @Override public final Builder stateChangeReason(ImageStateChangeReason stateChangeReason) { this.stateChangeReason = stateChangeReason; return this; } public final List getApplications() { List result = ApplicationsCopier.copyToBuilder(this.applications); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setApplications(Collection applications) { this.applications = ApplicationsCopier.copyFromBuilder(applications); } @Override public final Builder applications(Collection applications) { this.applications = ApplicationsCopier.copy(applications); return this; } @Override @SafeVarargs public final Builder applications(Application... applications) { applications(Arrays.asList(applications)); return this; } @Override @SafeVarargs public final Builder applications(Consumer... applications) { applications(Stream.of(applications).map(c -> Application.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final Instant getCreatedTime() { return createdTime; } public final void setCreatedTime(Instant createdTime) { this.createdTime = createdTime; } @Override public final Builder createdTime(Instant createdTime) { this.createdTime = createdTime; return this; } public final Instant getPublicBaseImageReleasedDate() { return publicBaseImageReleasedDate; } public final void setPublicBaseImageReleasedDate(Instant publicBaseImageReleasedDate) { this.publicBaseImageReleasedDate = publicBaseImageReleasedDate; } @Override public final Builder publicBaseImageReleasedDate(Instant publicBaseImageReleasedDate) { this.publicBaseImageReleasedDate = publicBaseImageReleasedDate; return this; } public final String getAppstreamAgentVersion() { return appstreamAgentVersion; } public final void setAppstreamAgentVersion(String appstreamAgentVersion) { this.appstreamAgentVersion = appstreamAgentVersion; } @Override public final Builder appstreamAgentVersion(String appstreamAgentVersion) { this.appstreamAgentVersion = appstreamAgentVersion; return this; } public final ImagePermissions.Builder getImagePermissions() { return imagePermissions != null ? imagePermissions.toBuilder() : null; } public final void setImagePermissions(ImagePermissions.BuilderImpl imagePermissions) { this.imagePermissions = imagePermissions != null ? imagePermissions.build() : null; } @Override public final Builder imagePermissions(ImagePermissions imagePermissions) { this.imagePermissions = imagePermissions; return this; } public final List getImageErrors() { List result = ResourceErrorsCopier.copyToBuilder(this.imageErrors); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setImageErrors(Collection imageErrors) { this.imageErrors = ResourceErrorsCopier.copyFromBuilder(imageErrors); } @Override public final Builder imageErrors(Collection imageErrors) { this.imageErrors = ResourceErrorsCopier.copy(imageErrors); return this; } @Override @SafeVarargs public final Builder imageErrors(ResourceError... imageErrors) { imageErrors(Arrays.asList(imageErrors)); return this; } @Override @SafeVarargs public final Builder imageErrors(Consumer... imageErrors) { imageErrors(Stream.of(imageErrors).map(c -> ResourceError.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final String getLatestAppstreamAgentVersion() { return latestAppstreamAgentVersion; } public final void setLatestAppstreamAgentVersion(String latestAppstreamAgentVersion) { this.latestAppstreamAgentVersion = latestAppstreamAgentVersion; } @Override public final Builder latestAppstreamAgentVersion(String latestAppstreamAgentVersion) { this.latestAppstreamAgentVersion = latestAppstreamAgentVersion; return this; } @Override public final Builder latestAppstreamAgentVersion(LatestAppstreamAgentVersion latestAppstreamAgentVersion) { this.latestAppstreamAgentVersion(latestAppstreamAgentVersion == null ? null : latestAppstreamAgentVersion.toString()); return this; } public final Collection getSupportedInstanceFamilies() { if (supportedInstanceFamilies instanceof SdkAutoConstructList) { return null; } return supportedInstanceFamilies; } public final void setSupportedInstanceFamilies(Collection supportedInstanceFamilies) { this.supportedInstanceFamilies = StringListCopier.copy(supportedInstanceFamilies); } @Override public final Builder supportedInstanceFamilies(Collection supportedInstanceFamilies) { this.supportedInstanceFamilies = StringListCopier.copy(supportedInstanceFamilies); return this; } @Override @SafeVarargs public final Builder supportedInstanceFamilies(String... supportedInstanceFamilies) { supportedInstanceFamilies(Arrays.asList(supportedInstanceFamilies)); return this; } public final String getDynamicAppProvidersEnabled() { return dynamicAppProvidersEnabled; } public final void setDynamicAppProvidersEnabled(String dynamicAppProvidersEnabled) { this.dynamicAppProvidersEnabled = dynamicAppProvidersEnabled; } @Override public final Builder dynamicAppProvidersEnabled(String dynamicAppProvidersEnabled) { this.dynamicAppProvidersEnabled = dynamicAppProvidersEnabled; return this; } @Override public final Builder dynamicAppProvidersEnabled(DynamicAppProvidersEnabled dynamicAppProvidersEnabled) { this.dynamicAppProvidersEnabled(dynamicAppProvidersEnabled == null ? null : dynamicAppProvidersEnabled.toString()); return this; } public final String getImageSharedWithOthers() { return imageSharedWithOthers; } public final void setImageSharedWithOthers(String imageSharedWithOthers) { this.imageSharedWithOthers = imageSharedWithOthers; } @Override public final Builder imageSharedWithOthers(String imageSharedWithOthers) { this.imageSharedWithOthers = imageSharedWithOthers; return this; } @Override public final Builder imageSharedWithOthers(ImageSharedWithOthers imageSharedWithOthers) { this.imageSharedWithOthers(imageSharedWithOthers == null ? null : imageSharedWithOthers.toString()); return this; } @Override public Image build() { return new Image(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy