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

package com.azure.resourcemanager.kubernetesconfiguration.implementation;

import com.azure.core.management.SystemData;
import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.FluxConfigurationInner;
import com.azure.resourcemanager.kubernetesconfiguration.models.AzureBlobDefinition;
import com.azure.resourcemanager.kubernetesconfiguration.models.BucketDefinition;
import com.azure.resourcemanager.kubernetesconfiguration.models.FluxComplianceState;
import com.azure.resourcemanager.kubernetesconfiguration.models.FluxConfiguration;
import com.azure.resourcemanager.kubernetesconfiguration.models.GitRepositoryDefinition;
import com.azure.resourcemanager.kubernetesconfiguration.models.KustomizationDefinition;
import com.azure.resourcemanager.kubernetesconfiguration.models.ObjectStatusDefinition;
import com.azure.resourcemanager.kubernetesconfiguration.models.ProvisioningState;
import com.azure.resourcemanager.kubernetesconfiguration.models.ScopeType;
import com.azure.resourcemanager.kubernetesconfiguration.models.SourceKindType;
import java.time.OffsetDateTime;
import java.util.Collections;
import java.util.List;
import java.util.Map;

public final class FluxConfigurationImpl implements FluxConfiguration {
    private FluxConfigurationInner innerObject;

    private final com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager serviceManager;

    FluxConfigurationImpl(
        FluxConfigurationInner innerObject,
        com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager serviceManager) {
        this.innerObject = innerObject;
        this.serviceManager = serviceManager;
    }

    public String id() {
        return this.innerModel().id();
    }

    public String name() {
        return this.innerModel().name();
    }

    public String type() {
        return this.innerModel().type();
    }

    public SystemData systemData() {
        return this.innerModel().systemData();
    }

    public ScopeType scope() {
        return this.innerModel().scope();
    }

    public String namespace() {
        return this.innerModel().namespace();
    }

    public SourceKindType sourceKind() {
        return this.innerModel().sourceKind();
    }

    public Boolean suspend() {
        return this.innerModel().suspend();
    }

    public GitRepositoryDefinition gitRepository() {
        return this.innerModel().gitRepository();
    }

    public BucketDefinition bucket() {
        return this.innerModel().bucket();
    }

    public AzureBlobDefinition azureBlob() {
        return this.innerModel().azureBlob();
    }

    public Map<String, KustomizationDefinition> kustomizations() {
        Map<String, KustomizationDefinition> inner = this.innerModel().kustomizations();
        if (inner != null) {
            return Collections.unmodifiableMap(inner);
        } else {
            return Collections.emptyMap();
        }
    }

    public Map<String, String> configurationProtectedSettings() {
        Map<String, String> inner = this.innerModel().configurationProtectedSettings();
        if (inner != null) {
            return Collections.unmodifiableMap(inner);
        } else {
            return Collections.emptyMap();
        }
    }

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

    public String repositoryPublicKey() {
        return this.innerModel().repositoryPublicKey();
    }

    public String sourceSyncedCommitId() {
        return this.innerModel().sourceSyncedCommitId();
    }

    public OffsetDateTime sourceUpdatedAt() {
        return this.innerModel().sourceUpdatedAt();
    }

    public OffsetDateTime statusUpdatedAt() {
        return this.innerModel().statusUpdatedAt();
    }

    public FluxComplianceState complianceState() {
        return this.innerModel().complianceState();
    }

    public ProvisioningState provisioningState() {
        return this.innerModel().provisioningState();
    }

    public String errorMessage() {
        return this.innerModel().errorMessage();
    }

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

    private com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager manager() {
        return this.serviceManager;
    }
}
