// 
// Copyright (c) Microsoft and contributors.  All rights reserved.
// 
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//   http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// 
// See the License for the specific language governing permissions and
// limitations under the License.
// 

// Warning: This code was generated by a tool.
// 
// Changes to this file may cause incorrect behavior and will be lost if the
// code is regenerated.

using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.Graph.RBAC.Models;

namespace Microsoft.Azure.Graph.RBAC
{
    /// <summary>
    /// Operations for working with service principal in Azure Active Directory
    /// Graph API.  (see
    /// http://msdn.microsoft.com/en-us/library/azure/hh974476.aspx for more
    /// information)
    /// </summary>
    public partial interface IServicePrincipalOperations
    {
        /// <summary>
        /// Creates a service principal in the  directory.
        /// </summary>
        /// <param name='parameters'>
        /// Parameters to create a service principal.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        /// <returns>
        /// Server response for service principal information API call
        /// </returns>
        Task<ServicePrincipalGetResult> CreateAsync(ServicePrincipalCreateParameters parameters, CancellationToken cancellationToken);
        
        /// <summary>
        /// Deletes service principal from the directory.
        /// </summary>
        /// <param name='objectId'>
        /// Object id to delete service principal information.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        /// <returns>
        /// Server response for service principal information API call
        /// </returns>
        Task<ServicePrincipalGetResult> DeleteAsync(string objectId, CancellationToken cancellationToken);
        
        /// <summary>
        /// Gets service principal information from the directory.
        /// </summary>
        /// <param name='objectId'>
        /// Object id to get service principal information.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        /// <returns>
        /// Server response for service principal information API call
        /// </returns>
        Task<ServicePrincipalGetResult> GetAsync(string objectId, CancellationToken cancellationToken);
        
        /// <summary>
        /// Gets service principal information from the directory.
        /// </summary>
        /// <param name='servicePrincipalName'>
        /// filter based on service principal name
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        /// <returns>
        /// Server response for get tenant service principals API call
        /// </returns>
        Task<ServicePrincipalListResult> GetByServicePrincipalNameAsync(string servicePrincipalName, CancellationToken cancellationToken);
        
        /// <summary>
        /// Gets list of service principals from the current tenant.
        /// </summary>
        /// <param name='displayNameStartsWith'>
        /// Display name to filter results.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        /// <returns>
        /// Server response for get tenant service principals API call
        /// </returns>
        Task<ServicePrincipalListResult> ListAsync(string displayNameStartsWith, CancellationToken cancellationToken);
        
        /// <summary>
        /// Gets list of service principals for the current tenant.
        /// </summary>
        /// <param name='nextLink'>
        /// NextLink from the previous successful call to List operation.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        /// <returns>
        /// Server response for get tenant service principals API call
        /// </returns>
        Task<ServicePrincipalListResult> ListNextAsync(string nextLink, CancellationToken cancellationToken);
    }
}
