All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.firehose.model.ProcessingConfiguration Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Kinesis module holds the client classes that are used for communicating with Amazon Kinesis Service

There is a newer version: 2.28.6
Show newest version
/*
 * 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.firehose.model;

import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
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.firehose.transform.ProcessingConfigurationMarshaller;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Describes a data processing configuration. *

*/ @Generated("software.amazon.awssdk:codegen") public class ProcessingConfiguration implements StructuredPojo, ToCopyableBuilder { private final Boolean enabled; private final List processors; private ProcessingConfiguration(BuilderImpl builder) { this.enabled = builder.enabled; this.processors = builder.processors; } /** *

* Enables or disables data processing. *

* * @return Enables or disables data processing. */ public Boolean enabled() { return enabled; } /** *

* The data processors. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

* * @return The data processors. */ public List processors() { return processors; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(enabled()); hashCode = 31 * hashCode + Objects.hashCode(processors()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof ProcessingConfiguration)) { return false; } ProcessingConfiguration other = (ProcessingConfiguration) obj; return Objects.equals(enabled(), other.enabled()) && Objects.equals(processors(), other.processors()); } @Override public String toString() { return ToString.builder("ProcessingConfiguration").add("Enabled", enabled()).add("Processors", processors()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "Enabled": return Optional.of(clazz.cast(enabled())); case "Processors": return Optional.of(clazz.cast(processors())); default: return Optional.empty(); } } @SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { ProcessingConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller); } public interface Builder extends CopyableBuilder { /** *

* Enables or disables data processing. *

* * @param enabled * Enables or disables data processing. * @return Returns a reference to this object so that method calls can be chained together. */ Builder enabled(Boolean enabled); /** *

* The data processors. *

* * @param processors * The data processors. * @return Returns a reference to this object so that method calls can be chained together. */ Builder processors(Collection processors); /** *

* The data processors. *

* * @param processors * The data processors. * @return Returns a reference to this object so that method calls can be chained together. */ Builder processors(Processor... processors); } static final class BuilderImpl implements Builder { private Boolean enabled; private List processors; private BuilderImpl() { } private BuilderImpl(ProcessingConfiguration model) { enabled(model.enabled); processors(model.processors); } public final Boolean getEnabled() { return enabled; } @Override public final Builder enabled(Boolean enabled) { this.enabled = enabled; return this; } public final void setEnabled(Boolean enabled) { this.enabled = enabled; } public final Collection getProcessors() { return processors != null ? processors.stream().map(Processor::toBuilder).collect(Collectors.toList()) : null; } @Override public final Builder processors(Collection processors) { this.processors = ProcessorListCopier.copy(processors); return this; } @Override @SafeVarargs public final Builder processors(Processor... processors) { processors(Arrays.asList(processors)); return this; } public final void setProcessors(Collection processors) { this.processors = ProcessorListCopier.copyFromBuilder(processors); } @Override public ProcessingConfiguration build() { return new ProcessingConfiguration(this); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy