Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/SDKs/ManagementGroups/AzSdk.RP.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--This file and it's contents are updated at build time moving or editing might result in build failure. Take due deligence while editing this file-->
<PropertyGroup>
<AzureApiTag>Management_2018-01-01-preview;</AzureApiTag>
<AzureApiTag>Management_2018-03-01-preview;</AzureApiTag>
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,56 @@ internal EntitiesOperations(ManagementGroupsAPIClient client)
/// <summary>
/// List all entities (Management Groups, Subscriptions, etc.) for the
/// authenticated user.
///
/// </summary>
/// <param name='skiptoken'>
/// Page continuation token is only used if a previous operation returned a
/// partial result. If a previous response contains a nextLink element, the
/// value of the nextLink element will include a token parameter that specifies
/// a starting point to use for subsequent calls.
/// </param>
/// <param name='skip'>
/// Number of entities to skip over when retrieving results. Passing this in
/// will override $skipToken.
/// </param>
/// <param name='top'>
/// Number of elements to return when retrieving results. Passing this in will
/// override $skipToken.
/// </param>
/// <param name='select'>
/// This parameter specifies the fields to include in the response. Can include
/// any combination of
/// Name,DisplayName,Type,ParentDisplayNameChain,ParentChain, e.g.
/// '$select=Name,DisplayName,Type,ParentDisplayNameChain,ParentNameChain'.
/// When specified the $select parameter can override select in $skipToken.
/// </param>
/// <param name='search'>
/// The $search parameter is used in conjunction with the $filter parameter to
/// return three different outputs depending on the parameter passed in. With
/// $search=AllowedParents the API will return the entity info of all groups
/// that the requested entity will be able to reparent to as determined by the
/// user's permissions. With $search=AllowedChildren the API will return the
/// entity info of all entities that can be added as children of the requested
/// entity. With $search=ParentAndFirstLevelChildren the API will return the
/// parent and first level of children that the user has either direct access
/// to or indirect access via one of their descendants. Possible values
/// include: 'AllowedParents', 'AllowedChildren', 'ParentAndFirstLevelChildren'
/// </param>
/// <param name='filter'>
/// The filter parameter allows you to filter on the the name or display name
/// fields. You can check for equality on the name field (e.g. name eq
/// '{entityName}') and you can check for substrings on either the name or
/// display name fields(e.g. contains(name, '{substringToSearch}'),
/// contains(displayName, '{substringToSearch')). Note that the '{entityName}'
/// and '{substringToSearch}' fields are checked case insensitively.
/// </param>
/// <param name='view'>
/// The view parameter allows clients to filter the type of data that is
/// returned by the getEntities call. Possible values include: 'FullHierarchy',
/// 'GroupsOnly', 'SubscriptionsOnly', 'Audit'
/// </param>
/// <param name='groupName'>
/// A filter which allows the call to be filtered for a specific group.
/// A filter which allows the get entities call to focus on a particular group
/// (i.e. "$filter=name eq 'groupName'")
/// </param>
/// <param name='cacheControl'>
/// Indicates that the request shouldn't utilize any caches.
Expand All @@ -82,7 +128,7 @@ internal EntitiesOperations(ManagementGroupsAPIClient client)
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<AzureOperationResponse<IPage<EntityInfo>>> ListWithHttpMessagesAsync(string groupName = default(string), string cacheControl = "no-cache", Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<AzureOperationResponse<IPage<EntityInfo>>> ListWithHttpMessagesAsync(string skiptoken = default(string), int? skip = default(int?), int? top = default(int?), string select = default(string), string search = default(string), string filter = default(string), string view = default(string), string groupName = default(string), string cacheControl = "no-cache", Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
Expand All @@ -95,6 +141,13 @@ internal EntitiesOperations(ManagementGroupsAPIClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary<string, object> tracingParameters = new Dictionary<string, object>();
tracingParameters.Add("skiptoken", skiptoken);
tracingParameters.Add("skip", skip);
tracingParameters.Add("top", top);
tracingParameters.Add("select", select);
tracingParameters.Add("search", search);
tracingParameters.Add("filter", filter);
tracingParameters.Add("view", view);
tracingParameters.Add("groupName", groupName);
tracingParameters.Add("cacheControl", cacheControl);
tracingParameters.Add("cancellationToken", cancellationToken);
Expand All @@ -108,9 +161,33 @@ internal EntitiesOperations(ManagementGroupsAPIClient client)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
}
if (Client.Skiptoken != null)
if (skiptoken != null)
{
_queryParameters.Add(string.Format("$skiptoken={0}", System.Uri.EscapeDataString(skiptoken)));
}
if (skip != null)
{
_queryParameters.Add(string.Format("$skip={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(skip, Client.SerializationSettings).Trim('"'))));
}
if (top != null)
{
_queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"'))));
}
if (select != null)
{
_queryParameters.Add(string.Format("$select={0}", System.Uri.EscapeDataString(select)));
}
if (search != null)
{
_queryParameters.Add(string.Format("$search={0}", System.Uri.EscapeDataString(search)));
}
if (filter != null)
{
_queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter)));
}
if (view != null)
{
_queryParameters.Add(string.Format("$skiptoken={0}", System.Uri.EscapeDataString(Client.Skiptoken)));
_queryParameters.Add(string.Format("$view={0}", System.Uri.EscapeDataString(view)));
}
if (groupName != null)
{
Expand Down Expand Up @@ -247,7 +324,6 @@ internal EntitiesOperations(ManagementGroupsAPIClient client)
/// <summary>
/// List all entities (Management Groups, Subscriptions, etc.) for the
/// authenticated user.
///
/// </summary>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,42 +24,134 @@ public static partial class EntitiesOperationsExtensions
/// <summary>
/// List all entities (Management Groups, Subscriptions, etc.) for the
/// authenticated user.
///
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='skiptoken'>
/// Page continuation token is only used if a previous operation returned a
/// partial result. If a previous response contains a nextLink element, the
/// value of the nextLink element will include a token parameter that specifies
/// a starting point to use for subsequent calls.
/// </param>
/// <param name='skip'>
/// Number of entities to skip over when retrieving results. Passing this in
/// will override $skipToken.
/// </param>
/// <param name='top'>
/// Number of elements to return when retrieving results. Passing this in will
/// override $skipToken.
/// </param>
/// <param name='select'>
/// This parameter specifies the fields to include in the response. Can include
/// any combination of
/// Name,DisplayName,Type,ParentDisplayNameChain,ParentChain, e.g.
/// '$select=Name,DisplayName,Type,ParentDisplayNameChain,ParentNameChain'.
/// When specified the $select parameter can override select in $skipToken.
/// </param>
/// <param name='search'>
/// The $search parameter is used in conjunction with the $filter parameter to
/// return three different outputs depending on the parameter passed in. With
/// $search=AllowedParents the API will return the entity info of all groups
/// that the requested entity will be able to reparent to as determined by the
/// user's permissions. With $search=AllowedChildren the API will return the
/// entity info of all entities that can be added as children of the requested
/// entity. With $search=ParentAndFirstLevelChildren the API will return the
/// parent and first level of children that the user has either direct access
/// to or indirect access via one of their descendants. Possible values
/// include: 'AllowedParents', 'AllowedChildren', 'ParentAndFirstLevelChildren'
/// </param>
/// <param name='filter'>
/// The filter parameter allows you to filter on the the name or display name
/// fields. You can check for equality on the name field (e.g. name eq
/// '{entityName}') and you can check for substrings on either the name or
/// display name fields(e.g. contains(name, '{substringToSearch}'),
/// contains(displayName, '{substringToSearch')). Note that the '{entityName}'
/// and '{substringToSearch}' fields are checked case insensitively.
/// </param>
/// <param name='view'>
/// The view parameter allows clients to filter the type of data that is
/// returned by the getEntities call. Possible values include: 'FullHierarchy',
/// 'GroupsOnly', 'SubscriptionsOnly', 'Audit'
/// </param>
/// <param name='groupName'>
/// A filter which allows the call to be filtered for a specific group.
/// A filter which allows the get entities call to focus on a particular group
/// (i.e. "$filter=name eq 'groupName'")
/// </param>
/// <param name='cacheControl'>
/// Indicates that the request shouldn't utilize any caches.
/// </param>
public static IPage<EntityInfo> List(this IEntitiesOperations operations, string groupName = default(string), string cacheControl = "no-cache")
public static IPage<EntityInfo> List(this IEntitiesOperations operations, string skiptoken = default(string), int? skip = default(int?), int? top = default(int?), string select = default(string), string search = default(string), string filter = default(string), string view = default(string), string groupName = default(string), string cacheControl = "no-cache")
{
return operations.ListAsync(groupName, cacheControl).GetAwaiter().GetResult();
return operations.ListAsync(skiptoken, skip, top, select, search, filter, view, groupName, cacheControl).GetAwaiter().GetResult();
}

/// <summary>
/// List all entities (Management Groups, Subscriptions, etc.) for the
/// authenticated user.
///
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='skiptoken'>
/// Page continuation token is only used if a previous operation returned a
/// partial result. If a previous response contains a nextLink element, the
/// value of the nextLink element will include a token parameter that specifies
/// a starting point to use for subsequent calls.
/// </param>
/// <param name='skip'>
/// Number of entities to skip over when retrieving results. Passing this in
/// will override $skipToken.
/// </param>
/// <param name='top'>
/// Number of elements to return when retrieving results. Passing this in will
/// override $skipToken.
/// </param>
/// <param name='select'>
/// This parameter specifies the fields to include in the response. Can include
/// any combination of
/// Name,DisplayName,Type,ParentDisplayNameChain,ParentChain, e.g.
/// '$select=Name,DisplayName,Type,ParentDisplayNameChain,ParentNameChain'.
/// When specified the $select parameter can override select in $skipToken.
/// </param>
/// <param name='search'>
/// The $search parameter is used in conjunction with the $filter parameter to
/// return three different outputs depending on the parameter passed in. With
/// $search=AllowedParents the API will return the entity info of all groups
/// that the requested entity will be able to reparent to as determined by the
/// user's permissions. With $search=AllowedChildren the API will return the
/// entity info of all entities that can be added as children of the requested
/// entity. With $search=ParentAndFirstLevelChildren the API will return the
/// parent and first level of children that the user has either direct access
/// to or indirect access via one of their descendants. Possible values
/// include: 'AllowedParents', 'AllowedChildren', 'ParentAndFirstLevelChildren'
/// </param>
/// <param name='filter'>
/// The filter parameter allows you to filter on the the name or display name
/// fields. You can check for equality on the name field (e.g. name eq
/// '{entityName}') and you can check for substrings on either the name or
/// display name fields(e.g. contains(name, '{substringToSearch}'),
/// contains(displayName, '{substringToSearch')). Note that the '{entityName}'
/// and '{substringToSearch}' fields are checked case insensitively.
/// </param>
/// <param name='view'>
/// The view parameter allows clients to filter the type of data that is
/// returned by the getEntities call. Possible values include: 'FullHierarchy',
/// 'GroupsOnly', 'SubscriptionsOnly', 'Audit'
/// </param>
/// <param name='groupName'>
/// A filter which allows the call to be filtered for a specific group.
/// A filter which allows the get entities call to focus on a particular group
/// (i.e. "$filter=name eq 'groupName'")
/// </param>
/// <param name='cacheControl'>
/// Indicates that the request shouldn't utilize any caches.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IPage<EntityInfo>> ListAsync(this IEntitiesOperations operations, string groupName = default(string), string cacheControl = "no-cache", CancellationToken cancellationToken = default(CancellationToken))
public static async Task<IPage<EntityInfo>> ListAsync(this IEntitiesOperations operations, string skiptoken = default(string), int? skip = default(int?), int? top = default(int?), string select = default(string), string search = default(string), string filter = default(string), string view = default(string), string groupName = default(string), string cacheControl = "no-cache", CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListWithHttpMessagesAsync(groupName, cacheControl, null, cancellationToken).ConfigureAwait(false))
using (var _result = await operations.ListWithHttpMessagesAsync(skiptoken, skip, top, select, search, filter, view, groupName, cacheControl, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
Expand All @@ -68,7 +160,6 @@ public static partial class EntitiesOperationsExtensions
/// <summary>
/// List all entities (Management Groups, Subscriptions, etc.) for the
/// authenticated user.
///
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
Expand All @@ -87,7 +178,6 @@ public static IPage<EntityInfo> ListNext(this IEntitiesOperations operations, st
/// <summary>
/// List all entities (Management Groups, Subscriptions, etc.) for the
/// authenticated user.
///
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
Expand Down
Loading