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

package com.azure.resourcemanager.dataprotection.models;

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

/** kubernetes Cluster Backup target info for restore operation. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType")
@JsonTypeName("KubernetesClusterRestoreCriteria")
@Fluent
public final class KubernetesClusterRestoreCriteria extends ItemLevelRestoreCriteria {
    /*
     * Gets or sets the include cluster resources property. This property if enabled will include cluster scope
     * resources during restore.
     */
    @JsonProperty(value = "includeClusterScopeResources", required = true)
    private boolean includeClusterScopeResources;

    /*
     * Gets or sets the include namespaces property. This property sets the namespaces to be included during restore.
     */
    @JsonProperty(value = "includedNamespaces")
    private List<String> includedNamespaces;

    /*
     * Gets or sets the exclude namespaces property. This property sets the namespaces to be excluded during restore.
     */
    @JsonProperty(value = "excludedNamespaces")
    private List<String> excludedNamespaces;

    /*
     * Gets or sets the include resource types property. This property sets the resource types to be included during
     * restore.
     */
    @JsonProperty(value = "includedResourceTypes")
    private List<String> includedResourceTypes;

    /*
     * Gets or sets the exclude resource types property. This property sets the resource types to be excluded during
     * restore.
     */
    @JsonProperty(value = "excludedResourceTypes")
    private List<String> excludedResourceTypes;

    /*
     * Gets or sets the LabelSelectors property. This property sets the resource with such label selectors to be
     * included during restore.
     */
    @JsonProperty(value = "labelSelectors")
    private List<String> labelSelectors;

    /*
     * Gets or sets the PV (Persistent Volume) Restore Mode property. This property sets whether volumes needs to be
     * restored.
     */
    @JsonProperty(value = "persistentVolumeRestoreMode")
    private PersistentVolumeRestoreMode persistentVolumeRestoreMode;

    /*
     * Gets or sets the Conflict Policy property. This property sets policy during conflict of resources during
     * restore.
     */
    @JsonProperty(value = "conflictPolicy")
    private ExistingResourcePolicy conflictPolicy;

    /*
     * Gets or sets the Namespace Mappings property. This property sets if namespace needs to be change during restore.
     */
    @JsonProperty(value = "namespaceMappings")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> namespaceMappings;

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

    /**
     * Get the includeClusterScopeResources property: Gets or sets the include cluster resources property. This property
     * if enabled will include cluster scope resources during restore.
     *
     * @return the includeClusterScopeResources value.
     */
    public boolean includeClusterScopeResources() {
        return this.includeClusterScopeResources;
    }

    /**
     * Set the includeClusterScopeResources property: Gets or sets the include cluster resources property. This property
     * if enabled will include cluster scope resources during restore.
     *
     * @param includeClusterScopeResources the includeClusterScopeResources value to set.
     * @return the KubernetesClusterRestoreCriteria object itself.
     */
    public KubernetesClusterRestoreCriteria withIncludeClusterScopeResources(boolean includeClusterScopeResources) {
        this.includeClusterScopeResources = includeClusterScopeResources;
        return this;
    }

    /**
     * Get the includedNamespaces property: Gets or sets the include namespaces property. This property sets the
     * namespaces to be included during restore.
     *
     * @return the includedNamespaces value.
     */
    public List<String> includedNamespaces() {
        return this.includedNamespaces;
    }

    /**
     * Set the includedNamespaces property: Gets or sets the include namespaces property. This property sets the
     * namespaces to be included during restore.
     *
     * @param includedNamespaces the includedNamespaces value to set.
     * @return the KubernetesClusterRestoreCriteria object itself.
     */
    public KubernetesClusterRestoreCriteria withIncludedNamespaces(List<String> includedNamespaces) {
        this.includedNamespaces = includedNamespaces;
        return this;
    }

    /**
     * Get the excludedNamespaces property: Gets or sets the exclude namespaces property. This property sets the
     * namespaces to be excluded during restore.
     *
     * @return the excludedNamespaces value.
     */
    public List<String> excludedNamespaces() {
        return this.excludedNamespaces;
    }

    /**
     * Set the excludedNamespaces property: Gets or sets the exclude namespaces property. This property sets the
     * namespaces to be excluded during restore.
     *
     * @param excludedNamespaces the excludedNamespaces value to set.
     * @return the KubernetesClusterRestoreCriteria object itself.
     */
    public KubernetesClusterRestoreCriteria withExcludedNamespaces(List<String> excludedNamespaces) {
        this.excludedNamespaces = excludedNamespaces;
        return this;
    }

    /**
     * Get the includedResourceTypes property: Gets or sets the include resource types property. This property sets the
     * resource types to be included during restore.
     *
     * @return the includedResourceTypes value.
     */
    public List<String> includedResourceTypes() {
        return this.includedResourceTypes;
    }

    /**
     * Set the includedResourceTypes property: Gets or sets the include resource types property. This property sets the
     * resource types to be included during restore.
     *
     * @param includedResourceTypes the includedResourceTypes value to set.
     * @return the KubernetesClusterRestoreCriteria object itself.
     */
    public KubernetesClusterRestoreCriteria withIncludedResourceTypes(List<String> includedResourceTypes) {
        this.includedResourceTypes = includedResourceTypes;
        return this;
    }

    /**
     * Get the excludedResourceTypes property: Gets or sets the exclude resource types property. This property sets the
     * resource types to be excluded during restore.
     *
     * @return the excludedResourceTypes value.
     */
    public List<String> excludedResourceTypes() {
        return this.excludedResourceTypes;
    }

    /**
     * Set the excludedResourceTypes property: Gets or sets the exclude resource types property. This property sets the
     * resource types to be excluded during restore.
     *
     * @param excludedResourceTypes the excludedResourceTypes value to set.
     * @return the KubernetesClusterRestoreCriteria object itself.
     */
    public KubernetesClusterRestoreCriteria withExcludedResourceTypes(List<String> excludedResourceTypes) {
        this.excludedResourceTypes = excludedResourceTypes;
        return this;
    }

    /**
     * Get the labelSelectors property: Gets or sets the LabelSelectors property. This property sets the resource with
     * such label selectors to be included during restore.
     *
     * @return the labelSelectors value.
     */
    public List<String> labelSelectors() {
        return this.labelSelectors;
    }

    /**
     * Set the labelSelectors property: Gets or sets the LabelSelectors property. This property sets the resource with
     * such label selectors to be included during restore.
     *
     * @param labelSelectors the labelSelectors value to set.
     * @return the KubernetesClusterRestoreCriteria object itself.
     */
    public KubernetesClusterRestoreCriteria withLabelSelectors(List<String> labelSelectors) {
        this.labelSelectors = labelSelectors;
        return this;
    }

    /**
     * Get the persistentVolumeRestoreMode property: Gets or sets the PV (Persistent Volume) Restore Mode property. This
     * property sets whether volumes needs to be restored.
     *
     * @return the persistentVolumeRestoreMode value.
     */
    public PersistentVolumeRestoreMode persistentVolumeRestoreMode() {
        return this.persistentVolumeRestoreMode;
    }

    /**
     * Set the persistentVolumeRestoreMode property: Gets or sets the PV (Persistent Volume) Restore Mode property. This
     * property sets whether volumes needs to be restored.
     *
     * @param persistentVolumeRestoreMode the persistentVolumeRestoreMode value to set.
     * @return the KubernetesClusterRestoreCriteria object itself.
     */
    public KubernetesClusterRestoreCriteria withPersistentVolumeRestoreMode(
        PersistentVolumeRestoreMode persistentVolumeRestoreMode) {
        this.persistentVolumeRestoreMode = persistentVolumeRestoreMode;
        return this;
    }

    /**
     * Get the conflictPolicy property: Gets or sets the Conflict Policy property. This property sets policy during
     * conflict of resources during restore.
     *
     * @return the conflictPolicy value.
     */
    public ExistingResourcePolicy conflictPolicy() {
        return this.conflictPolicy;
    }

    /**
     * Set the conflictPolicy property: Gets or sets the Conflict Policy property. This property sets policy during
     * conflict of resources during restore.
     *
     * @param conflictPolicy the conflictPolicy value to set.
     * @return the KubernetesClusterRestoreCriteria object itself.
     */
    public KubernetesClusterRestoreCriteria withConflictPolicy(ExistingResourcePolicy conflictPolicy) {
        this.conflictPolicy = conflictPolicy;
        return this;
    }

    /**
     * Get the namespaceMappings property: Gets or sets the Namespace Mappings property. This property sets if namespace
     * needs to be change during restore.
     *
     * @return the namespaceMappings value.
     */
    public Map<String, String> namespaceMappings() {
        return this.namespaceMappings;
    }

    /**
     * Set the namespaceMappings property: Gets or sets the Namespace Mappings property. This property sets if namespace
     * needs to be change during restore.
     *
     * @param namespaceMappings the namespaceMappings value to set.
     * @return the KubernetesClusterRestoreCriteria object itself.
     */
    public KubernetesClusterRestoreCriteria withNamespaceMappings(Map<String, String> namespaceMappings) {
        this.namespaceMappings = namespaceMappings;
        return this;
    }

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