
software.amazon.awssdk.services.entityresolution.model.JobOutputSource Maven / Gradle / Ivy
/*
* 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.entityresolution.model;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
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;
/**
*
* An object containing KMSArn
, OutputS3Path
, and RoleArn
.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class JobOutputSource implements SdkPojo, Serializable, ToCopyableBuilder {
private static final SdkField KMS_ARN_FIELD = SdkField. builder(MarshallingType.STRING).memberName("KMSArn")
.getter(getter(JobOutputSource::kmsArn)).setter(setter(Builder::kmsArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("KMSArn").build()).build();
private static final SdkField OUTPUT_S3_PATH_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("outputS3Path").getter(getter(JobOutputSource::outputS3Path)).setter(setter(Builder::outputS3Path))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("outputS3Path").build()).build();
private static final SdkField ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("roleArn").getter(getter(JobOutputSource::roleArn)).setter(setter(Builder::roleArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("roleArn").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(KMS_ARN_FIELD,
OUTPUT_S3_PATH_FIELD, ROLE_ARN_FIELD));
private static final Map> SDK_NAME_TO_FIELD = Collections
.unmodifiableMap(new HashMap>() {
{
put("KMSArn", KMS_ARN_FIELD);
put("outputS3Path", OUTPUT_S3_PATH_FIELD);
put("roleArn", ROLE_ARN_FIELD);
}
});
private static final long serialVersionUID = 1L;
private final String kmsArn;
private final String outputS3Path;
private final String roleArn;
private JobOutputSource(BuilderImpl builder) {
this.kmsArn = builder.kmsArn;
this.outputS3Path = builder.outputS3Path;
this.roleArn = builder.roleArn;
}
/**
*
* Customer KMS ARN for encryption at rest. If not provided, system will use an Entity Resolution managed KMS key.
*
*
* @return Customer KMS ARN for encryption at rest. If not provided, system will use an Entity Resolution managed
* KMS key.
*/
public final String kmsArn() {
return kmsArn;
}
/**
*
* The S3 path to which Entity Resolution will write the output table.
*
*
* @return The S3 path to which Entity Resolution will write the output table.
*/
public final String outputS3Path() {
return outputS3Path;
}
/**
*
* The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this role to access Amazon Web Services
* resources on your behalf as part of workflow execution.
*
*
* @return The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this role to access Amazon Web
* Services resources on your behalf as part of workflow execution.
*/
public final String roleArn() {
return roleArn;
}
@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 + Objects.hashCode(kmsArn());
hashCode = 31 * hashCode + Objects.hashCode(outputS3Path());
hashCode = 31 * hashCode + Objects.hashCode(roleArn());
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof JobOutputSource)) {
return false;
}
JobOutputSource other = (JobOutputSource) obj;
return Objects.equals(kmsArn(), other.kmsArn()) && Objects.equals(outputS3Path(), other.outputS3Path())
&& Objects.equals(roleArn(), other.roleArn());
}
/**
* 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("JobOutputSource").add("KMSArn", kmsArn()).add("OutputS3Path", outputS3Path())
.add("RoleArn", roleArn()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "KMSArn":
return Optional.ofNullable(clazz.cast(kmsArn()));
case "outputS3Path":
return Optional.ofNullable(clazz.cast(outputS3Path()));
case "roleArn":
return Optional.ofNullable(clazz.cast(roleArn()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
@Override
public final Map> sdkFieldNameToField() {
return SDK_NAME_TO_FIELD;
}
private static Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy