/* * 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.health.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Summary information about an Health event. *
** Health events can be public or account-specific: *
** Public events might be service events that are not specific to an Amazon Web Services account. For example, if * there is an issue with an Amazon Web Services Region, Health provides information about the event, even if you don't * use services or resources in that Region. *
** Account-specific events are specific to either your Amazon Web Services account or an account in your * organization. For example, if there's an issue with Amazon Elastic Compute Cloud in a Region that you use, Health * provides information about the event and the affected resources in the account. *
*
* You can determine if an event is public or account-specific by using the eventScopeCode
parameter. For
* more information, see eventScopeCode.
*
* The unique identifier for the event. The event ARN has the
* arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID
* format.
*
* For example, an event ARN might look like the following: *
*
* arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456
*
* The Amazon Web Service that is affected by the event. For example, EC2
, RDS
.
*
* The unique identifier for the event type. The format is AWS_SERVICE_DESCRIPTION
; for
* example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT
.
*
* A list of event type category codes. Possible values are issue
, accountNotification
, or
* scheduledChange
. Currently, the investigation
value isn't supported at this time.
*
* The Amazon Web Services Region name of the event. *
*/ private String region; /** ** The Amazon Web Services Availability Zone of the event. For example, us-east-1a. *
*/ private String availabilityZone; /** ** The date and time that the event began. *
*/ private java.util.Date startTime; /** ** The date and time that the event ended. *
*/ private java.util.Date endTime; /** ** The most recent date and time that the event was updated. *
*/ private java.util.Date lastUpdatedTime; /** *
* The most recent status of the event. Possible values are open
, closed
, and
* upcoming
.
*
* This parameter specifies if the Health event is a public Amazon Web Service event or an account-specific event. *
*
* If the eventScopeCode
value is PUBLIC
, then the affectedAccounts
value is
* always empty.
*
* If the eventScopeCode
value is ACCOUNT_SPECIFIC
, then the affectedAccounts
* value lists the affected Amazon Web Services accounts in your organization. For example, if an event affects a
* service such as Amazon Elastic Compute Cloud and you have Amazon Web Services accounts that use that service,
* those account IDs appear in the response.
*
* If the eventScopeCode
value is NONE
, then the eventArn
that you specified
* in the request is invalid or doesn't exist.
*
* The unique identifier for the event. The event ARN has the
* arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID
* format.
*
* For example, an event ARN might look like the following: *
*
* arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456
*
arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID
* format.
* * For example, an event ARN might look like the following: *
*
* arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456
*/
public void setArn(String arn) {
this.arn = arn;
}
/**
*
* The unique identifier for the event. The event ARN has the
* arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID
* format.
*
* For example, an event ARN might look like the following: *
*
* arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456
*
arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID
* format.
* * For example, an event ARN might look like the following: *
*
* arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456
*/
public String getArn() {
return this.arn;
}
/**
*
* The unique identifier for the event. The event ARN has the
* arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID
* format.
*
* For example, an event ARN might look like the following: *
*
* arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456
*
arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID
* format.
* * For example, an event ARN might look like the following: *
*
* arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Event withArn(String arn) {
setArn(arn);
return this;
}
/**
*
* The Amazon Web Service that is affected by the event. For example, EC2
, RDS
.
*
EC2
, RDS
.
*/
public void setService(String service) {
this.service = service;
}
/**
*
* The Amazon Web Service that is affected by the event. For example, EC2
, RDS
.
*
EC2
, RDS
.
*/
public String getService() {
return this.service;
}
/**
*
* The Amazon Web Service that is affected by the event. For example, EC2
, RDS
.
*
EC2
, RDS
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Event withService(String service) {
setService(service);
return this;
}
/**
*
* The unique identifier for the event type. The format is AWS_SERVICE_DESCRIPTION
; for
* example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT
.
*
AWS_SERVICE_DESCRIPTION
; for example,
* AWS_EC2_SYSTEM_MAINTENANCE_EVENT
.
*/
public void setEventTypeCode(String eventTypeCode) {
this.eventTypeCode = eventTypeCode;
}
/**
*
* The unique identifier for the event type. The format is AWS_SERVICE_DESCRIPTION
; for
* example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT
.
*
AWS_SERVICE_DESCRIPTION
; for example,
* AWS_EC2_SYSTEM_MAINTENANCE_EVENT
.
*/
public String getEventTypeCode() {
return this.eventTypeCode;
}
/**
*
* The unique identifier for the event type. The format is AWS_SERVICE_DESCRIPTION
; for
* example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT
.
*
AWS_SERVICE_DESCRIPTION
; for example,
* AWS_EC2_SYSTEM_MAINTENANCE_EVENT
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Event withEventTypeCode(String eventTypeCode) {
setEventTypeCode(eventTypeCode);
return this;
}
/**
*
* A list of event type category codes. Possible values are issue
, accountNotification
, or
* scheduledChange
. Currently, the investigation
value isn't supported at this time.
*
issue
,
* accountNotification
, or scheduledChange
. Currently, the
* investigation
value isn't supported at this time.
* @see EventTypeCategory
*/
public void setEventTypeCategory(String eventTypeCategory) {
this.eventTypeCategory = eventTypeCategory;
}
/**
*
* A list of event type category codes. Possible values are issue
, accountNotification
, or
* scheduledChange
. Currently, the investigation
value isn't supported at this time.
*
issue
,
* accountNotification
, or scheduledChange
. Currently, the
* investigation
value isn't supported at this time.
* @see EventTypeCategory
*/
public String getEventTypeCategory() {
return this.eventTypeCategory;
}
/**
*
* A list of event type category codes. Possible values are issue
, accountNotification
, or
* scheduledChange
. Currently, the investigation
value isn't supported at this time.
*
issue
,
* accountNotification
, or scheduledChange
. Currently, the
* investigation
value isn't supported at this time.
* @return Returns a reference to this object so that method calls can be chained together.
* @see EventTypeCategory
*/
public Event withEventTypeCategory(String eventTypeCategory) {
setEventTypeCategory(eventTypeCategory);
return this;
}
/**
*
* A list of event type category codes. Possible values are issue
, accountNotification
, or
* scheduledChange
. Currently, the investigation
value isn't supported at this time.
*
issue
,
* accountNotification
, or scheduledChange
. Currently, the
* investigation
value isn't supported at this time.
* @see EventTypeCategory
*/
public void setEventTypeCategory(EventTypeCategory eventTypeCategory) {
withEventTypeCategory(eventTypeCategory);
}
/**
*
* A list of event type category codes. Possible values are issue
, accountNotification
, or
* scheduledChange
. Currently, the investigation
value isn't supported at this time.
*
issue
,
* accountNotification
, or scheduledChange
. Currently, the
* investigation
value isn't supported at this time.
* @return Returns a reference to this object so that method calls can be chained together.
* @see EventTypeCategory
*/
public Event withEventTypeCategory(EventTypeCategory eventTypeCategory) {
this.eventTypeCategory = eventTypeCategory.toString();
return this;
}
/**
* * The Amazon Web Services Region name of the event. *
* * @param region * The Amazon Web Services Region name of the event. */ public void setRegion(String region) { this.region = region; } /** ** The Amazon Web Services Region name of the event. *
* * @return The Amazon Web Services Region name of the event. */ public String getRegion() { return this.region; } /** ** The Amazon Web Services Region name of the event. *
* * @param region * The Amazon Web Services Region name of the event. * @return Returns a reference to this object so that method calls can be chained together. */ public Event withRegion(String region) { setRegion(region); return this; } /** ** The Amazon Web Services Availability Zone of the event. For example, us-east-1a. *
* * @param availabilityZone * The Amazon Web Services Availability Zone of the event. For example, us-east-1a. */ public void setAvailabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; } /** ** The Amazon Web Services Availability Zone of the event. For example, us-east-1a. *
* * @return The Amazon Web Services Availability Zone of the event. For example, us-east-1a. */ public String getAvailabilityZone() { return this.availabilityZone; } /** ** The Amazon Web Services Availability Zone of the event. For example, us-east-1a. *
* * @param availabilityZone * The Amazon Web Services Availability Zone of the event. For example, us-east-1a. * @return Returns a reference to this object so that method calls can be chained together. */ public Event withAvailabilityZone(String availabilityZone) { setAvailabilityZone(availabilityZone); return this; } /** ** The date and time that the event began. *
* * @param startTime * The date and time that the event began. */ public void setStartTime(java.util.Date startTime) { this.startTime = startTime; } /** ** The date and time that the event began. *
* * @return The date and time that the event began. */ public java.util.Date getStartTime() { return this.startTime; } /** ** The date and time that the event began. *
* * @param startTime * The date and time that the event began. * @return Returns a reference to this object so that method calls can be chained together. */ public Event withStartTime(java.util.Date startTime) { setStartTime(startTime); return this; } /** ** The date and time that the event ended. *
* * @param endTime * The date and time that the event ended. */ public void setEndTime(java.util.Date endTime) { this.endTime = endTime; } /** ** The date and time that the event ended. *
* * @return The date and time that the event ended. */ public java.util.Date getEndTime() { return this.endTime; } /** ** The date and time that the event ended. *
* * @param endTime * The date and time that the event ended. * @return Returns a reference to this object so that method calls can be chained together. */ public Event withEndTime(java.util.Date endTime) { setEndTime(endTime); return this; } /** ** The most recent date and time that the event was updated. *
* * @param lastUpdatedTime * The most recent date and time that the event was updated. */ public void setLastUpdatedTime(java.util.Date lastUpdatedTime) { this.lastUpdatedTime = lastUpdatedTime; } /** ** The most recent date and time that the event was updated. *
* * @return The most recent date and time that the event was updated. */ public java.util.Date getLastUpdatedTime() { return this.lastUpdatedTime; } /** ** The most recent date and time that the event was updated. *
* * @param lastUpdatedTime * The most recent date and time that the event was updated. * @return Returns a reference to this object so that method calls can be chained together. */ public Event withLastUpdatedTime(java.util.Date lastUpdatedTime) { setLastUpdatedTime(lastUpdatedTime); return this; } /** *
* The most recent status of the event. Possible values are open
, closed
, and
* upcoming
.
*
open
, closed
, and
* upcoming
.
* @see EventStatusCode
*/
public void setStatusCode(String statusCode) {
this.statusCode = statusCode;
}
/**
*
* The most recent status of the event. Possible values are open
, closed
, and
* upcoming
.
*
open
, closed
, and
* upcoming
.
* @see EventStatusCode
*/
public String getStatusCode() {
return this.statusCode;
}
/**
*
* The most recent status of the event. Possible values are open
, closed
, and
* upcoming
.
*
open
, closed
, and
* upcoming
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see EventStatusCode
*/
public Event withStatusCode(String statusCode) {
setStatusCode(statusCode);
return this;
}
/**
*
* The most recent status of the event. Possible values are open
, closed
, and
* upcoming
.
*
open
, closed
, and
* upcoming
.
* @see EventStatusCode
*/
public void setStatusCode(EventStatusCode statusCode) {
withStatusCode(statusCode);
}
/**
*
* The most recent status of the event. Possible values are open
, closed
, and
* upcoming
.
*
open
, closed
, and
* upcoming
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see EventStatusCode
*/
public Event withStatusCode(EventStatusCode statusCode) {
this.statusCode = statusCode.toString();
return this;
}
/**
* * This parameter specifies if the Health event is a public Amazon Web Service event or an account-specific event. *
*
* If the eventScopeCode
value is PUBLIC
, then the affectedAccounts
value is
* always empty.
*
* If the eventScopeCode
value is ACCOUNT_SPECIFIC
, then the affectedAccounts
* value lists the affected Amazon Web Services accounts in your organization. For example, if an event affects a
* service such as Amazon Elastic Compute Cloud and you have Amazon Web Services accounts that use that service,
* those account IDs appear in the response.
*
* If the eventScopeCode
value is NONE
, then the eventArn
that you specified
* in the request is invalid or doesn't exist.
*
* If the eventScopeCode
value is PUBLIC
, then the affectedAccounts
* value is always empty.
*
* If the eventScopeCode
value is ACCOUNT_SPECIFIC
, then the
* affectedAccounts
value lists the affected Amazon Web Services accounts in your organization.
* For example, if an event affects a service such as Amazon Elastic Compute Cloud and you have Amazon Web
* Services accounts that use that service, those account IDs appear in the response.
*
* If the eventScopeCode
value is NONE
, then the eventArn
that you
* specified in the request is invalid or doesn't exist.
*
* This parameter specifies if the Health event is a public Amazon Web Service event or an account-specific event. *
*
* If the eventScopeCode
value is PUBLIC
, then the affectedAccounts
value is
* always empty.
*
* If the eventScopeCode
value is ACCOUNT_SPECIFIC
, then the affectedAccounts
* value lists the affected Amazon Web Services accounts in your organization. For example, if an event affects a
* service such as Amazon Elastic Compute Cloud and you have Amazon Web Services accounts that use that service,
* those account IDs appear in the response.
*
* If the eventScopeCode
value is NONE
, then the eventArn
that you specified
* in the request is invalid or doesn't exist.
*
* If the eventScopeCode
value is PUBLIC
, then the affectedAccounts
* value is always empty.
*
* If the eventScopeCode
value is ACCOUNT_SPECIFIC
, then the
* affectedAccounts
value lists the affected Amazon Web Services accounts in your organization.
* For example, if an event affects a service such as Amazon Elastic Compute Cloud and you have Amazon Web
* Services accounts that use that service, those account IDs appear in the response.
*
* If the eventScopeCode
value is NONE
, then the eventArn
that you
* specified in the request is invalid or doesn't exist.
*
* This parameter specifies if the Health event is a public Amazon Web Service event or an account-specific event. *
*
* If the eventScopeCode
value is PUBLIC
, then the affectedAccounts
value is
* always empty.
*
* If the eventScopeCode
value is ACCOUNT_SPECIFIC
, then the affectedAccounts
* value lists the affected Amazon Web Services accounts in your organization. For example, if an event affects a
* service such as Amazon Elastic Compute Cloud and you have Amazon Web Services accounts that use that service,
* those account IDs appear in the response.
*
* If the eventScopeCode
value is NONE
, then the eventArn
that you specified
* in the request is invalid or doesn't exist.
*
* If the eventScopeCode
value is PUBLIC
, then the affectedAccounts
* value is always empty.
*
* If the eventScopeCode
value is ACCOUNT_SPECIFIC
, then the
* affectedAccounts
value lists the affected Amazon Web Services accounts in your organization.
* For example, if an event affects a service such as Amazon Elastic Compute Cloud and you have Amazon Web
* Services accounts that use that service, those account IDs appear in the response.
*
* If the eventScopeCode
value is NONE
, then the eventArn
that you
* specified in the request is invalid or doesn't exist.
*
* This parameter specifies if the Health event is a public Amazon Web Service event or an account-specific event. *
*
* If the eventScopeCode
value is PUBLIC
, then the affectedAccounts
value is
* always empty.
*
* If the eventScopeCode
value is ACCOUNT_SPECIFIC
, then the affectedAccounts
* value lists the affected Amazon Web Services accounts in your organization. For example, if an event affects a
* service such as Amazon Elastic Compute Cloud and you have Amazon Web Services accounts that use that service,
* those account IDs appear in the response.
*
* If the eventScopeCode
value is NONE
, then the eventArn
that you specified
* in the request is invalid or doesn't exist.
*
* If the eventScopeCode
value is PUBLIC
, then the affectedAccounts
* value is always empty.
*
* If the eventScopeCode
value is ACCOUNT_SPECIFIC
, then the
* affectedAccounts
value lists the affected Amazon Web Services accounts in your organization.
* For example, if an event affects a service such as Amazon Elastic Compute Cloud and you have Amazon Web
* Services accounts that use that service, those account IDs appear in the response.
*
* If the eventScopeCode
value is NONE
, then the eventArn
that you
* specified in the request is invalid or doesn't exist.
*
* This parameter specifies if the Health event is a public Amazon Web Service event or an account-specific event. *
*
* If the eventScopeCode
value is PUBLIC
, then the affectedAccounts
value is
* always empty.
*
* If the eventScopeCode
value is ACCOUNT_SPECIFIC
, then the affectedAccounts
* value lists the affected Amazon Web Services accounts in your organization. For example, if an event affects a
* service such as Amazon Elastic Compute Cloud and you have Amazon Web Services accounts that use that service,
* those account IDs appear in the response.
*
* If the eventScopeCode
value is NONE
, then the eventArn
that you specified
* in the request is invalid or doesn't exist.
*
* If the eventScopeCode
value is PUBLIC
, then the affectedAccounts
* value is always empty.
*
* If the eventScopeCode
value is ACCOUNT_SPECIFIC
, then the
* affectedAccounts
value lists the affected Amazon Web Services accounts in your organization.
* For example, if an event affects a service such as Amazon Elastic Compute Cloud and you have Amazon Web
* Services accounts that use that service, those account IDs appear in the response.
*
* If the eventScopeCode
value is NONE
, then the eventArn
that you
* specified in the request is invalid or doesn't exist.
*