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

package com.azure.resourcemanager.edgeorder.models;

import com.azure.core.annotation.Immutable;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/** Holds details about billing type and its meter guids. */
@JsonTypeInfo(
    use = JsonTypeInfo.Id.NAME,
    include = JsonTypeInfo.As.PROPERTY,
    property = "billingType",
    defaultImpl = MeterDetails.class)
@JsonTypeName("MeterDetails")
@JsonSubTypes({
    @JsonSubTypes.Type(name = "Pav2", value = Pav2MeterDetails.class),
    @JsonSubTypes.Type(name = "Purchase", value = PurchaseMeterDetails.class)
})
@Immutable
public class MeterDetails {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(MeterDetails.class);

    /*
     * Billing unit applicable for Pav2 billing
     */
    @JsonProperty(value = "multiplier", access = JsonProperty.Access.WRITE_ONLY)
    private Double multiplier;

    /*
     * Charging type.
     */
    @JsonProperty(value = "chargingType", access = JsonProperty.Access.WRITE_ONLY)
    private ChargingType chargingType;

    /**
     * Get the multiplier property: Billing unit applicable for Pav2 billing.
     *
     * @return the multiplier value.
     */
    public Double multiplier() {
        return this.multiplier;
    }

    /**
     * Get the chargingType property: Charging type.
     *
     * @return the chargingType value.
     */
    public ChargingType chargingType() {
        return this.chargingType;
    }

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