/* * 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.guardduty.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Contains information about the details of an instance. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class InstanceDetails implements Serializable, Cloneable, StructuredPojo { /** ** The Availability Zone of the EC2 instance. *
*/ private String availabilityZone; /** ** The profile information of the EC2 instance. *
*/ private IamInstanceProfile iamInstanceProfile; /** ** The image description of the EC2 instance. *
*/ private String imageDescription; /** ** The image ID of the EC2 instance. *
*/ private String imageId; /** ** The ID of the EC2 instance. *
*/ private String instanceId; /** ** The state of the EC2 instance. *
*/ private String instanceState; /** ** The type of the EC2 instance. *
*/ private String instanceType; /** ** The Amazon Resource Name (ARN) of the Amazon Web Services Outpost. Only applicable to Amazon Web Services * Outposts instances. *
*/ private String outpostArn; /** ** The launch time of the EC2 instance. *
*/ private String launchTime; /** ** The elastic network interface information of the EC2 instance. *
*/ private java.util.List* The platform of the EC2 instance. *
*/ private String platform; /** ** The product code of the EC2 instance. *
*/ private java.util.List* The tags of the EC2 instance. *
*/ private java.util.List* The Availability Zone of the EC2 instance. *
* * @param availabilityZone * The Availability Zone of the EC2 instance. */ public void setAvailabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; } /** ** The Availability Zone of the EC2 instance. *
* * @return The Availability Zone of the EC2 instance. */ public String getAvailabilityZone() { return this.availabilityZone; } /** ** The Availability Zone of the EC2 instance. *
* * @param availabilityZone * The Availability Zone of the EC2 instance. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceDetails withAvailabilityZone(String availabilityZone) { setAvailabilityZone(availabilityZone); return this; } /** ** The profile information of the EC2 instance. *
* * @param iamInstanceProfile * The profile information of the EC2 instance. */ public void setIamInstanceProfile(IamInstanceProfile iamInstanceProfile) { this.iamInstanceProfile = iamInstanceProfile; } /** ** The profile information of the EC2 instance. *
* * @return The profile information of the EC2 instance. */ public IamInstanceProfile getIamInstanceProfile() { return this.iamInstanceProfile; } /** ** The profile information of the EC2 instance. *
* * @param iamInstanceProfile * The profile information of the EC2 instance. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceDetails withIamInstanceProfile(IamInstanceProfile iamInstanceProfile) { setIamInstanceProfile(iamInstanceProfile); return this; } /** ** The image description of the EC2 instance. *
* * @param imageDescription * The image description of the EC2 instance. */ public void setImageDescription(String imageDescription) { this.imageDescription = imageDescription; } /** ** The image description of the EC2 instance. *
* * @return The image description of the EC2 instance. */ public String getImageDescription() { return this.imageDescription; } /** ** The image description of the EC2 instance. *
* * @param imageDescription * The image description of the EC2 instance. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceDetails withImageDescription(String imageDescription) { setImageDescription(imageDescription); return this; } /** ** The image ID of the EC2 instance. *
* * @param imageId * The image ID of the EC2 instance. */ public void setImageId(String imageId) { this.imageId = imageId; } /** ** The image ID of the EC2 instance. *
* * @return The image ID of the EC2 instance. */ public String getImageId() { return this.imageId; } /** ** The image ID of the EC2 instance. *
* * @param imageId * The image ID of the EC2 instance. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceDetails withImageId(String imageId) { setImageId(imageId); return this; } /** ** The ID of the EC2 instance. *
* * @param instanceId * The ID of the EC2 instance. */ public void setInstanceId(String instanceId) { this.instanceId = instanceId; } /** ** The ID of the EC2 instance. *
* * @return The ID of the EC2 instance. */ public String getInstanceId() { return this.instanceId; } /** ** The ID of the EC2 instance. *
* * @param instanceId * The ID of the EC2 instance. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceDetails withInstanceId(String instanceId) { setInstanceId(instanceId); return this; } /** ** The state of the EC2 instance. *
* * @param instanceState * The state of the EC2 instance. */ public void setInstanceState(String instanceState) { this.instanceState = instanceState; } /** ** The state of the EC2 instance. *
* * @return The state of the EC2 instance. */ public String getInstanceState() { return this.instanceState; } /** ** The state of the EC2 instance. *
* * @param instanceState * The state of the EC2 instance. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceDetails withInstanceState(String instanceState) { setInstanceState(instanceState); return this; } /** ** The type of the EC2 instance. *
* * @param instanceType * The type of the EC2 instance. */ public void setInstanceType(String instanceType) { this.instanceType = instanceType; } /** ** The type of the EC2 instance. *
* * @return The type of the EC2 instance. */ public String getInstanceType() { return this.instanceType; } /** ** The type of the EC2 instance. *
* * @param instanceType * The type of the EC2 instance. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceDetails withInstanceType(String instanceType) { setInstanceType(instanceType); return this; } /** ** The Amazon Resource Name (ARN) of the Amazon Web Services Outpost. Only applicable to Amazon Web Services * Outposts instances. *
* * @param outpostArn * The Amazon Resource Name (ARN) of the Amazon Web Services Outpost. Only applicable to Amazon Web Services * Outposts instances. */ public void setOutpostArn(String outpostArn) { this.outpostArn = outpostArn; } /** ** The Amazon Resource Name (ARN) of the Amazon Web Services Outpost. Only applicable to Amazon Web Services * Outposts instances. *
* * @return The Amazon Resource Name (ARN) of the Amazon Web Services Outpost. Only applicable to Amazon Web Services * Outposts instances. */ public String getOutpostArn() { return this.outpostArn; } /** ** The Amazon Resource Name (ARN) of the Amazon Web Services Outpost. Only applicable to Amazon Web Services * Outposts instances. *
* * @param outpostArn * The Amazon Resource Name (ARN) of the Amazon Web Services Outpost. Only applicable to Amazon Web Services * Outposts instances. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceDetails withOutpostArn(String outpostArn) { setOutpostArn(outpostArn); return this; } /** ** The launch time of the EC2 instance. *
* * @param launchTime * The launch time of the EC2 instance. */ public void setLaunchTime(String launchTime) { this.launchTime = launchTime; } /** ** The launch time of the EC2 instance. *
* * @return The launch time of the EC2 instance. */ public String getLaunchTime() { return this.launchTime; } /** ** The launch time of the EC2 instance. *
* * @param launchTime * The launch time of the EC2 instance. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceDetails withLaunchTime(String launchTime) { setLaunchTime(launchTime); return this; } /** ** The elastic network interface information of the EC2 instance. *
* * @return The elastic network interface information of the EC2 instance. */ public java.util.List* The elastic network interface information of the EC2 instance. *
* * @param networkInterfaces * The elastic network interface information of the EC2 instance. */ public void setNetworkInterfaces(java.util.Collection* The elastic network interface information of the EC2 instance. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setNetworkInterfaces(java.util.Collection)} or {@link #withNetworkInterfaces(java.util.Collection)} if * you want to override the existing values. *
* * @param networkInterfaces * The elastic network interface information of the EC2 instance. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceDetails withNetworkInterfaces(NetworkInterface... networkInterfaces) { if (this.networkInterfaces == null) { setNetworkInterfaces(new java.util.ArrayList* The elastic network interface information of the EC2 instance. *
* * @param networkInterfaces * The elastic network interface information of the EC2 instance. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceDetails withNetworkInterfaces(java.util.Collection* The platform of the EC2 instance. *
* * @param platform * The platform of the EC2 instance. */ public void setPlatform(String platform) { this.platform = platform; } /** ** The platform of the EC2 instance. *
* * @return The platform of the EC2 instance. */ public String getPlatform() { return this.platform; } /** ** The platform of the EC2 instance. *
* * @param platform * The platform of the EC2 instance. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceDetails withPlatform(String platform) { setPlatform(platform); return this; } /** ** The product code of the EC2 instance. *
* * @return The product code of the EC2 instance. */ public java.util.List* The product code of the EC2 instance. *
* * @param productCodes * The product code of the EC2 instance. */ public void setProductCodes(java.util.Collection* The product code of the EC2 instance. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setProductCodes(java.util.Collection)} or {@link #withProductCodes(java.util.Collection)} if you want to * override the existing values. *
* * @param productCodes * The product code of the EC2 instance. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceDetails withProductCodes(ProductCode... productCodes) { if (this.productCodes == null) { setProductCodes(new java.util.ArrayList* The product code of the EC2 instance. *
* * @param productCodes * The product code of the EC2 instance. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceDetails withProductCodes(java.util.Collection* The tags of the EC2 instance. *
* * @return The tags of the EC2 instance. */ public java.util.List* The tags of the EC2 instance. *
* * @param tags * The tags of the EC2 instance. */ public void setTags(java.util.Collection* The tags of the EC2 instance. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * The tags of the EC2 instance. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceDetails withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList* The tags of the EC2 instance. *
* * @param tags * The tags of the EC2 instance. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceDetails withTags(java.util.Collection