com.amazonaws.services.eventbridge.model.UpdateEndpointRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-eventbridge Show documentation
/*
* Copyright 2019-2024 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 UpdateEndpointRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The name of the endpoint you want to update.
*
*/
private String name;
/**
*
* A description for the endpoint.
*
*/
private String description;
/**
*
* Configure the routing policy, including the health check and secondary Region.
*
*/
private RoutingConfig routingConfig;
/**
*
* Whether event replication was enabled or disabled by this request.
*
*/
private ReplicationConfig replicationConfig;
/**
*
* Define event buses used for replication.
*
*/
private java.util.List eventBuses;
/**
*
* The ARN of the role used by event replication for this request.
*
*/
private String roleArn;
/**
*
* The name of the endpoint you want to update.
*
*
* @param name
* The name of the endpoint you want to update.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the endpoint you want to update.
*
*
* @return The name of the endpoint you want to update.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the endpoint you want to update.
*
*
* @param name
* The name of the endpoint you want to update.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateEndpointRequest withName(String name) {
setName(name);
return this;
}
/**
*
* A description for the endpoint.
*
*
* @param description
* A description for the endpoint.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* A description for the endpoint.
*
*
* @return A description for the endpoint.
*/
public String getDescription() {
return this.description;
}
/**
*
* A description for the endpoint.
*
*
* @param description
* A description for the endpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateEndpointRequest withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* Configure the routing policy, including the health check and secondary Region.
*
*
* @param routingConfig
* Configure the routing policy, including the health check and secondary Region.
*/
public void setRoutingConfig(RoutingConfig routingConfig) {
this.routingConfig = routingConfig;
}
/**
*
* Configure the routing policy, including the health check and secondary Region.
*
*
* @return Configure the routing policy, including the health check and secondary Region.
*/
public RoutingConfig getRoutingConfig() {
return this.routingConfig;
}
/**
*
* Configure the routing policy, including the health check and secondary Region.
*
*
* @param routingConfig
* Configure the routing policy, including the health check and secondary Region.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateEndpointRequest withRoutingConfig(RoutingConfig routingConfig) {
setRoutingConfig(routingConfig);
return this;
}
/**
*
* Whether event replication was enabled or disabled by this request.
*
*
* @param replicationConfig
* Whether event replication was enabled or disabled by this request.
*/
public void setReplicationConfig(ReplicationConfig replicationConfig) {
this.replicationConfig = replicationConfig;
}
/**
*
* Whether event replication was enabled or disabled by this request.
*
*
* @return Whether event replication was enabled or disabled by this request.
*/
public ReplicationConfig getReplicationConfig() {
return this.replicationConfig;
}
/**
*
* Whether event replication was enabled or disabled by this request.
*
*
* @param replicationConfig
* Whether event replication was enabled or disabled by this request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateEndpointRequest withReplicationConfig(ReplicationConfig replicationConfig) {
setReplicationConfig(replicationConfig);
return this;
}
/**
*
* Define event buses used for replication.
*
*
* @return Define event buses used for replication.
*/
public java.util.List getEventBuses() {
return eventBuses;
}
/**
*
* Define event buses used for replication.
*
*
* @param eventBuses
* Define event buses used for replication.
*/
public void setEventBuses(java.util.Collection eventBuses) {
if (eventBuses == null) {
this.eventBuses = null;
return;
}
this.eventBuses = new java.util.ArrayList(eventBuses);
}
/**
*
* Define event buses used for replication.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setEventBuses(java.util.Collection)} or {@link #withEventBuses(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param eventBuses
* Define event buses used for replication.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateEndpointRequest withEventBuses(EndpointEventBus... eventBuses) {
if (this.eventBuses == null) {
setEventBuses(new java.util.ArrayList(eventBuses.length));
}
for (EndpointEventBus ele : eventBuses) {
this.eventBuses.add(ele);
}
return this;
}
/**
*
* Define event buses used for replication.
*
*
* @param eventBuses
* Define event buses used for replication.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateEndpointRequest withEventBuses(java.util.Collection eventBuses) {
setEventBuses(eventBuses);
return this;
}
/**
*
* The ARN of the role used by event replication for this request.
*
*
* @param roleArn
* The ARN of the role used by event replication for this request.
*/
public void setRoleArn(String roleArn) {
this.roleArn = roleArn;
}
/**
*
* The ARN of the role used by event replication for this request.
*
*
* @return The ARN of the role used by event replication for this request.
*/
public String getRoleArn() {
return this.roleArn;
}
/**
*
* The ARN of the role used by event replication for this request.
*
*
* @param roleArn
* The ARN of the role used by event replication for this request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateEndpointRequest withRoleArn(String roleArn) {
setRoleArn(roleArn);
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 (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getRoutingConfig() != null)
sb.append("RoutingConfig: ").append(getRoutingConfig()).append(",");
if (getReplicationConfig() != null)
sb.append("ReplicationConfig: ").append(getReplicationConfig()).append(",");
if (getEventBuses() != null)
sb.append("EventBuses: ").append(getEventBuses()).append(",");
if (getRoleArn() != null)
sb.append("RoleArn: ").append(getRoleArn());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateEndpointRequest == false)
return false;
UpdateEndpointRequest other = (UpdateEndpointRequest) obj;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == 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.getRoutingConfig() == null ^ this.getRoutingConfig() == null)
return false;
if (other.getRoutingConfig() != null && other.getRoutingConfig().equals(this.getRoutingConfig()) == false)
return false;
if (other.getReplicationConfig() == null ^ this.getReplicationConfig() == null)
return false;
if (other.getReplicationConfig() != null && other.getReplicationConfig().equals(this.getReplicationConfig()) == false)
return false;
if (other.getEventBuses() == null ^ this.getEventBuses() == null)
return false;
if (other.getEventBuses() != null && other.getEventBuses().equals(this.getEventBuses()) == false)
return false;
if (other.getRoleArn() == null ^ this.getRoleArn() == null)
return false;
if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getRoutingConfig() == null) ? 0 : getRoutingConfig().hashCode());
hashCode = prime * hashCode + ((getReplicationConfig() == null) ? 0 : getReplicationConfig().hashCode());
hashCode = prime * hashCode + ((getEventBuses() == null) ? 0 : getEventBuses().hashCode());
hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode());
return hashCode;
}
@Override
public UpdateEndpointRequest clone() {
return (UpdateEndpointRequest) super.clone();
}
}