All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.eventbridge.model.CreateArchiveRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon EventBridge module holds the client classes that are used for communicating with Amazon EventBridge Service

There is a newer version: 1.12.780
Show newest version
/*
 * 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.eventbridge.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

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

    /**
     * 

* The name for the archive to create. *

*/ private String archiveName; /** *

* The ARN of the event bus that sends events to the archive. *

*/ private String eventSourceArn; /** *

* A description for the archive. *

*/ private String description; /** *

* An event pattern to use to filter events sent to the archive. *

*/ private String eventPattern; /** *

* The number of days to retain events for. Default value is 0. If set to 0, events are retained indefinitely *

*/ private Integer retentionDays; /** *

* The name for the archive to create. *

* * @param archiveName * The name for the archive to create. */ public void setArchiveName(String archiveName) { this.archiveName = archiveName; } /** *

* The name for the archive to create. *

* * @return The name for the archive to create. */ public String getArchiveName() { return this.archiveName; } /** *

* The name for the archive to create. *

* * @param archiveName * The name for the archive to create. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateArchiveRequest withArchiveName(String archiveName) { setArchiveName(archiveName); return this; } /** *

* The ARN of the event bus that sends events to the archive. *

* * @param eventSourceArn * The ARN of the event bus that sends events to the archive. */ public void setEventSourceArn(String eventSourceArn) { this.eventSourceArn = eventSourceArn; } /** *

* The ARN of the event bus that sends events to the archive. *

* * @return The ARN of the event bus that sends events to the archive. */ public String getEventSourceArn() { return this.eventSourceArn; } /** *

* The ARN of the event bus that sends events to the archive. *

* * @param eventSourceArn * The ARN of the event bus that sends events to the archive. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateArchiveRequest withEventSourceArn(String eventSourceArn) { setEventSourceArn(eventSourceArn); return this; } /** *

* A description for the archive. *

* * @param description * A description for the archive. */ public void setDescription(String description) { this.description = description; } /** *

* A description for the archive. *

* * @return A description for the archive. */ public String getDescription() { return this.description; } /** *

* A description for the archive. *

* * @param description * A description for the archive. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateArchiveRequest withDescription(String description) { setDescription(description); return this; } /** *

* An event pattern to use to filter events sent to the archive. *

* * @param eventPattern * An event pattern to use to filter events sent to the archive. */ public void setEventPattern(String eventPattern) { this.eventPattern = eventPattern; } /** *

* An event pattern to use to filter events sent to the archive. *

* * @return An event pattern to use to filter events sent to the archive. */ public String getEventPattern() { return this.eventPattern; } /** *

* An event pattern to use to filter events sent to the archive. *

* * @param eventPattern * An event pattern to use to filter events sent to the archive. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateArchiveRequest withEventPattern(String eventPattern) { setEventPattern(eventPattern); return this; } /** *

* The number of days to retain events for. Default value is 0. If set to 0, events are retained indefinitely *

* * @param retentionDays * The number of days to retain events for. Default value is 0. If set to 0, events are retained indefinitely */ public void setRetentionDays(Integer retentionDays) { this.retentionDays = retentionDays; } /** *

* The number of days to retain events for. Default value is 0. If set to 0, events are retained indefinitely *

* * @return The number of days to retain events for. Default value is 0. If set to 0, events are retained * indefinitely */ public Integer getRetentionDays() { return this.retentionDays; } /** *

* The number of days to retain events for. Default value is 0. If set to 0, events are retained indefinitely *

* * @param retentionDays * The number of days to retain events for. Default value is 0. If set to 0, events are retained indefinitely * @return Returns a reference to this object so that method calls can be chained together. */ public CreateArchiveRequest withRetentionDays(Integer retentionDays) { setRetentionDays(retentionDays); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getArchiveName() != null) sb.append("ArchiveName: ").append(getArchiveName()).append(","); if (getEventSourceArn() != null) sb.append("EventSourceArn: ").append(getEventSourceArn()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getEventPattern() != null) sb.append("EventPattern: ").append(getEventPattern()).append(","); if (getRetentionDays() != null) sb.append("RetentionDays: ").append(getRetentionDays()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateArchiveRequest == false) return false; CreateArchiveRequest other = (CreateArchiveRequest) obj; if (other.getArchiveName() == null ^ this.getArchiveName() == null) return false; if (other.getArchiveName() != null && other.getArchiveName().equals(this.getArchiveName()) == false) return false; if (other.getEventSourceArn() == null ^ this.getEventSourceArn() == null) return false; if (other.getEventSourceArn() != null && other.getEventSourceArn().equals(this.getEventSourceArn()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getEventPattern() == null ^ this.getEventPattern() == null) return false; if (other.getEventPattern() != null && other.getEventPattern().equals(this.getEventPattern()) == false) return false; if (other.getRetentionDays() == null ^ this.getRetentionDays() == null) return false; if (other.getRetentionDays() != null && other.getRetentionDays().equals(this.getRetentionDays()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getArchiveName() == null) ? 0 : getArchiveName().hashCode()); hashCode = prime * hashCode + ((getEventSourceArn() == null) ? 0 : getEventSourceArn().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getEventPattern() == null) ? 0 : getEventPattern().hashCode()); hashCode = prime * hashCode + ((getRetentionDays() == null) ? 0 : getRetentionDays().hashCode()); return hashCode; } @Override public CreateArchiveRequest clone() { return (CreateArchiveRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy