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

software.amazon.awssdk.services.connect.model.IntervalDetails Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Connect module holds the client classes that are used for communicating with Connect.

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

import java.io.Serializable;
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.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;

/**
 * 

* Information about the interval period to use for returning results. *

*/ @Generated("software.amazon.awssdk:codegen") public final class IntervalDetails implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField TIME_ZONE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("TimeZone").getter(getter(IntervalDetails::timeZone)).setter(setter(Builder::timeZone)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TimeZone").build()).build(); private static final SdkField INTERVAL_PERIOD_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("IntervalPeriod").getter(getter(IntervalDetails::intervalPeriodAsString)) .setter(setter(Builder::intervalPeriod)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IntervalPeriod").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(TIME_ZONE_FIELD, INTERVAL_PERIOD_FIELD)); private static final long serialVersionUID = 1L; private final String timeZone; private final String intervalPeriod; private IntervalDetails(BuilderImpl builder) { this.timeZone = builder.timeZone; this.intervalPeriod = builder.intervalPeriod; } /** *

* The timezone applied to requested metrics. *

* * @return The timezone applied to requested metrics. */ public final String timeZone() { return timeZone; } /** *

* IntervalPeriod: An aggregated grouping applied to request metrics. Valid IntervalPeriod * values are: FIFTEEN_MIN | THIRTY_MIN | HOUR | DAY | * WEEK | TOTAL. *

*

* For example, if IntervalPeriod is selected THIRTY_MIN, StartTime and * EndTime differs by 1 day, then Amazon Connect returns 48 results in the response. Each result is * aggregated by the THIRTY_MIN period. By default Amazon Connect aggregates results based on the TOTAL * interval period. *

*

* The following list describes restrictions on StartTime and EndTime based on what * IntervalPeriod is requested. *

*
    *
  • *

    * FIFTEEN_MIN: The difference between StartTime and EndTime must be less * than 3 days. *

    *
  • *
  • *

    * THIRTY_MIN: The difference between StartTime and EndTime must be less than * 3 days. *

    *
  • *
  • *

    * HOUR: The difference between StartTime and EndTime must be less than 3 * days. *

    *
  • *
  • *

    * DAY: The difference between StartTime and EndTime must be less than 35 * days. *

    *
  • *
  • *

    * WEEK: The difference between StartTime and EndTime must be less than 35 * days. *

    *
  • *
  • *

    * TOTAL: The difference between StartTime and EndTime must be less than 35 * days. *

    *
  • *
*

* If the service returns an enum value that is not available in the current SDK version, {@link #intervalPeriod} * will return {@link IntervalPeriod#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available * from {@link #intervalPeriodAsString}. *

* * @return IntervalPeriod: An aggregated grouping applied to request metrics. Valid * IntervalPeriod values are: FIFTEEN_MIN | THIRTY_MIN | * HOUR | DAY | WEEK | TOTAL.

*

* For example, if IntervalPeriod is selected THIRTY_MIN, StartTime * and EndTime differs by 1 day, then Amazon Connect returns 48 results in the response. Each * result is aggregated by the THIRTY_MIN period. By default Amazon Connect aggregates results based on the * TOTAL interval period. *

*

* The following list describes restrictions on StartTime and EndTime based on * what IntervalPeriod is requested. *

*
    *
  • *

    * FIFTEEN_MIN: The difference between StartTime and EndTime must be * less than 3 days. *

    *
  • *
  • *

    * THIRTY_MIN: The difference between StartTime and EndTime must be * less than 3 days. *

    *
  • *
  • *

    * HOUR: The difference between StartTime and EndTime must be less * than 3 days. *

    *
  • *
  • *

    * DAY: The difference between StartTime and EndTime must be less * than 35 days. *

    *
  • *
  • *

    * WEEK: The difference between StartTime and EndTime must be less * than 35 days. *

    *
  • *
  • *

    * TOTAL: The difference between StartTime and EndTime must be less * than 35 days. *

    *
  • * @see IntervalPeriod */ public final IntervalPeriod intervalPeriod() { return IntervalPeriod.fromValue(intervalPeriod); } /** *

    * IntervalPeriod: An aggregated grouping applied to request metrics. Valid IntervalPeriod * values are: FIFTEEN_MIN | THIRTY_MIN | HOUR | DAY | * WEEK | TOTAL. *

    *

    * For example, if IntervalPeriod is selected THIRTY_MIN, StartTime and * EndTime differs by 1 day, then Amazon Connect returns 48 results in the response. Each result is * aggregated by the THIRTY_MIN period. By default Amazon Connect aggregates results based on the TOTAL * interval period. *

    *

    * The following list describes restrictions on StartTime and EndTime based on what * IntervalPeriod is requested. *

    *
      *
    • *

      * FIFTEEN_MIN: The difference between StartTime and EndTime must be less * than 3 days. *

      *
    • *
    • *

      * THIRTY_MIN: The difference between StartTime and EndTime must be less than * 3 days. *

      *
    • *
    • *

      * HOUR: The difference between StartTime and EndTime must be less than 3 * days. *

      *
    • *
    • *

      * DAY: The difference between StartTime and EndTime must be less than 35 * days. *

      *
    • *
    • *

      * WEEK: The difference between StartTime and EndTime must be less than 35 * days. *

      *
    • *
    • *

      * TOTAL: The difference between StartTime and EndTime must be less than 35 * days. *

      *
    • *
    *

    * If the service returns an enum value that is not available in the current SDK version, {@link #intervalPeriod} * will return {@link IntervalPeriod#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available * from {@link #intervalPeriodAsString}. *

    * * @return IntervalPeriod: An aggregated grouping applied to request metrics. Valid * IntervalPeriod values are: FIFTEEN_MIN | THIRTY_MIN | * HOUR | DAY | WEEK | TOTAL.

    *

    * For example, if IntervalPeriod is selected THIRTY_MIN, StartTime * and EndTime differs by 1 day, then Amazon Connect returns 48 results in the response. Each * result is aggregated by the THIRTY_MIN period. By default Amazon Connect aggregates results based on the * TOTAL interval period. *

    *

    * The following list describes restrictions on StartTime and EndTime based on * what IntervalPeriod is requested. *

    *
      *
    • *

      * FIFTEEN_MIN: The difference between StartTime and EndTime must be * less than 3 days. *

      *
    • *
    • *

      * THIRTY_MIN: The difference between StartTime and EndTime must be * less than 3 days. *

      *
    • *
    • *

      * HOUR: The difference between StartTime and EndTime must be less * than 3 days. *

      *
    • *
    • *

      * DAY: The difference between StartTime and EndTime must be less * than 35 days. *

      *
    • *
    • *

      * WEEK: The difference between StartTime and EndTime must be less * than 35 days. *

      *
    • *
    • *

      * TOTAL: The difference between StartTime and EndTime must be less * than 35 days. *

      *
    • * @see IntervalPeriod */ public final String intervalPeriodAsString() { return intervalPeriod; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(timeZone()); hashCode = 31 * hashCode + Objects.hashCode(intervalPeriodAsString()); 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 IntervalDetails)) { return false; } IntervalDetails other = (IntervalDetails) obj; return Objects.equals(timeZone(), other.timeZone()) && Objects.equals(intervalPeriodAsString(), other.intervalPeriodAsString()); } /** * 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("IntervalDetails").add("TimeZone", timeZone()).add("IntervalPeriod", intervalPeriodAsString()) .build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "TimeZone": return Optional.ofNullable(clazz.cast(timeZone())); case "IntervalPeriod": return Optional.ofNullable(clazz.cast(intervalPeriodAsString())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((IntervalDetails) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

      * The timezone applied to requested metrics. *

      * * @param timeZone * The timezone applied to requested metrics. * @return Returns a reference to this object so that method calls can be chained together. */ Builder timeZone(String timeZone); /** *

      * IntervalPeriod: An aggregated grouping applied to request metrics. Valid * IntervalPeriod values are: FIFTEEN_MIN | THIRTY_MIN | * HOUR | DAY | WEEK | TOTAL. *

      *

      * For example, if IntervalPeriod is selected THIRTY_MIN, StartTime and * EndTime differs by 1 day, then Amazon Connect returns 48 results in the response. Each result is * aggregated by the THIRTY_MIN period. By default Amazon Connect aggregates results based on the * TOTAL interval period. *

      *

      * The following list describes restrictions on StartTime and EndTime based on what * IntervalPeriod is requested. *

      *
        *
      • *

        * FIFTEEN_MIN: The difference between StartTime and EndTime must be less * than 3 days. *

        *
      • *
      • *

        * THIRTY_MIN: The difference between StartTime and EndTime must be less * than 3 days. *

        *
      • *
      • *

        * HOUR: The difference between StartTime and EndTime must be less than 3 * days. *

        *
      • *
      • *

        * DAY: The difference between StartTime and EndTime must be less than 35 * days. *

        *
      • *
      • *

        * WEEK: The difference between StartTime and EndTime must be less than * 35 days. *

        *
      • *
      • *

        * TOTAL: The difference between StartTime and EndTime must be less than * 35 days. *

        *
      • *
      * * @param intervalPeriod * IntervalPeriod: An aggregated grouping applied to request metrics. Valid * IntervalPeriod values are: FIFTEEN_MIN | THIRTY_MIN | * HOUR | DAY | WEEK | TOTAL.

      *

      * For example, if IntervalPeriod is selected THIRTY_MIN, * StartTime and EndTime differs by 1 day, then Amazon Connect returns 48 * results in the response. Each result is aggregated by the THIRTY_MIN period. By default Amazon Connect * aggregates results based on the TOTAL interval period. *

      *

      * The following list describes restrictions on StartTime and EndTime based on * what IntervalPeriod is requested. *

      *
        *
      • *

        * FIFTEEN_MIN: The difference between StartTime and EndTime must * be less than 3 days. *

        *
      • *
      • *

        * THIRTY_MIN: The difference between StartTime and EndTime must * be less than 3 days. *

        *
      • *
      • *

        * HOUR: The difference between StartTime and EndTime must be less * than 3 days. *

        *
      • *
      • *

        * DAY: The difference between StartTime and EndTime must be less * than 35 days. *

        *
      • *
      • *

        * WEEK: The difference between StartTime and EndTime must be less * than 35 days. *

        *
      • *
      • *

        * TOTAL: The difference between StartTime and EndTime must be * less than 35 days. *

        *
      • * @see IntervalPeriod * @return Returns a reference to this object so that method calls can be chained together. * @see IntervalPeriod */ Builder intervalPeriod(String intervalPeriod); /** *

        * IntervalPeriod: An aggregated grouping applied to request metrics. Valid * IntervalPeriod values are: FIFTEEN_MIN | THIRTY_MIN | * HOUR | DAY | WEEK | TOTAL. *

        *

        * For example, if IntervalPeriod is selected THIRTY_MIN, StartTime and * EndTime differs by 1 day, then Amazon Connect returns 48 results in the response. Each result is * aggregated by the THIRTY_MIN period. By default Amazon Connect aggregates results based on the * TOTAL interval period. *

        *

        * The following list describes restrictions on StartTime and EndTime based on what * IntervalPeriod is requested. *

        *
          *
        • *

          * FIFTEEN_MIN: The difference between StartTime and EndTime must be less * than 3 days. *

          *
        • *
        • *

          * THIRTY_MIN: The difference between StartTime and EndTime must be less * than 3 days. *

          *
        • *
        • *

          * HOUR: The difference between StartTime and EndTime must be less than 3 * days. *

          *
        • *
        • *

          * DAY: The difference between StartTime and EndTime must be less than 35 * days. *

          *
        • *
        • *

          * WEEK: The difference between StartTime and EndTime must be less than * 35 days. *

          *
        • *
        • *

          * TOTAL: The difference between StartTime and EndTime must be less than * 35 days. *

          *
        • *
        * * @param intervalPeriod * IntervalPeriod: An aggregated grouping applied to request metrics. Valid * IntervalPeriod values are: FIFTEEN_MIN | THIRTY_MIN | * HOUR | DAY | WEEK | TOTAL.

        *

        * For example, if IntervalPeriod is selected THIRTY_MIN, * StartTime and EndTime differs by 1 day, then Amazon Connect returns 48 * results in the response. Each result is aggregated by the THIRTY_MIN period. By default Amazon Connect * aggregates results based on the TOTAL interval period. *

        *

        * The following list describes restrictions on StartTime and EndTime based on * what IntervalPeriod is requested. *

        *
          *
        • *

          * FIFTEEN_MIN: The difference between StartTime and EndTime must * be less than 3 days. *

          *
        • *
        • *

          * THIRTY_MIN: The difference between StartTime and EndTime must * be less than 3 days. *

          *
        • *
        • *

          * HOUR: The difference between StartTime and EndTime must be less * than 3 days. *

          *
        • *
        • *

          * DAY: The difference between StartTime and EndTime must be less * than 35 days. *

          *
        • *
        • *

          * WEEK: The difference between StartTime and EndTime must be less * than 35 days. *

          *
        • *
        • *

          * TOTAL: The difference between StartTime and EndTime must be * less than 35 days. *

          *
        • * @see IntervalPeriod * @return Returns a reference to this object so that method calls can be chained together. * @see IntervalPeriod */ Builder intervalPeriod(IntervalPeriod intervalPeriod); } static final class BuilderImpl implements Builder { private String timeZone; private String intervalPeriod; private BuilderImpl() { } private BuilderImpl(IntervalDetails model) { timeZone(model.timeZone); intervalPeriod(model.intervalPeriod); } public final String getTimeZone() { return timeZone; } public final void setTimeZone(String timeZone) { this.timeZone = timeZone; } @Override public final Builder timeZone(String timeZone) { this.timeZone = timeZone; return this; } public final String getIntervalPeriod() { return intervalPeriod; } public final void setIntervalPeriod(String intervalPeriod) { this.intervalPeriod = intervalPeriod; } @Override public final Builder intervalPeriod(String intervalPeriod) { this.intervalPeriod = intervalPeriod; return this; } @Override public final Builder intervalPeriod(IntervalPeriod intervalPeriod) { this.intervalPeriod(intervalPeriod == null ? null : intervalPeriod.toString()); return this; } @Override public IntervalDetails build() { return new IntervalDetails(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy