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

package com.azure.resourcemanager.security.implementation;

import com.azure.resourcemanager.security.fluent.models.AdaptiveNetworkHardeningInner;
import com.azure.resourcemanager.security.models.AdaptiveNetworkHardening;
import com.azure.resourcemanager.security.models.EffectiveNetworkSecurityGroups;
import com.azure.resourcemanager.security.models.Rule;
import java.time.OffsetDateTime;
import java.util.Collections;
import java.util.List;

public final class AdaptiveNetworkHardeningImpl implements AdaptiveNetworkHardening {
    private AdaptiveNetworkHardeningInner innerObject;

    private final com.azure.resourcemanager.security.SecurityManager serviceManager;

    AdaptiveNetworkHardeningImpl(
        AdaptiveNetworkHardeningInner innerObject, com.azure.resourcemanager.security.SecurityManager 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 List<Rule> rules() {
        List<Rule> inner = this.innerModel().rules();
        if (inner != null) {
            return Collections.unmodifiableList(inner);
        } else {
            return Collections.emptyList();
        }
    }

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

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

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

    private com.azure.resourcemanager.security.SecurityManager manager() {
        return this.serviceManager;
    }
}
