// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.datafactory.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Pipeline ElapsedTime Metric Policy. */
@Fluent
public final class PipelineElapsedTimeMetricPolicy {
    /*
     * TimeSpan value, after which an Azure Monitoring Metric is fired.
     */
    @JsonProperty(value = "duration")
    private Object duration;

    /** Creates an instance of PipelineElapsedTimeMetricPolicy class. */
    public PipelineElapsedTimeMetricPolicy() {
    }

    /**
     * Get the duration property: TimeSpan value, after which an Azure Monitoring Metric is fired.
     *
     * @return the duration value.
     */
    public Object duration() {
        return this.duration;
    }

    /**
     * Set the duration property: TimeSpan value, after which an Azure Monitoring Metric is fired.
     *
     * @param duration the duration value to set.
     * @return the PipelineElapsedTimeMetricPolicy object itself.
     */
    public PipelineElapsedTimeMetricPolicy withDuration(Object duration) {
        this.duration = duration;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }
}
