/* * 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 CreateEndpointRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The name of the global endpoint. For example, "Name":"us-east-2-custom_bus_A-endpoint"
.
*
* A description of the global endpoint. *
*/ private String description; /** ** Configure the routing policy, including the health check and secondary Region.. *
*/ private RoutingConfig routingConfig; /** *
* Enable or disable event replication. The default state is ENABLED
which means you must supply a
* RoleArn
. If you don't have a RoleArn
or you don't want event replication enabled, set
* the state to DISABLED
.
*
* Define the event buses used. *
** The names of the event buses must be identical in each Region. *
** The ARN of the role used for replication. *
*/ private String roleArn; /** *
* The name of the global endpoint. For example, "Name":"us-east-2-custom_bus_A-endpoint"
.
*
"Name":"us-east-2-custom_bus_A-endpoint"
.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the global endpoint. For example, "Name":"us-east-2-custom_bus_A-endpoint"
.
*
"Name":"us-east-2-custom_bus_A-endpoint"
.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the global endpoint. For example, "Name":"us-east-2-custom_bus_A-endpoint"
.
*
"Name":"us-east-2-custom_bus_A-endpoint"
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEndpointRequest withName(String name) {
setName(name);
return this;
}
/**
* * A description of the global endpoint. *
* * @param description * A description of the global endpoint. */ public void setDescription(String description) { this.description = description; } /** ** A description of the global endpoint. *
* * @return A description of the global endpoint. */ public String getDescription() { return this.description; } /** ** A description of the global endpoint. *
* * @param description * A description of the global endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateEndpointRequest 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 CreateEndpointRequest withRoutingConfig(RoutingConfig routingConfig) { setRoutingConfig(routingConfig); return this; } /** *
* Enable or disable event replication. The default state is ENABLED
which means you must supply a
* RoleArn
. If you don't have a RoleArn
or you don't want event replication enabled, set
* the state to DISABLED
.
*
ENABLED
which means you must supply
* a RoleArn
. If you don't have a RoleArn
or you don't want event replication
* enabled, set the state to DISABLED
.
*/
public void setReplicationConfig(ReplicationConfig replicationConfig) {
this.replicationConfig = replicationConfig;
}
/**
*
* Enable or disable event replication. The default state is ENABLED
which means you must supply a
* RoleArn
. If you don't have a RoleArn
or you don't want event replication enabled, set
* the state to DISABLED
.
*
ENABLED
which means you must
* supply a RoleArn
. If you don't have a RoleArn
or you don't want event
* replication enabled, set the state to DISABLED
.
*/
public ReplicationConfig getReplicationConfig() {
return this.replicationConfig;
}
/**
*
* Enable or disable event replication. The default state is ENABLED
which means you must supply a
* RoleArn
. If you don't have a RoleArn
or you don't want event replication enabled, set
* the state to DISABLED
.
*
ENABLED
which means you must supply
* a RoleArn
. If you don't have a RoleArn
or you don't want event replication
* enabled, set the state to DISABLED
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEndpointRequest withReplicationConfig(ReplicationConfig replicationConfig) {
setReplicationConfig(replicationConfig);
return this;
}
/**
* * Define the event buses used. *
** The names of the event buses must be identical in each Region. *
** The names of the event buses must be identical in each Region. *
*/ public java.util.List* Define the event buses used. *
** The names of the event buses must be identical in each Region. *
** The names of the event buses must be identical in each Region. *
*/ public void setEventBuses(java.util.Collection* Define the event buses used. *
** The names of the event buses must be identical in each Region. *
** 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 the event buses used.* The names of the event buses must be identical in each Region. *
* @return Returns a reference to this object so that method calls can be chained together. */ public CreateEndpointRequest withEventBuses(EndpointEventBus... eventBuses) { if (this.eventBuses == null) { setEventBuses(new java.util.ArrayList* Define the event buses used. *
** The names of the event buses must be identical in each Region. *
** The names of the event buses must be identical in each Region. *
* @return Returns a reference to this object so that method calls can be chained together. */ public CreateEndpointRequest withEventBuses(java.util.Collection* The ARN of the role used for replication. *
* * @param roleArn * The ARN of the role used for replication. */ public void setRoleArn(String roleArn) { this.roleArn = roleArn; } /** ** The ARN of the role used for replication. *
* * @return The ARN of the role used for replication. */ public String getRoleArn() { return this.roleArn; } /** ** The ARN of the role used for replication. *
* * @param roleArn * The ARN of the role used for replication. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateEndpointRequest 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 CreateEndpointRequest == false) return false; CreateEndpointRequest other = (CreateEndpointRequest) 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 CreateEndpointRequest clone() { return (CreateEndpointRequest) super.clone(); } }