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

package com.azure.resourcemanager.videoanalyzer.models;

import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.videoanalyzer.fluent.models.AccessPolicyEntityInner;

/** An immutable client-side representation of AccessPolicyEntity. */
public interface AccessPolicyEntity {
    /**
     * Gets the id property: Fully qualified resource Id for the resource.
     *
     * @return the id value.
     */
    String id();

    /**
     * Gets the name property: The name of the resource.
     *
     * @return the name value.
     */
    String name();

    /**
     * Gets the type property: The type of the resource.
     *
     * @return the type value.
     */
    String type();

    /**
     * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
     *
     * @return the systemData value.
     */
    SystemData systemData();

    /**
     * Gets the role property: Defines the access level granted by this policy.
     *
     * @return the role value.
     */
    AccessPolicyRole role();

    /**
     * Gets the authentication property: Authentication method to be used when validating client API access.
     *
     * @return the authentication value.
     */
    AuthenticationBase authentication();

    /**
     * Gets the name of the resource group.
     *
     * @return the name of the resource group.
     */
    String resourceGroupName();

    /**
     * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.AccessPolicyEntityInner object.
     *
     * @return the inner object.
     */
    AccessPolicyEntityInner innerModel();

    /** The entirety of the AccessPolicyEntity definition. */
    interface Definition
        extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
    }
    /** The AccessPolicyEntity definition stages. */
    interface DefinitionStages {
        /** The first stage of the AccessPolicyEntity definition. */
        interface Blank extends WithParentResource {
        }
        /** The stage of the AccessPolicyEntity definition allowing to specify parent resource. */
        interface WithParentResource {
            /**
             * Specifies resourceGroupName, accountName.
             *
             * @param resourceGroupName The name of the resource group. The name is case insensitive.
             * @param accountName The Azure Video Analyzer account name.
             * @return the next definition stage.
             */
            WithCreate withExistingVideoAnalyzer(String resourceGroupName, String accountName);
        }
        /**
         * The stage of the AccessPolicyEntity definition which contains all the minimum required properties for the
         * resource to be created, but also allows for any other optional properties to be specified.
         */
        interface WithCreate extends DefinitionStages.WithRole, DefinitionStages.WithAuthentication {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            AccessPolicyEntity create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            AccessPolicyEntity create(Context context);
        }
        /** The stage of the AccessPolicyEntity definition allowing to specify role. */
        interface WithRole {
            /**
             * Specifies the role property: Defines the access level granted by this policy..
             *
             * @param role Defines the access level granted by this policy.
             * @return the next definition stage.
             */
            WithCreate withRole(AccessPolicyRole role);
        }
        /** The stage of the AccessPolicyEntity definition allowing to specify authentication. */
        interface WithAuthentication {
            /**
             * Specifies the authentication property: Authentication method to be used when validating client API
             * access..
             *
             * @param authentication Authentication method to be used when validating client API access.
             * @return the next definition stage.
             */
            WithCreate withAuthentication(AuthenticationBase authentication);
        }
    }
    /**
     * Begins update for the AccessPolicyEntity resource.
     *
     * @return the stage of resource update.
     */
    AccessPolicyEntity.Update update();

    /** The template for AccessPolicyEntity update. */
    interface Update extends UpdateStages.WithRole, UpdateStages.WithAuthentication {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        AccessPolicyEntity apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        AccessPolicyEntity apply(Context context);
    }
    /** The AccessPolicyEntity update stages. */
    interface UpdateStages {
        /** The stage of the AccessPolicyEntity update allowing to specify role. */
        interface WithRole {
            /**
             * Specifies the role property: Defines the access level granted by this policy..
             *
             * @param role Defines the access level granted by this policy.
             * @return the next definition stage.
             */
            Update withRole(AccessPolicyRole role);
        }
        /** The stage of the AccessPolicyEntity update allowing to specify authentication. */
        interface WithAuthentication {
            /**
             * Specifies the authentication property: Authentication method to be used when validating client API
             * access..
             *
             * @param authentication Authentication method to be used when validating client API access.
             * @return the next definition stage.
             */
            Update withAuthentication(AuthenticationBase authentication);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    AccessPolicyEntity refresh();

    /**
     * Refreshes the resource to sync with Azure.
     *
     * @param context The context to associate with this operation.
     * @return the refreshed resource.
     */
    AccessPolicyEntity refresh(Context context);
}
