Skip to content

Commit

Permalink
.NET SDK Resource Provider:'Graph.RBAC'
Browse files Browse the repository at this point in the history
REST Spec PR 'Azure/azure-rest-api-specs#5181'
REST Spec PR Author 'yugangw-msft'
REST Spec PR Last commit
  • Loading branch information
adxsdknet committed Mar 8, 2019
1 parent 5311554 commit 694b7e6
Show file tree
Hide file tree
Showing 48 changed files with 6,064 additions and 760 deletions.
350 changes: 346 additions & 4 deletions src/SDKs/Graph.RBAC/Graph.RBAC/Generated/ApplicationsOperations.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public static void Patch(this IApplicationsOperations operations, string applica
/// <param name='applicationObjectId'>
/// The object ID of the application for which to get owners.
/// </param>
public static IEnumerable<DirectoryObject> ListOwners(this IApplicationsOperations operations, string applicationObjectId)
public static IPage<DirectoryObject> ListOwners(this IApplicationsOperations operations, string applicationObjectId)
{
return operations.ListOwnersAsync(applicationObjectId).GetAwaiter().GetResult();
}
Expand All @@ -228,7 +228,7 @@ public static IEnumerable<DirectoryObject> ListOwners(this IApplicationsOperatio
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IEnumerable<DirectoryObject>> ListOwnersAsync(this IApplicationsOperations operations, string applicationObjectId, CancellationToken cancellationToken = default(CancellationToken))
public static async Task<IPage<DirectoryObject>> ListOwnersAsync(this IApplicationsOperations operations, string applicationObjectId, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListOwnersWithHttpMessagesAsync(applicationObjectId, null, cancellationToken).ConfigureAwait(false))
{
Expand All @@ -249,7 +249,7 @@ public static IEnumerable<DirectoryObject> ListOwners(this IApplicationsOperatio
/// The URL of the owner object, such as
/// https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd.
/// </param>
public static void AddOwner(this IApplicationsOperations operations, string applicationObjectId, ApplicationAddOwnerParameters parameters)
public static void AddOwner(this IApplicationsOperations operations, string applicationObjectId, AddOwnerParameters parameters)
{
operations.AddOwnerAsync(applicationObjectId, parameters).GetAwaiter().GetResult();
}
Expand All @@ -270,11 +270,48 @@ public static void AddOwner(this IApplicationsOperations operations, string appl
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task AddOwnerAsync(this IApplicationsOperations operations, string applicationObjectId, ApplicationAddOwnerParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
public static async Task AddOwnerAsync(this IApplicationsOperations operations, string applicationObjectId, AddOwnerParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
{
(await operations.AddOwnerWithHttpMessagesAsync(applicationObjectId, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
}

/// <summary>
/// Remove a member from owners.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='applicationObjectId'>
/// The object ID of the application from which to remove the owner.
/// </param>
/// <param name='ownerObjectId'>
/// Owner object id
/// </param>
public static void RemoveOwner(this IApplicationsOperations operations, string applicationObjectId, string ownerObjectId)
{
operations.RemoveOwnerAsync(applicationObjectId, ownerObjectId).GetAwaiter().GetResult();
}

/// <summary>
/// Remove a member from owners.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='applicationObjectId'>
/// The object ID of the application from which to remove the owner.
/// </param>
/// <param name='ownerObjectId'>
/// Owner object id
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task RemoveOwnerAsync(this IApplicationsOperations operations, string applicationObjectId, string ownerObjectId, CancellationToken cancellationToken = default(CancellationToken))
{
(await operations.RemoveOwnerWithHttpMessagesAsync(applicationObjectId, ownerObjectId, null, cancellationToken).ConfigureAwait(false)).Dispose();
}

/// <summary>
/// Get the keyCredentials associated with an application.
/// </summary>
Expand Down Expand Up @@ -451,5 +488,47 @@ public static IPage<Application> ListNext(this IApplicationsOperations operation
}
}

/// <summary>
/// Directory objects that are owners of the application.
/// </summary>
/// <remarks>
/// The owners are a set of non-admin users who are allowed to modify this
/// object.
/// </remarks>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </param>
public static IPage<DirectoryObject> ListOwnersNext(this IApplicationsOperations operations, string nextPageLink)
{
return operations.ListOwnersNextAsync(nextPageLink).GetAwaiter().GetResult();
}

/// <summary>
/// Directory objects that are owners of the application.
/// </summary>
/// <remarks>
/// The owners are a set of non-admin users who are allowed to modify this
/// object.
/// </remarks>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IPage<DirectoryObject>> ListOwnersNextAsync(this IApplicationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListOwnersNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

}
}
Loading

0 comments on commit 694b7e6

Please sign in to comment.