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

package com.azure.resourcemanager.healthcareapis.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** The settings for history tracking for FHIR resources. */
@Fluent
public final class ResourceVersionPolicyConfiguration {
    /*
     * The default value for tracking history across all resources.
     */
    @JsonProperty(value = "default")
    private FhirResourceVersionPolicy defaultProperty;

    /*
     * A list of FHIR Resources and their version policy overrides.
     */
    @JsonProperty(value = "resourceTypeOverrides")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, FhirResourceVersionPolicy> resourceTypeOverrides;

    /**
     * Get the defaultProperty property: The default value for tracking history across all resources.
     *
     * @return the defaultProperty value.
     */
    public FhirResourceVersionPolicy defaultProperty() {
        return this.defaultProperty;
    }

    /**
     * Set the defaultProperty property: The default value for tracking history across all resources.
     *
     * @param defaultProperty the defaultProperty value to set.
     * @return the ResourceVersionPolicyConfiguration object itself.
     */
    public ResourceVersionPolicyConfiguration withDefaultProperty(FhirResourceVersionPolicy defaultProperty) {
        this.defaultProperty = defaultProperty;
        return this;
    }

    /**
     * Get the resourceTypeOverrides property: A list of FHIR Resources and their version policy overrides.
     *
     * @return the resourceTypeOverrides value.
     */
    public Map<String, FhirResourceVersionPolicy> resourceTypeOverrides() {
        return this.resourceTypeOverrides;
    }

    /**
     * Set the resourceTypeOverrides property: A list of FHIR Resources and their version policy overrides.
     *
     * @param resourceTypeOverrides the resourceTypeOverrides value to set.
     * @return the ResourceVersionPolicyConfiguration object itself.
     */
    public ResourceVersionPolicyConfiguration withResourceTypeOverrides(
        Map<String, FhirResourceVersionPolicy> resourceTypeOverrides) {
        this.resourceTypeOverrides = resourceTypeOverrides;
        return this;
    }

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