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

com.microsoft.azure.management.graphrbac.ActiveDirectoryGroup Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure Graph RBAC Management SDK. This package has been deprecated. A replacement package com.azure.resourcemanager:azure-resourcemanager-authorization is available as of 31-March-2022. We strongly encourage you to upgrade to continue receiving updates. See Migration Guide https://aka.ms/java-track2-migration-guide for guidance on upgrading. Refer to our deprecation policy https://azure.github.io/azure-sdk/policies_support.html for more details.

There is a newer version: 1.41.4
Show newest version
/**
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 */

package com.microsoft.azure.management.graphrbac;

import com.microsoft.azure.management.apigeneration.Fluent;
import com.microsoft.azure.management.graphrbac.implementation.ADGroupInner;
import com.microsoft.azure.management.resources.fluentcore.model.Appliable;
import com.microsoft.azure.management.resources.fluentcore.model.Creatable;
import com.microsoft.azure.management.resources.fluentcore.model.HasInner;
import com.microsoft.azure.management.resources.fluentcore.model.Updatable;
import rx.Observable;

import java.util.Set;

/**
 * An immutable client-side representation of an Azure AD group.
 */
@Fluent(ContainerName = "/Microsoft.Azure.Management.Graph.RBAC.Fluent")
public interface ActiveDirectoryGroup extends
        ActiveDirectoryObject,
        HasInner,
        Updatable {
    /**
     * @return security enabled field.
     */
    boolean securityEnabled();

    /**
     * @return mail field.
     */
    String mail();

    /**
     * Lists the members in the group.
     * @return an unmodifiable set of the members
     */
    Set listMembers();

    /**
     * Lists the members in the group.
     * @return an unmodifiable set of the members
     */
    Observable listMembersAsync();

    /**
     * Container interface for all the definitions that need to be implemented.
     */
    interface Definition extends
            DefinitionStages.Blank,
            DefinitionStages.WithEmailAlias,
            DefinitionStages.WithCreate {
    }

    /**
     * Grouping of all the AD group definition stages.
     */
    interface DefinitionStages {
        /**
         * The first stage of the AD group definition.
         */
        interface Blank extends WithEmailAlias {
        }

        /**
         * An AD Group definition allowing mail nickname to be specified.
         */
        interface WithEmailAlias {
            WithCreate withEmailAlias(String mailNickname);
        }

        /**
         * An AD Group definition allowing members to be added.
         */
        interface WithMember {
            /**
             * Add a member based on its object id. The member can be a user, a group, a service principal, or an application.
             * @param objectId the Active Directory object's id
             * @return the next AD Group definition stage
             */
            WithCreate withMember(String objectId);

            /**
             * Adds a user as a member in the group.
             * @param user the Active Directory user to add
             * @return the next AD group definition stage
             */
            WithCreate withMember(ActiveDirectoryUser user);

            /**
             * Adds a group as a member in the group.
             * @param group the Active Directory group to add
             * @return the next AD group definition stage
             */
            WithCreate withMember(ActiveDirectoryGroup group);

            /**
             * Adds a service principal as a member in the group.
             * @param servicePrincipal the service principal to add
             * @return the next AD group definition stage
             */
            WithCreate withMember(ServicePrincipal servicePrincipal);
        }

        /**
         * An AD group definition with sufficient inputs to create a new
         * group in the cloud, but exposing additional optional inputs to
         * specify.
         */
        interface WithCreate extends
                Creatable,
                WithMember {
        }
    }

    /**
     * Grouping of all the AD group update stages.
     */
    interface UpdateStages {
        /**
         * An AD Group definition allowing members to be added or removed.
         */
        interface WithMember {
            /**
             * Adds a member based on its object id. The member can be a user, a group, a service principal, or an application.
             * @param objectId the Active Directory object's id
             * @return the next AD Group update stage
             */
            Update withMember(String objectId);

            /**
             * Adds a user as a member in the group.
             * @param user the Active Directory user to add
             * @return the next AD group update stage
             */
            Update withMember(ActiveDirectoryUser user);

            /**
             * Adds a group as a member in the group.
             * @param group the Active Directory group to add
             * @return the next AD group update stage
             */
            Update withMember(ActiveDirectoryGroup group);

            /**
             * Adds a service principal as a member in the group.
             * @param servicePrincipal the service principal to add
             * @return the next AD group update stage
             */
            Update withMember(ServicePrincipal servicePrincipal);

            /**
             * Removes a member based on its object id.
             * @param objectId the Active Directory object's id
             * @return the next AD Group update stage
             */
            Update withoutMember(String objectId);

            /**
             * Removes a user as a member in the group.
             * @param user the Active Directory user to remove
             * @return the next AD group update stage
             */
            Update withoutMember(ActiveDirectoryUser user);

            /**
             * Removes a group as a member in the group.
             * @param group the Active Directory group to remove
             * @return the next AD group update stage
             */
            Update withoutMember(ActiveDirectoryGroup group);

            /**
             * Removes a service principal as a member in the group.
             * @param servicePrincipal the service principal to remove
             * @return the next AD group update stage
             */
            Update withoutMember(ServicePrincipal servicePrincipal);
        }
    }

    /**
     * The template for a group update operation, containing all the settings that can be modified.
     */
    interface Update extends
            Appliable,
            UpdateStages.WithMember {
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy