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

package com.azure.resourcemanager.hdinsight.implementation;

import com.azure.resourcemanager.hdinsight.fluent.models.ClusterCreateValidationResultInner;
import com.azure.resourcemanager.hdinsight.models.AaddsResourceDetails;
import com.azure.resourcemanager.hdinsight.models.ClusterCreateValidationResult;
import com.azure.resourcemanager.hdinsight.models.ValidationErrorInfo;
import java.time.Duration;
import java.util.Collections;
import java.util.List;

public final class ClusterCreateValidationResultImpl implements ClusterCreateValidationResult {
    private ClusterCreateValidationResultInner innerObject;

    private final com.azure.resourcemanager.hdinsight.HDInsightManager serviceManager;

    ClusterCreateValidationResultImpl(
        ClusterCreateValidationResultInner innerObject,
        com.azure.resourcemanager.hdinsight.HDInsightManager serviceManager) {
        this.innerObject = innerObject;
        this.serviceManager = serviceManager;
    }

    public List<ValidationErrorInfo> validationErrors() {
        List<ValidationErrorInfo> inner = this.innerModel().validationErrors();
        if (inner != null) {
            return Collections.unmodifiableList(inner);
        } else {
            return Collections.emptyList();
        }
    }

    public List<ValidationErrorInfo> validationWarnings() {
        List<ValidationErrorInfo> inner = this.innerModel().validationWarnings();
        if (inner != null) {
            return Collections.unmodifiableList(inner);
        } else {
            return Collections.emptyList();
        }
    }

    public Duration estimatedCreationDuration() {
        return this.innerModel().estimatedCreationDuration();
    }

    public List<AaddsResourceDetails> aaddsResourcesDetails() {
        List<AaddsResourceDetails> inner = this.innerModel().aaddsResourcesDetails();
        if (inner != null) {
            return Collections.unmodifiableList(inner);
        } else {
            return Collections.emptyList();
        }
    }

    public ClusterCreateValidationResultInner innerModel() {
        return this.innerObject;
    }

    private com.azure.resourcemanager.hdinsight.HDInsightManager manager() {
        return this.serviceManager;
    }
}
