software.amazon.awssdk.services.kinesisanalytics.model.InputProcessingConfigurationUpdate Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kinesis Show documentation
Show all versions of kinesis Show documentation
The AWS Java SDK for Amazon Kinesis module holds the client classes that are used for communicating
with Amazon Kinesis Service
/*
* Copyright 2013-2018 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.kinesisanalytics.model;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Consumer;
import javax.annotation.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.core.protocol.ProtocolMarshaller;
import software.amazon.awssdk.core.protocol.StructuredPojo;
import software.amazon.awssdk.services.kinesisanalytics.transform.InputProcessingConfigurationUpdateMarshaller;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*
* Describes updates to an InputProcessingConfiguration.
*
*/
@Generated("software.amazon.awssdk:codegen")
public class InputProcessingConfigurationUpdate implements StructuredPojo,
ToCopyableBuilder {
private final InputLambdaProcessorUpdate inputLambdaProcessorUpdate;
private InputProcessingConfigurationUpdate(BuilderImpl builder) {
this.inputLambdaProcessorUpdate = builder.inputLambdaProcessorUpdate;
}
/**
*
* Provides update information for an InputLambdaProcessor.
*
*
* @return Provides update information for an InputLambdaProcessor.
*/
public InputLambdaProcessorUpdate inputLambdaProcessorUpdate() {
return inputLambdaProcessorUpdate;
}
@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 int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(inputLambdaProcessorUpdate());
return hashCode;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof InputProcessingConfigurationUpdate)) {
return false;
}
InputProcessingConfigurationUpdate other = (InputProcessingConfigurationUpdate) obj;
return Objects.equals(inputLambdaProcessorUpdate(), other.inputLambdaProcessorUpdate());
}
@Override
public String toString() {
return ToString.builder("InputProcessingConfigurationUpdate")
.add("InputLambdaProcessorUpdate", inputLambdaProcessorUpdate()).build();
}
public Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "InputLambdaProcessorUpdate":
return Optional.of(clazz.cast(inputLambdaProcessorUpdate()));
default:
return Optional.empty();
}
}
@SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
InputProcessingConfigurationUpdateMarshaller.getInstance().marshall(this, protocolMarshaller);
}
public interface Builder extends CopyableBuilder {
/**
*
* Provides update information for an InputLambdaProcessor.
*
*
* @param inputLambdaProcessorUpdate
* Provides update information for an InputLambdaProcessor.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder inputLambdaProcessorUpdate(InputLambdaProcessorUpdate inputLambdaProcessorUpdate);
/**
*
* Provides update information for an InputLambdaProcessor.
*
* This is a convenience that creates an instance of the {@link InputLambdaProcessorUpdate.Builder} avoiding the
* need to create one manually via {@link InputLambdaProcessorUpdate#builder()}.
*
* When the {@link Consumer} completes, {@link InputLambdaProcessorUpdate.Builder#build()} is called immediately
* and its result is passed to {@link #inputLambdaProcessorUpdate(InputLambdaProcessorUpdate)}.
*
* @param inputLambdaProcessorUpdate
* a consumer that will call methods on {@link InputLambdaProcessorUpdate.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #inputLambdaProcessorUpdate(InputLambdaProcessorUpdate)
*/
default Builder inputLambdaProcessorUpdate(Consumer inputLambdaProcessorUpdate) {
return inputLambdaProcessorUpdate(InputLambdaProcessorUpdate.builder().apply(inputLambdaProcessorUpdate).build());
}
}
static final class BuilderImpl implements Builder {
private InputLambdaProcessorUpdate inputLambdaProcessorUpdate;
private BuilderImpl() {
}
private BuilderImpl(InputProcessingConfigurationUpdate model) {
inputLambdaProcessorUpdate(model.inputLambdaProcessorUpdate);
}
public final InputLambdaProcessorUpdate.Builder getInputLambdaProcessorUpdate() {
return inputLambdaProcessorUpdate != null ? inputLambdaProcessorUpdate.toBuilder() : null;
}
@Override
public final Builder inputLambdaProcessorUpdate(InputLambdaProcessorUpdate inputLambdaProcessorUpdate) {
this.inputLambdaProcessorUpdate = inputLambdaProcessorUpdate;
return this;
}
public final void setInputLambdaProcessorUpdate(InputLambdaProcessorUpdate.BuilderImpl inputLambdaProcessorUpdate) {
this.inputLambdaProcessorUpdate = inputLambdaProcessorUpdate != null ? inputLambdaProcessorUpdate.build() : null;
}
@Override
public InputProcessingConfigurationUpdate build() {
return new InputProcessingConfigurationUpdate(this);
}
}
}