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

software.amazon.awssdk.services.s3.model.AnalyticsConfiguration Maven / Gradle / Ivy

Go to download

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

There is a newer version: 2.30.1
Show newest version
/*
 * Copyright 2012-2017 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.s3.model;

import javax.annotation.Generated;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 */
@Generated("software.amazon.awssdk:codegen")
public class AnalyticsConfiguration implements ToCopyableBuilder {
    private final String id;

    private final AnalyticsFilter filter;

    private final StorageClassAnalysis storageClassAnalysis;

    private AnalyticsConfiguration(BuilderImpl builder) {
        this.id = builder.id;
        this.filter = builder.filter;
        this.storageClassAnalysis = builder.storageClassAnalysis;
    }

    /**
     * The identifier used to represent an analytics configuration.
     * 
     * @return The identifier used to represent an analytics configuration.
     */
    public String id() {
        return id;
    }

    /**
     * The filter used to describe a set of objects for analyses. A filter must have exactly one prefix, one tag, or one
     * conjunction (AnalyticsAndOperator). If no filter is provided, all objects will be considered in any analysis.
     * 
     * @return The filter used to describe a set of objects for analyses. A filter must have exactly one prefix, one
     *         tag, or one conjunction (AnalyticsAndOperator). If no filter is provided, all objects will be considered
     *         in any analysis.
     */
    public AnalyticsFilter filter() {
        return filter;
    }

    /**
     * If present, it indicates that data related to access patterns will be collected and made available to analyze the
     * tradeoffs between different storage classes.
     * 
     * @return If present, it indicates that data related to access patterns will be collected and made available to
     *         analyze the tradeoffs between different storage classes.
     */
    public StorageClassAnalysis storageClassAnalysis() {
        return storageClassAnalysis;
    }

    @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 + ((id() == null) ? 0 : id().hashCode());
        hashCode = 31 * hashCode + ((filter() == null) ? 0 : filter().hashCode());
        hashCode = 31 * hashCode + ((storageClassAnalysis() == null) ? 0 : storageClassAnalysis().hashCode());
        return hashCode;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (!(obj instanceof AnalyticsConfiguration)) {
            return false;
        }
        AnalyticsConfiguration other = (AnalyticsConfiguration) obj;
        if (other.id() == null ^ this.id() == null) {
            return false;
        }
        if (other.id() != null && !other.id().equals(this.id())) {
            return false;
        }
        if (other.filter() == null ^ this.filter() == null) {
            return false;
        }
        if (other.filter() != null && !other.filter().equals(this.filter())) {
            return false;
        }
        if (other.storageClassAnalysis() == null ^ this.storageClassAnalysis() == null) {
            return false;
        }
        if (other.storageClassAnalysis() != null && !other.storageClassAnalysis().equals(this.storageClassAnalysis())) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (id() != null) {
            sb.append("Id: ").append(id()).append(",");
        }
        if (filter() != null) {
            sb.append("Filter: ").append(filter()).append(",");
        }
        if (storageClassAnalysis() != null) {
            sb.append("StorageClassAnalysis: ").append(storageClassAnalysis()).append(",");
        }
        sb.append("}");
        return sb.toString();
    }

    public interface Builder extends CopyableBuilder {
        /**
         * The identifier used to represent an analytics configuration.
         * 
         * @param id
         *        The identifier used to represent an analytics configuration.
         * @return Returns a reference to this object so that method calls can be chained together.
         */
        Builder id(String id);

        /**
         * The filter used to describe a set of objects for analyses. A filter must have exactly one prefix, one tag, or
         * one conjunction (AnalyticsAndOperator). If no filter is provided, all objects will be considered in any
         * analysis.
         * 
         * @param filter
         *        The filter used to describe a set of objects for analyses. A filter must have exactly one prefix, one
         *        tag, or one conjunction (AnalyticsAndOperator). If no filter is provided, all objects will be
         *        considered in any analysis.
         * @return Returns a reference to this object so that method calls can be chained together.
         */
        Builder filter(AnalyticsFilter filter);

        /**
         * If present, it indicates that data related to access patterns will be collected and made available to analyze
         * the tradeoffs between different storage classes.
         * 
         * @param storageClassAnalysis
         *        If present, it indicates that data related to access patterns will be collected and made available to
         *        analyze the tradeoffs between different storage classes.
         * @return Returns a reference to this object so that method calls can be chained together.
         */
        Builder storageClassAnalysis(StorageClassAnalysis storageClassAnalysis);
    }

    private static final class BuilderImpl implements Builder {
        private String id;

        private AnalyticsFilter filter;

        private StorageClassAnalysis storageClassAnalysis;

        private BuilderImpl() {
        }

        private BuilderImpl(AnalyticsConfiguration model) {
            setId(model.id);
            setFilter(model.filter);
            setStorageClassAnalysis(model.storageClassAnalysis);
        }

        public final String getId() {
            return id;
        }

        @Override
        public final Builder id(String id) {
            this.id = id;
            return this;
        }

        public final void setId(String id) {
            this.id = id;
        }

        public final AnalyticsFilter getFilter() {
            return filter;
        }

        @Override
        public final Builder filter(AnalyticsFilter filter) {
            this.filter = filter;
            return this;
        }

        public final void setFilter(AnalyticsFilter filter) {
            this.filter = filter;
        }

        public final StorageClassAnalysis getStorageClassAnalysis() {
            return storageClassAnalysis;
        }

        @Override
        public final Builder storageClassAnalysis(StorageClassAnalysis storageClassAnalysis) {
            this.storageClassAnalysis = storageClassAnalysis;
            return this;
        }

        public final void setStorageClassAnalysis(StorageClassAnalysis storageClassAnalysis) {
            this.storageClassAnalysis = storageClassAnalysis;
        }

        @Override
        public AnalyticsConfiguration build() {
            return new AnalyticsConfiguration(this);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy