All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.resourcemanager.eventhubs.models.AuthorizationRule Maven / Gradle / Ivy

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.resourcemanager.eventhubs.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.eventhubs.EventHubsManager;
import com.azure.resourcemanager.eventhubs.fluent.models.AuthorizationRuleInner;
import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager;
import com.azure.resourcemanager.resources.fluentcore.model.HasInnerModel;
import com.azure.resourcemanager.resources.fluentcore.model.Refreshable;
import reactor.core.publisher.Mono;

import java.util.List;

/**
 * The base type representing authorization rule of event hub namespace and event hub.
 *
 * @param  the specific authorization rule type
 */
@Fluent
public interface AuthorizationRule>
    extends NestedResource, HasInnerModel, HasManager, Refreshable {
    /**
     * @return rights associated with the authorization rule
     */
    List rights();

    /**
     * @return a representation of the deferred computation of this call,
     * returning access keys (primary, secondary) and the connection strings
     */
    Mono getKeysAsync();

    /**
     * @return the access keys (primary, secondary) and the connection strings
     */
    EventHubAuthorizationKey getKeys();

    /**
     * Regenerates primary or secondary access keys.
     *
     * @param keyType the key to regenerate
     * @return a representation of the deferred computation of this call,
     * returning access keys (primary, secondary) and the connection strings
     */
    Mono regenerateKeyAsync(KeyType keyType);

    /**
     * Regenerates primary or secondary keys.
     *
     * @param keyType the key to regenerate
     * @return the access keys (primary, secondary) and the connection strings
     */
    EventHubAuthorizationKey regenerateKey(KeyType keyType);

    /**
     * Grouping of commons authorization rule definition stages shared
     * between event hub namespace authorization rule and event hub authorization rule.
     */
    interface DefinitionStages {
        /**
         * The stage of the event hub namespace or event hub authorization rule definition
         * allowing to enable listen policy.
         *
         * @param  the next stage of the definition
         */
        interface WithListen {
            /**
             * Specifies that the rule should have listening access enabled.
             *
             * @return the next stage of the definition
             */
            T withListenAccess();
        }

        /**
         * The stage of the event hub namespace or event hub authorization rule definition
         * allowing to enable send policy.
         *
         * @param  the next stage of the definition
         */
        interface WithSend {
            /**
             * Specifies that the rule should have sending access enabled.
             *
             * @return the next stage of the definition
             */
            T withSendAccess();
        }

        /**
         * The stage of the event hub namespace or event hub authorization rule definition
         * allowing to enable manage policy.
         *
         * @param  the next stage of the definition
         */
        interface WithManage {
            /**
             * Specifies that the rule should have management access enabled.
             *
             * @return the next stage of the definition
             */
            T withManageAccess();
        }

        /**
         * The stage of the event hub namespace or event hub authorization rule definition
         * allowing to enable send or manage policy.
         *
         * @param  the next stage of the definition
         */
        interface WithSendOrManage extends WithSend, WithManage {
        }

        /**
         * The stage of the event hub namespace or event hub authorization rule definition
         * allowing to enable listen, send or manage policy.
         *
         * @param  the next stage of the definition
         */
        interface WithListenOrSendOrManage extends WithListen, WithSendOrManage {
            /**
             * Specifies that the rule should have sending and listening access enabled.
             *
             * @return the next stage of the definition
             */
            T withSendAndListenAccess();
        }
    }

    /**
     * Grouping of commons authorization rule update stages shared
     * between event hub namespace authorization rule and event hub authorization rule.
     */
    interface UpdateStages {
        /**
         * The stage of the event hub namespace or event hub authorization rule update
         * allowing to enable listen policy.
         *
         * @param  the next stage of the update
         */
        interface WithListen {
            /**
             * Specifies that the rule should have listening access enabled.
             *
             * @return the next stage of the update
             */
            T withListenAccess();
        }

        /**
         * The stage of the event hub namespace or event hub authorization rule update
         * allowing to enable send policy.
         *
         * @param  the next stage of the update
         */
        interface WithSend {
            /**
             * Specifies that the rule should have sending access enabled.
             *
             * @return the next stage of the update
             */
            T withSendAccess();
        }

        /**
         * The stage of event hub namespace or event hub authorization rule update
         * allowing to enable manage policy.
         *
         * @param  the next stage of the update
         */
        interface WithManage {
            /**
             * Specifies that the rule should have sending access enabled.
             *
             * @return the next stage of the update
             */
            T withManageAccess();
        }

        /**
         * The stage of the event hub namespace or event hub authorization rule update
         * allowing to enable send or manage policy.
         *
         * @param  the next stage of the update
         */
        interface WithSendOrManage extends WithSend, WithManage {
        }

        /**
         * The stage of the event hub namespace or event hub authorization rule update
         * allowing to enable listen, send or manage policy.
         *
         * @param  the next stage of the update
         */
        interface WithListenOrSendOrManage extends WithListen, WithSendOrManage {
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy