software.amazon.awssdk.services.elasticsearch.model.CreateOutboundCrossClusterSearchConnectionResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of elasticsearch Show documentation
Show all versions of elasticsearch Show documentation
The AWS Java SDK for Amazon Elasticsearch Service module holds the client classes that are used for
communicating with Amazon Elasticsearch Service
/*
* Copyright 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 software.amazon.awssdk.services.elasticsearch.model;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*
* The result of a CreateOutboundCrossClusterSearchConnection
request. Contains the details of the
* newly created cross-cluster search connection.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class CreateOutboundCrossClusterSearchConnectionResponse extends ElasticsearchResponse
implements
ToCopyableBuilder {
private static final SdkField SOURCE_DOMAIN_INFO_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("SourceDomainInfo")
.getter(getter(CreateOutboundCrossClusterSearchConnectionResponse::sourceDomainInfo))
.setter(setter(Builder::sourceDomainInfo)).constructor(DomainInformation::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SourceDomainInfo").build()).build();
private static final SdkField DESTINATION_DOMAIN_INFO_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("DestinationDomainInfo")
.getter(getter(CreateOutboundCrossClusterSearchConnectionResponse::destinationDomainInfo))
.setter(setter(Builder::destinationDomainInfo)).constructor(DomainInformation::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DestinationDomainInfo").build())
.build();
private static final SdkField CONNECTION_ALIAS_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ConnectionAlias").getter(getter(CreateOutboundCrossClusterSearchConnectionResponse::connectionAlias))
.setter(setter(Builder::connectionAlias))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ConnectionAlias").build()).build();
private static final SdkField CONNECTION_STATUS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("ConnectionStatus")
.getter(getter(CreateOutboundCrossClusterSearchConnectionResponse::connectionStatus))
.setter(setter(Builder::connectionStatus)).constructor(OutboundCrossClusterSearchConnectionStatus::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ConnectionStatus").build()).build();
private static final SdkField CROSS_CLUSTER_SEARCH_CONNECTION_ID_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("CrossClusterSearchConnectionId")
.getter(getter(CreateOutboundCrossClusterSearchConnectionResponse::crossClusterSearchConnectionId))
.setter(setter(Builder::crossClusterSearchConnectionId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CrossClusterSearchConnectionId")
.build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(SOURCE_DOMAIN_INFO_FIELD,
DESTINATION_DOMAIN_INFO_FIELD, CONNECTION_ALIAS_FIELD, CONNECTION_STATUS_FIELD,
CROSS_CLUSTER_SEARCH_CONNECTION_ID_FIELD));
private final DomainInformation sourceDomainInfo;
private final DomainInformation destinationDomainInfo;
private final String connectionAlias;
private final OutboundCrossClusterSearchConnectionStatus connectionStatus;
private final String crossClusterSearchConnectionId;
private CreateOutboundCrossClusterSearchConnectionResponse(BuilderImpl builder) {
super(builder);
this.sourceDomainInfo = builder.sourceDomainInfo;
this.destinationDomainInfo = builder.destinationDomainInfo;
this.connectionAlias = builder.connectionAlias;
this.connectionStatus = builder.connectionStatus;
this.crossClusterSearchConnectionId = builder.crossClusterSearchConnectionId;
}
/**
*
* Specifies the DomainInformation
for the source Elasticsearch domain.
*
*
* @return Specifies the DomainInformation
for the source Elasticsearch domain.
*/
public final DomainInformation sourceDomainInfo() {
return sourceDomainInfo;
}
/**
*
* Specifies the DomainInformation
for the destination Elasticsearch domain.
*
*
* @return Specifies the DomainInformation
for the destination Elasticsearch domain.
*/
public final DomainInformation destinationDomainInfo() {
return destinationDomainInfo;
}
/**
*
* Specifies the connection alias provided during the create connection request.
*
*
* @return Specifies the connection alias provided during the create connection request.
*/
public final String connectionAlias() {
return connectionAlias;
}
/**
*
* Specifies the OutboundCrossClusterSearchConnectionStatus
for the newly created connection.
*
*
* @return Specifies the OutboundCrossClusterSearchConnectionStatus
for the newly created
* connection.
*/
public final OutboundCrossClusterSearchConnectionStatus connectionStatus() {
return connectionStatus;
}
/**
*
* Unique id for the created outbound connection, which is used for subsequent operations on connection.
*
*
* @return Unique id for the created outbound connection, which is used for subsequent operations on connection.
*/
public final String crossClusterSearchConnectionId() {
return crossClusterSearchConnectionId;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(sourceDomainInfo());
hashCode = 31 * hashCode + Objects.hashCode(destinationDomainInfo());
hashCode = 31 * hashCode + Objects.hashCode(connectionAlias());
hashCode = 31 * hashCode + Objects.hashCode(connectionStatus());
hashCode = 31 * hashCode + Objects.hashCode(crossClusterSearchConnectionId());
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return super.equals(obj) && equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof CreateOutboundCrossClusterSearchConnectionResponse)) {
return false;
}
CreateOutboundCrossClusterSearchConnectionResponse other = (CreateOutboundCrossClusterSearchConnectionResponse) obj;
return Objects.equals(sourceDomainInfo(), other.sourceDomainInfo())
&& Objects.equals(destinationDomainInfo(), other.destinationDomainInfo())
&& Objects.equals(connectionAlias(), other.connectionAlias())
&& Objects.equals(connectionStatus(), other.connectionStatus())
&& Objects.equals(crossClusterSearchConnectionId(), other.crossClusterSearchConnectionId());
}
/**
* 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.
*/
@Override
public final String toString() {
return ToString.builder("CreateOutboundCrossClusterSearchConnectionResponse").add("SourceDomainInfo", sourceDomainInfo())
.add("DestinationDomainInfo", destinationDomainInfo()).add("ConnectionAlias", connectionAlias())
.add("ConnectionStatus", connectionStatus())
.add("CrossClusterSearchConnectionId", crossClusterSearchConnectionId()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "SourceDomainInfo":
return Optional.ofNullable(clazz.cast(sourceDomainInfo()));
case "DestinationDomainInfo":
return Optional.ofNullable(clazz.cast(destinationDomainInfo()));
case "ConnectionAlias":
return Optional.ofNullable(clazz.cast(connectionAlias()));
case "ConnectionStatus":
return Optional.ofNullable(clazz.cast(connectionStatus()));
case "CrossClusterSearchConnectionId":
return Optional.ofNullable(clazz.cast(crossClusterSearchConnectionId()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy