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

package com.azure.resourcemanager.apimanagement.models;

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

/** Sampling settings for Diagnostic. */
@Fluent
public final class SamplingSettings {
    /*
     * Sampling type.
     */
    @JsonProperty(value = "samplingType")
    private SamplingType samplingType;

    /*
     * Rate of sampling for fixed-rate sampling.
     */
    @JsonProperty(value = "percentage")
    private Double percentage;

    /**
     * Get the samplingType property: Sampling type.
     *
     * @return the samplingType value.
     */
    public SamplingType samplingType() {
        return this.samplingType;
    }

    /**
     * Set the samplingType property: Sampling type.
     *
     * @param samplingType the samplingType value to set.
     * @return the SamplingSettings object itself.
     */
    public SamplingSettings withSamplingType(SamplingType samplingType) {
        this.samplingType = samplingType;
        return this;
    }

    /**
     * Get the percentage property: Rate of sampling for fixed-rate sampling.
     *
     * @return the percentage value.
     */
    public Double percentage() {
        return this.percentage;
    }

    /**
     * Set the percentage property: Rate of sampling for fixed-rate sampling.
     *
     * @param percentage the percentage value to set.
     * @return the SamplingSettings object itself.
     */
    public SamplingSettings withPercentage(Double percentage) {
        this.percentage = percentage;
        return this;
    }

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