/* * Copyright 2018-2023 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 com.amazonaws.services.lookoutmetrics.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateMetricSetRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The ARN of the anomaly detector that will use the dataset. *
*/ private String anomalyDetectorArn; /** ** The name of the dataset. *
*/ private String metricSetName; /** ** A description of the dataset you are creating. *
*/ private String metricSetDescription; /** ** A list of metrics that the dataset will contain. *
*/ private java.util.List* After an interval ends, the amount of seconds that the detector waits before importing data. Offset is only * supported for S3, Redshift, Athena and datasources. *
*/ private Integer offset; /** ** Contains information about the column used for tracking time in your source data. *
*/ private TimestampColumn timestampColumn; /** ** A list of the fields you want to treat as dimensions. *
*/ private java.util.List* The frequency with which the source data will be analyzed for anomalies. *
*/ private String metricSetFrequency; /** ** Contains information about how the source data should be interpreted. *
*/ private MetricSource metricSource; /** ** The time zone in which your source data was recorded. *
*/ private String timezone; /** ** A list of tags to apply * to the dataset. *
*/ private java.util.Map* A list of filters that specify which data is kept for anomaly detection. *
*/ private java.util.List* The ARN of the anomaly detector that will use the dataset. *
* * @param anomalyDetectorArn * The ARN of the anomaly detector that will use the dataset. */ public void setAnomalyDetectorArn(String anomalyDetectorArn) { this.anomalyDetectorArn = anomalyDetectorArn; } /** ** The ARN of the anomaly detector that will use the dataset. *
* * @return The ARN of the anomaly detector that will use the dataset. */ public String getAnomalyDetectorArn() { return this.anomalyDetectorArn; } /** ** The ARN of the anomaly detector that will use the dataset. *
* * @param anomalyDetectorArn * The ARN of the anomaly detector that will use the dataset. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateMetricSetRequest withAnomalyDetectorArn(String anomalyDetectorArn) { setAnomalyDetectorArn(anomalyDetectorArn); return this; } /** ** The name of the dataset. *
* * @param metricSetName * The name of the dataset. */ public void setMetricSetName(String metricSetName) { this.metricSetName = metricSetName; } /** ** The name of the dataset. *
* * @return The name of the dataset. */ public String getMetricSetName() { return this.metricSetName; } /** ** The name of the dataset. *
* * @param metricSetName * The name of the dataset. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateMetricSetRequest withMetricSetName(String metricSetName) { setMetricSetName(metricSetName); return this; } /** ** A description of the dataset you are creating. *
* * @param metricSetDescription * A description of the dataset you are creating. */ public void setMetricSetDescription(String metricSetDescription) { this.metricSetDescription = metricSetDescription; } /** ** A description of the dataset you are creating. *
* * @return A description of the dataset you are creating. */ public String getMetricSetDescription() { return this.metricSetDescription; } /** ** A description of the dataset you are creating. *
* * @param metricSetDescription * A description of the dataset you are creating. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateMetricSetRequest withMetricSetDescription(String metricSetDescription) { setMetricSetDescription(metricSetDescription); return this; } /** ** A list of metrics that the dataset will contain. *
* * @return A list of metrics that the dataset will contain. */ public java.util.List* A list of metrics that the dataset will contain. *
* * @param metricList * A list of metrics that the dataset will contain. */ public void setMetricList(java.util.Collection* A list of metrics that the dataset will contain. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setMetricList(java.util.Collection)} or {@link #withMetricList(java.util.Collection)} if you want to * override the existing values. *
* * @param metricList * A list of metrics that the dataset will contain. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateMetricSetRequest withMetricList(Metric... metricList) { if (this.metricList == null) { setMetricList(new java.util.ArrayList* A list of metrics that the dataset will contain. *
* * @param metricList * A list of metrics that the dataset will contain. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateMetricSetRequest withMetricList(java.util.Collection* After an interval ends, the amount of seconds that the detector waits before importing data. Offset is only * supported for S3, Redshift, Athena and datasources. *
* * @param offset * After an interval ends, the amount of seconds that the detector waits before importing data. Offset is * only supported for S3, Redshift, Athena and datasources. */ public void setOffset(Integer offset) { this.offset = offset; } /** ** After an interval ends, the amount of seconds that the detector waits before importing data. Offset is only * supported for S3, Redshift, Athena and datasources. *
* * @return After an interval ends, the amount of seconds that the detector waits before importing data. Offset is * only supported for S3, Redshift, Athena and datasources. */ public Integer getOffset() { return this.offset; } /** ** After an interval ends, the amount of seconds that the detector waits before importing data. Offset is only * supported for S3, Redshift, Athena and datasources. *
* * @param offset * After an interval ends, the amount of seconds that the detector waits before importing data. Offset is * only supported for S3, Redshift, Athena and datasources. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateMetricSetRequest withOffset(Integer offset) { setOffset(offset); return this; } /** ** Contains information about the column used for tracking time in your source data. *
* * @param timestampColumn * Contains information about the column used for tracking time in your source data. */ public void setTimestampColumn(TimestampColumn timestampColumn) { this.timestampColumn = timestampColumn; } /** ** Contains information about the column used for tracking time in your source data. *
* * @return Contains information about the column used for tracking time in your source data. */ public TimestampColumn getTimestampColumn() { return this.timestampColumn; } /** ** Contains information about the column used for tracking time in your source data. *
* * @param timestampColumn * Contains information about the column used for tracking time in your source data. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateMetricSetRequest withTimestampColumn(TimestampColumn timestampColumn) { setTimestampColumn(timestampColumn); return this; } /** ** A list of the fields you want to treat as dimensions. *
* * @return A list of the fields you want to treat as dimensions. */ public java.util.List* A list of the fields you want to treat as dimensions. *
* * @param dimensionList * A list of the fields you want to treat as dimensions. */ public void setDimensionList(java.util.Collection* A list of the fields you want to treat as dimensions. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setDimensionList(java.util.Collection)} or {@link #withDimensionList(java.util.Collection)} if you want * to override the existing values. *
* * @param dimensionList * A list of the fields you want to treat as dimensions. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateMetricSetRequest withDimensionList(String... dimensionList) { if (this.dimensionList == null) { setDimensionList(new java.util.ArrayList* A list of the fields you want to treat as dimensions. *
* * @param dimensionList * A list of the fields you want to treat as dimensions. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateMetricSetRequest withDimensionList(java.util.Collection* The frequency with which the source data will be analyzed for anomalies. *
* * @param metricSetFrequency * The frequency with which the source data will be analyzed for anomalies. * @see Frequency */ public void setMetricSetFrequency(String metricSetFrequency) { this.metricSetFrequency = metricSetFrequency; } /** ** The frequency with which the source data will be analyzed for anomalies. *
* * @return The frequency with which the source data will be analyzed for anomalies. * @see Frequency */ public String getMetricSetFrequency() { return this.metricSetFrequency; } /** ** The frequency with which the source data will be analyzed for anomalies. *
* * @param metricSetFrequency * The frequency with which the source data will be analyzed for anomalies. * @return Returns a reference to this object so that method calls can be chained together. * @see Frequency */ public CreateMetricSetRequest withMetricSetFrequency(String metricSetFrequency) { setMetricSetFrequency(metricSetFrequency); return this; } /** ** The frequency with which the source data will be analyzed for anomalies. *
* * @param metricSetFrequency * The frequency with which the source data will be analyzed for anomalies. * @return Returns a reference to this object so that method calls can be chained together. * @see Frequency */ public CreateMetricSetRequest withMetricSetFrequency(Frequency metricSetFrequency) { this.metricSetFrequency = metricSetFrequency.toString(); return this; } /** ** Contains information about how the source data should be interpreted. *
* * @param metricSource * Contains information about how the source data should be interpreted. */ public void setMetricSource(MetricSource metricSource) { this.metricSource = metricSource; } /** ** Contains information about how the source data should be interpreted. *
* * @return Contains information about how the source data should be interpreted. */ public MetricSource getMetricSource() { return this.metricSource; } /** ** Contains information about how the source data should be interpreted. *
* * @param metricSource * Contains information about how the source data should be interpreted. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateMetricSetRequest withMetricSource(MetricSource metricSource) { setMetricSource(metricSource); return this; } /** ** The time zone in which your source data was recorded. *
* * @param timezone * The time zone in which your source data was recorded. */ public void setTimezone(String timezone) { this.timezone = timezone; } /** ** The time zone in which your source data was recorded. *
* * @return The time zone in which your source data was recorded. */ public String getTimezone() { return this.timezone; } /** ** The time zone in which your source data was recorded. *
* * @param timezone * The time zone in which your source data was recorded. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateMetricSetRequest withTimezone(String timezone) { setTimezone(timezone); return this; } /** ** A list of tags to apply * to the dataset. *
* * @return A list of tags to * apply to the dataset. */ public java.util.Map* A list of tags to apply * to the dataset. *
* * @param tags * A list of tags to * apply to the dataset. */ public void setTags(java.util.Map* A list of tags to apply * to the dataset. *
* * @param tags * A list of tags to * apply to the dataset. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateMetricSetRequest withTags(java.util.Map* A list of filters that specify which data is kept for anomaly detection. *
* * @return A list of filters that specify which data is kept for anomaly detection. */ public java.util.List* A list of filters that specify which data is kept for anomaly detection. *
* * @param dimensionFilterList * A list of filters that specify which data is kept for anomaly detection. */ public void setDimensionFilterList(java.util.Collection* A list of filters that specify which data is kept for anomaly detection. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setDimensionFilterList(java.util.Collection)} or {@link #withDimensionFilterList(java.util.Collection)} * if you want to override the existing values. *
* * @param dimensionFilterList * A list of filters that specify which data is kept for anomaly detection. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateMetricSetRequest withDimensionFilterList(MetricSetDimensionFilter... dimensionFilterList) { if (this.dimensionFilterList == null) { setDimensionFilterList(new java.util.ArrayList* A list of filters that specify which data is kept for anomaly detection. *
* * @param dimensionFilterList * A list of filters that specify which data is kept for anomaly detection. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateMetricSetRequest withDimensionFilterList(java.util.Collection