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

package com.azure.resourcemanager.customerinsights.implementation;

import com.azure.resourcemanager.customerinsights.fluent.models.AuthorizationPolicyInner;
import com.azure.resourcemanager.customerinsights.models.AuthorizationPolicy;
import com.azure.resourcemanager.customerinsights.models.PermissionTypes;
import java.util.Collections;
import java.util.List;

public final class AuthorizationPolicyImpl implements AuthorizationPolicy {
    private AuthorizationPolicyInner innerObject;

    private final com.azure.resourcemanager.customerinsights.CustomerInsightsManager serviceManager;

    AuthorizationPolicyImpl(
        AuthorizationPolicyInner innerObject,
        com.azure.resourcemanager.customerinsights.CustomerInsightsManager serviceManager) {
        this.innerObject = innerObject;
        this.serviceManager = serviceManager;
    }

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

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

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

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

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

    private com.azure.resourcemanager.customerinsights.CustomerInsightsManager manager() {
        return this.serviceManager;
    }
}
