/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.appstream.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Describes an app block. *
** App blocks are an Amazon AppStream 2.0 resource that stores the details about the virtual hard disk in an S3 bucket. * It also stores the setup script with details about how to mount the virtual hard disk. The virtual hard disk includes * the application binaries and other files necessary to launch your applications. Multiple applications can be assigned * to a single app block. *
** This is only supported for Elastic fleets. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AppBlock implements Serializable, Cloneable, StructuredPojo { /** ** The name of the app block. *
*/ private String name; /** ** The ARN of the app block. *
*/ private String arn; /** ** The description of the app block. *
*/ private String description; /** ** The display name of the app block. *
*/ private String displayName; /** ** The source S3 location of the app block. *
*/ private S3Location sourceS3Location; /** ** The setup script details of the app block. *
*
* This only applies to app blocks with PackagingType CUSTOM
.
*
* The created time of the app block. *
*/ private java.util.Date createdTime; /** ** The post setup script details of the app block. *
*
* This only applies to app blocks with PackagingType APPSTREAM2
.
*
* The packaging type of the app block. *
*/ private String packagingType; /** ** The state of the app block. *
*
* An app block with AppStream 2.0 packaging will be in the INACTIVE
state if no application package
* (VHD) is assigned to it. After an application package (VHD) is created by an app block builder for an app block,
* it becomes ACTIVE
.
*
* Custom app blocks are always in the ACTIVE
state and no action is required to use them.
*
* The errors of the app block. *
*/ private java.util.List* The name of the app block. *
* * @param name * The name of the app block. */ public void setName(String name) { this.name = name; } /** ** The name of the app block. *
* * @return The name of the app block. */ public String getName() { return this.name; } /** ** The name of the app block. *
* * @param name * The name of the app block. * @return Returns a reference to this object so that method calls can be chained together. */ public AppBlock withName(String name) { setName(name); return this; } /** ** The ARN of the app block. *
* * @param arn * The ARN of the app block. */ public void setArn(String arn) { this.arn = arn; } /** ** The ARN of the app block. *
* * @return The ARN of the app block. */ public String getArn() { return this.arn; } /** ** The ARN of the app block. *
* * @param arn * The ARN of the app block. * @return Returns a reference to this object so that method calls can be chained together. */ public AppBlock withArn(String arn) { setArn(arn); return this; } /** ** The description of the app block. *
* * @param description * The description of the app block. */ public void setDescription(String description) { this.description = description; } /** ** The description of the app block. *
* * @return The description of the app block. */ public String getDescription() { return this.description; } /** ** The description of the app block. *
* * @param description * The description of the app block. * @return Returns a reference to this object so that method calls can be chained together. */ public AppBlock withDescription(String description) { setDescription(description); return this; } /** ** The display name of the app block. *
* * @param displayName * The display name of the app block. */ public void setDisplayName(String displayName) { this.displayName = displayName; } /** ** The display name of the app block. *
* * @return The display name of the app block. */ public String getDisplayName() { return this.displayName; } /** ** The display name of the app block. *
* * @param displayName * The display name of the app block. * @return Returns a reference to this object so that method calls can be chained together. */ public AppBlock withDisplayName(String displayName) { setDisplayName(displayName); return this; } /** ** The source S3 location of the app block. *
* * @param sourceS3Location * The source S3 location of the app block. */ public void setSourceS3Location(S3Location sourceS3Location) { this.sourceS3Location = sourceS3Location; } /** ** The source S3 location of the app block. *
* * @return The source S3 location of the app block. */ public S3Location getSourceS3Location() { return this.sourceS3Location; } /** ** The source S3 location of the app block. *
* * @param sourceS3Location * The source S3 location of the app block. * @return Returns a reference to this object so that method calls can be chained together. */ public AppBlock withSourceS3Location(S3Location sourceS3Location) { setSourceS3Location(sourceS3Location); return this; } /** ** The setup script details of the app block. *
*
* This only applies to app blocks with PackagingType CUSTOM
.
*
* This only applies to app blocks with PackagingType CUSTOM
.
*/
public void setSetupScriptDetails(ScriptDetails setupScriptDetails) {
this.setupScriptDetails = setupScriptDetails;
}
/**
*
* The setup script details of the app block. *
*
* This only applies to app blocks with PackagingType CUSTOM
.
*
* This only applies to app blocks with PackagingType CUSTOM
.
*/
public ScriptDetails getSetupScriptDetails() {
return this.setupScriptDetails;
}
/**
*
* The setup script details of the app block. *
*
* This only applies to app blocks with PackagingType CUSTOM
.
*
* This only applies to app blocks with PackagingType CUSTOM
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AppBlock withSetupScriptDetails(ScriptDetails setupScriptDetails) {
setSetupScriptDetails(setupScriptDetails);
return this;
}
/**
*
* The created time of the app block. *
* * @param createdTime * The created time of the app block. */ public void setCreatedTime(java.util.Date createdTime) { this.createdTime = createdTime; } /** ** The created time of the app block. *
* * @return The created time of the app block. */ public java.util.Date getCreatedTime() { return this.createdTime; } /** ** The created time of the app block. *
* * @param createdTime * The created time of the app block. * @return Returns a reference to this object so that method calls can be chained together. */ public AppBlock withCreatedTime(java.util.Date createdTime) { setCreatedTime(createdTime); return this; } /** ** The post setup script details of the app block. *
*
* This only applies to app blocks with PackagingType APPSTREAM2
.
*
* This only applies to app blocks with PackagingType APPSTREAM2
.
*/
public void setPostSetupScriptDetails(ScriptDetails postSetupScriptDetails) {
this.postSetupScriptDetails = postSetupScriptDetails;
}
/**
*
* The post setup script details of the app block. *
*
* This only applies to app blocks with PackagingType APPSTREAM2
.
*
* This only applies to app blocks with PackagingType APPSTREAM2
.
*/
public ScriptDetails getPostSetupScriptDetails() {
return this.postSetupScriptDetails;
}
/**
*
* The post setup script details of the app block. *
*
* This only applies to app blocks with PackagingType APPSTREAM2
.
*
* This only applies to app blocks with PackagingType APPSTREAM2
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AppBlock withPostSetupScriptDetails(ScriptDetails postSetupScriptDetails) {
setPostSetupScriptDetails(postSetupScriptDetails);
return this;
}
/**
*
* The packaging type of the app block. *
* * @param packagingType * The packaging type of the app block. * @see PackagingType */ public void setPackagingType(String packagingType) { this.packagingType = packagingType; } /** ** The packaging type of the app block. *
* * @return The packaging type of the app block. * @see PackagingType */ public String getPackagingType() { return this.packagingType; } /** ** The packaging type of the app block. *
* * @param packagingType * The packaging type of the app block. * @return Returns a reference to this object so that method calls can be chained together. * @see PackagingType */ public AppBlock withPackagingType(String packagingType) { setPackagingType(packagingType); return this; } /** ** The packaging type of the app block. *
* * @param packagingType * The packaging type of the app block. * @return Returns a reference to this object so that method calls can be chained together. * @see PackagingType */ public AppBlock withPackagingType(PackagingType packagingType) { this.packagingType = packagingType.toString(); return this; } /** ** The state of the app block. *
*
* An app block with AppStream 2.0 packaging will be in the INACTIVE
state if no application package
* (VHD) is assigned to it. After an application package (VHD) is created by an app block builder for an app block,
* it becomes ACTIVE
.
*
* Custom app blocks are always in the ACTIVE
state and no action is required to use them.
*
* An app block with AppStream 2.0 packaging will be in the INACTIVE
state if no application
* package (VHD) is assigned to it. After an application package (VHD) is created by an app block builder for
* an app block, it becomes ACTIVE
.
*
* Custom app blocks are always in the ACTIVE
state and no action is required to use them.
* @see AppBlockState
*/
public void setState(String state) {
this.state = state;
}
/**
*
* The state of the app block. *
*
* An app block with AppStream 2.0 packaging will be in the INACTIVE
state if no application package
* (VHD) is assigned to it. After an application package (VHD) is created by an app block builder for an app block,
* it becomes ACTIVE
.
*
* Custom app blocks are always in the ACTIVE
state and no action is required to use them.
*
* An app block with AppStream 2.0 packaging will be in the INACTIVE
state if no application
* package (VHD) is assigned to it. After an application package (VHD) is created by an app block builder
* for an app block, it becomes ACTIVE
.
*
* Custom app blocks are always in the ACTIVE
state and no action is required to use them.
* @see AppBlockState
*/
public String getState() {
return this.state;
}
/**
*
* The state of the app block. *
*
* An app block with AppStream 2.0 packaging will be in the INACTIVE
state if no application package
* (VHD) is assigned to it. After an application package (VHD) is created by an app block builder for an app block,
* it becomes ACTIVE
.
*
* Custom app blocks are always in the ACTIVE
state and no action is required to use them.
*
* An app block with AppStream 2.0 packaging will be in the INACTIVE
state if no application
* package (VHD) is assigned to it. After an application package (VHD) is created by an app block builder for
* an app block, it becomes ACTIVE
.
*
* Custom app blocks are always in the ACTIVE
state and no action is required to use them.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AppBlockState
*/
public AppBlock withState(String state) {
setState(state);
return this;
}
/**
*
* The state of the app block. *
*
* An app block with AppStream 2.0 packaging will be in the INACTIVE
state if no application package
* (VHD) is assigned to it. After an application package (VHD) is created by an app block builder for an app block,
* it becomes ACTIVE
.
*
* Custom app blocks are always in the ACTIVE
state and no action is required to use them.
*
* An app block with AppStream 2.0 packaging will be in the INACTIVE
state if no application
* package (VHD) is assigned to it. After an application package (VHD) is created by an app block builder for
* an app block, it becomes ACTIVE
.
*
* Custom app blocks are always in the ACTIVE
state and no action is required to use them.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AppBlockState
*/
public AppBlock withState(AppBlockState state) {
this.state = state.toString();
return this;
}
/**
*
* The errors of the app block. *
* * @return The errors of the app block. */ public java.util.List* The errors of the app block. *
* * @param appBlockErrors * The errors of the app block. */ public void setAppBlockErrors(java.util.Collection* The errors of the app block. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setAppBlockErrors(java.util.Collection)} or {@link #withAppBlockErrors(java.util.Collection)} if you want * to override the existing values. *
* * @param appBlockErrors * The errors of the app block. * @return Returns a reference to this object so that method calls can be chained together. */ public AppBlock withAppBlockErrors(ErrorDetails... appBlockErrors) { if (this.appBlockErrors == null) { setAppBlockErrors(new java.util.ArrayList* The errors of the app block. *
* * @param appBlockErrors * The errors of the app block. * @return Returns a reference to this object so that method calls can be chained together. */ public AppBlock withAppBlockErrors(java.util.Collection