/* * 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 an event for a database. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class RelationalDatabaseEvent implements Serializable, Cloneable, StructuredPojo { /** ** The database that the database event relates to. *
*/ private String resource; /** ** The timestamp when the database event was created. *
*/ private java.util.Date createdAt; /** ** The message of the database event. *
*/ private String message; /** ** The category that the database event belongs to. *
*/ private java.util.List* The database that the database event relates to. *
* * @param resource * The database that the database event relates to. */ public void setResource(String resource) { this.resource = resource; } /** ** The database that the database event relates to. *
* * @return The database that the database event relates to. */ public String getResource() { return this.resource; } /** ** The database that the database event relates to. *
* * @param resource * The database that the database event relates to. * @return Returns a reference to this object so that method calls can be chained together. */ public RelationalDatabaseEvent withResource(String resource) { setResource(resource); return this; } /** ** The timestamp when the database event was created. *
* * @param createdAt * The timestamp when the database event was created. */ public void setCreatedAt(java.util.Date createdAt) { this.createdAt = createdAt; } /** ** The timestamp when the database event was created. *
* * @return The timestamp when the database event was created. */ public java.util.Date getCreatedAt() { return this.createdAt; } /** ** The timestamp when the database event was created. *
* * @param createdAt * The timestamp when the database event was created. * @return Returns a reference to this object so that method calls can be chained together. */ public RelationalDatabaseEvent withCreatedAt(java.util.Date createdAt) { setCreatedAt(createdAt); return this; } /** ** The message of the database event. *
* * @param message * The message of the database event. */ public void setMessage(String message) { this.message = message; } /** ** The message of the database event. *
* * @return The message of the database event. */ public String getMessage() { return this.message; } /** ** The message of the database event. *
* * @param message * The message of the database event. * @return Returns a reference to this object so that method calls can be chained together. */ public RelationalDatabaseEvent withMessage(String message) { setMessage(message); return this; } /** ** The category that the database event belongs to. *
* * @return The category that the database event belongs to. */ public java.util.List* The category that the database event belongs to. *
* * @param eventCategories * The category that the database event belongs to. */ public void setEventCategories(java.util.Collection* The category that the database event belongs to. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setEventCategories(java.util.Collection)} or {@link #withEventCategories(java.util.Collection)} if you * want to override the existing values. *
* * @param eventCategories * The category that the database event belongs to. * @return Returns a reference to this object so that method calls can be chained together. */ public RelationalDatabaseEvent withEventCategories(String... eventCategories) { if (this.eventCategories == null) { setEventCategories(new java.util.ArrayList* The category that the database event belongs to. *
* * @param eventCategories * The category that the database event belongs to. * @return Returns a reference to this object so that method calls can be chained together. */ public RelationalDatabaseEvent withEventCategories(java.util.Collection