Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR Microsoft.Azure.Management.ManagementGroups] add config for managementgroup #956

Open
wants to merge 2 commits into
base: sdkAutomation/Microsoft.Azure.Management.ManagementGroups
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,8 @@ 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
Expand All @@ -77,15 +64,23 @@ internal EntitiesOperations(ManagementGroupsAPIClient client)
/// </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'
/// 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.
/// With $search=ParentOnly the API will return only the group if the user has
/// access to at least one of the descendants of the group.
/// With $search=ChildrenOnly the API will return only the first level of
/// children of the group entity info specified in $filter. The user must have
/// direct access to the children entities or one of it's descendants for it to
/// show up in the results. Possible values include: 'AllowedParents',
/// 'AllowedChildren', 'ParentAndFirstLevelChildren', 'ParentOnly',
/// 'ChildrenOnly'
/// </param>
/// <param name='filter'>
/// The filter parameter allows you to filter on the the name or display name
Expand Down Expand Up @@ -128,7 +123,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 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))
public async Task<AzureOperationResponse<IPage<EntityInfo>>> ListWithHttpMessagesAsync(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 @@ -141,9 +136,6 @@ 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);
Expand All @@ -161,33 +153,33 @@ internal EntitiesOperations(ManagementGroupsAPIClient client)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
}
if (skiptoken != null)
if (Client.Skiptoken != null)
{
_queryParameters.Add(string.Format("$skiptoken={0}", System.Uri.EscapeDataString(skiptoken)));
_queryParameters.Add(string.Format("$skiptoken={0}", System.Uri.EscapeDataString(Client.Skiptoken)));
}
if (skip != null)
if (Client.Skip != null)
{
_queryParameters.Add(string.Format("$skip={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(skip, Client.SerializationSettings).Trim('"'))));
_queryParameters.Add(string.Format("$skip={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(Client.Skip, Client.SerializationSettings).Trim('"'))));
}
if (top != null)
if (Client.Top != null)
{
_queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"'))));
_queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(Client.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)));
_queryParameters.Add(string.Format("$search={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(search, Client.SerializationSettings).Trim('"'))));
}
if (filter != null)
{
_queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter)));
}
if (view != null)
{
_queryParameters.Add(string.Format("$view={0}", System.Uri.EscapeDataString(view)));
_queryParameters.Add(string.Format("$view={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(view, Client.SerializationSettings).Trim('"'))));
}
if (groupName != null)
{
Expand Down Expand Up @@ -324,6 +316,7 @@ 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,24 +24,11 @@ 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
Expand All @@ -51,15 +38,23 @@ public static partial class EntitiesOperationsExtensions
/// </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'
/// 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.
/// With $search=ParentOnly the API will return only the group if the user has
/// access to at least one of the descendants of the group.
/// With $search=ChildrenOnly the API will return only the first level of
/// children of the group entity info specified in $filter. The user must have
/// direct access to the children entities or one of it's descendants for it to
/// show up in the results. Possible values include: 'AllowedParents',
/// 'AllowedChildren', 'ParentAndFirstLevelChildren', 'ParentOnly',
/// 'ChildrenOnly'
/// </param>
/// <param name='filter'>
/// The filter parameter allows you to filter on the the name or display name
Expand All @@ -81,32 +76,19 @@ public static partial class EntitiesOperationsExtensions
/// <param name='cacheControl'>
/// Indicates that the request shouldn't utilize any caches.
/// </param>
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")
public static IPage<EntityInfo> List(this IEntitiesOperations operations, 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(skiptoken, skip, top, select, search, filter, view, groupName, cacheControl).GetAwaiter().GetResult();
return operations.ListAsync(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
Expand All @@ -116,15 +98,23 @@ public static partial class EntitiesOperationsExtensions
/// </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'
/// 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.
/// With $search=ParentOnly the API will return only the group if the user has
/// access to at least one of the descendants of the group.
/// With $search=ChildrenOnly the API will return only the first level of
/// children of the group entity info specified in $filter. The user must have
/// direct access to the children entities or one of it's descendants for it to
/// show up in the results. Possible values include: 'AllowedParents',
/// 'AllowedChildren', 'ParentAndFirstLevelChildren', 'ParentOnly',
/// 'ChildrenOnly'
/// </param>
/// <param name='filter'>
/// The filter parameter allows you to filter on the the name or display name
Expand All @@ -149,9 +139,9 @@ public static partial class EntitiesOperationsExtensions
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
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))
public static async Task<IPage<EntityInfo>> ListAsync(this IEntitiesOperations operations, 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(skiptoken, skip, top, select, search, filter, view, groupName, cacheControl, null, cancellationToken).ConfigureAwait(false))
using (var _result = await operations.ListWithHttpMessagesAsync(select, search, filter, view, groupName, cacheControl, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
Expand All @@ -160,6 +150,7 @@ 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 @@ -178,6 +169,7 @@ 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