/* * 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.lightsail.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Describes information about the health of the instance. *

* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class InstanceHealthSummary implements Serializable, Cloneable, StructuredPojo { /** *

* The name of the Lightsail instance for which you are requesting health check data. *

*/ private String instanceName; /** *

* Describes the overall instance health. Valid values are below. *

*/ private String instanceHealth; /** *

* More information about the instance health. If the instanceHealth is healthy, then an * instanceHealthReason value is not provided. *

*

* If instanceHealth is initial, the instanceHealthReason * value can be one of the following: *

* *

* If instanceHealth is unhealthy, the instanceHealthReason * value can be one of the following: *

* *

* If instanceHealth is unused, the instanceHealthReason * value can be one of the following: *

* *

* If instanceHealth is draining, the instanceHealthReason * value can be one of the following: *

* */ private String instanceHealthReason; /** *

* The name of the Lightsail instance for which you are requesting health check data. *

* * @param instanceName * The name of the Lightsail instance for which you are requesting health check data. */ public void setInstanceName(String instanceName) { this.instanceName = instanceName; } /** *

* The name of the Lightsail instance for which you are requesting health check data. *

* * @return The name of the Lightsail instance for which you are requesting health check data. */ public String getInstanceName() { return this.instanceName; } /** *

* The name of the Lightsail instance for which you are requesting health check data. *

* * @param instanceName * The name of the Lightsail instance for which you are requesting health check data. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceHealthSummary withInstanceName(String instanceName) { setInstanceName(instanceName); return this; } /** *

* Describes the overall instance health. Valid values are below. *

* * @param instanceHealth * Describes the overall instance health. Valid values are below. * @see InstanceHealthState */ public void setInstanceHealth(String instanceHealth) { this.instanceHealth = instanceHealth; } /** *

* Describes the overall instance health. Valid values are below. *

* * @return Describes the overall instance health. Valid values are below. * @see InstanceHealthState */ public String getInstanceHealth() { return this.instanceHealth; } /** *

* Describes the overall instance health. Valid values are below. *

* * @param instanceHealth * Describes the overall instance health. Valid values are below. * @return Returns a reference to this object so that method calls can be chained together. * @see InstanceHealthState */ public InstanceHealthSummary withInstanceHealth(String instanceHealth) { setInstanceHealth(instanceHealth); return this; } /** *

* Describes the overall instance health. Valid values are below. *

* * @param instanceHealth * Describes the overall instance health. Valid values are below. * @return Returns a reference to this object so that method calls can be chained together. * @see InstanceHealthState */ public InstanceHealthSummary withInstanceHealth(InstanceHealthState instanceHealth) { this.instanceHealth = instanceHealth.toString(); return this; } /** *

* More information about the instance health. If the instanceHealth is healthy, then an * instanceHealthReason value is not provided. *

*

* If instanceHealth is initial, the instanceHealthReason * value can be one of the following: *

* *

* If instanceHealth is unhealthy, the instanceHealthReason * value can be one of the following: *

* *

* If instanceHealth is unused, the instanceHealthReason * value can be one of the following: *

* *

* If instanceHealth is draining, the instanceHealthReason * value can be one of the following: *

* * * @param instanceHealthReason * More information about the instance health. If the instanceHealth is healthy, * then an instanceHealthReason value is not provided.

*

* If instanceHealth is initial, the instanceHealthReason * value can be one of the following: *

* *

* If instanceHealth is unhealthy, the * instanceHealthReason value can be one of the following: *

* *

* If instanceHealth is unused, the instanceHealthReason * value can be one of the following: *

* *

* If instanceHealth is draining, the * instanceHealthReason value can be one of the following: *

*