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

package com.azure.resourcemanager.azurearcdata.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.HashMap;
import java.util.Map;

/** The kubernetes scheduling information. */
@Fluent
public final class K8SScheduling {
    /*
     * The kubernetes scheduling options. It describes restrictions used to help Kubernetes select appropriate nodes to
     * host the database service
     */
    @JsonProperty(value = "default")
    private K8SSchedulingOptions defaultProperty;

    /*
     * The kubernetes scheduling information.
     */
    @JsonIgnore private Map<String, Object> additionalProperties;

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

    /**
     * Get the defaultProperty property: The kubernetes scheduling options. It describes restrictions used to help
     * Kubernetes select appropriate nodes to host the database service.
     *
     * @return the defaultProperty value.
     */
    public K8SSchedulingOptions defaultProperty() {
        return this.defaultProperty;
    }

    /**
     * Set the defaultProperty property: The kubernetes scheduling options. It describes restrictions used to help
     * Kubernetes select appropriate nodes to host the database service.
     *
     * @param defaultProperty the defaultProperty value to set.
     * @return the K8SScheduling object itself.
     */
    public K8SScheduling withDefaultProperty(K8SSchedulingOptions defaultProperty) {
        this.defaultProperty = defaultProperty;
        return this;
    }

    /**
     * Get the additionalProperties property: The kubernetes scheduling information.
     *
     * @return the additionalProperties value.
     */
    @JsonAnyGetter
    public Map<String, Object> additionalProperties() {
        return this.additionalProperties;
    }

    /**
     * Set the additionalProperties property: The kubernetes scheduling information.
     *
     * @param additionalProperties the additionalProperties value to set.
     * @return the K8SScheduling object itself.
     */
    public K8SScheduling withAdditionalProperties(Map<String, Object> additionalProperties) {
        this.additionalProperties = additionalProperties;
        return this;
    }

    @JsonAnySetter
    void withAdditionalProperties(String key, Object value) {
        if (additionalProperties == null) {
            additionalProperties = new HashMap<>();
        }
        additionalProperties.put(key, value);
    }

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