/// <summary> /// Returns groups for a given iOSMAMPolicy. /// </summary> /// <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 <GroupItem> > GetGroupsForMAMPolicyNextAsync(this IIosOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetGroupsForMAMPolicyNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns Intune iOSPolicies. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='hostName'> /// Location hostName for the tenant /// </param> /// <param name='filter'> /// The filter to apply on the operation. /// </param> /// <param name='top'> /// </param> /// <param name='select'> /// select specific fields in entity. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <IOSMAMPolicy> > GetMAMPoliciesAsync(this IIosOperations operations, string hostName, string filter = default(string), int?top = default(int?), string select = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetMAMPoliciesWithHttpMessagesAsync(hostName, filter, top, select, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// patch an iOSMAMPolicy. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='hostName'> /// Location hostName for the tenant /// </param> /// <param name='policyName'> /// Unique name for the policy /// </param> /// <param name='parameters'> /// Parameters supplied to the Create or update an android policy operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IOSMAMPolicy> PatchMAMPolicyAsync(this IIosOperations operations, string hostName, string policyName, IOSMAMPolicy parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.PatchMAMPolicyWithHttpMessagesAsync(hostName, policyName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns Intune iOS policies. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='hostName'> /// Location hostName for the tenant /// </param> /// <param name='policyName'> /// Unique name for the policy /// </param> /// <param name='select'> /// select specific fields in entity. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IOSMAMPolicy> GetMAMPolicyByNameAsync(this IIosOperations operations, string hostName, string policyName, string select = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetMAMPolicyByNameWithHttpMessagesAsync(hostName, policyName, select, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns Intune iOS policies. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='hostName'> /// Location hostName for the tenant /// </param> /// <param name='policyName'> /// Unique name for the policy /// </param> /// <param name='select'> /// select specific fields in entity. /// </param> public static IOSMAMPolicy GetMAMPolicyByName(this IIosOperations operations, string hostName, string policyName, string select = default(string)) { return(Task.Factory.StartNew(s => ((IIosOperations)s).GetMAMPolicyByNameAsync(hostName, policyName, select), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Returns groups for a given iOSMAMPolicy. /// </summary> /// <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 <GroupItem> GetGroupsForMAMPolicyNext(this IIosOperations operations, string nextPageLink) { return(Task.Factory.StartNew(s => ((IIosOperations)s).GetGroupsForMAMPolicyNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Delete Group for iOS Policy /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='hostName'> /// Location hostName for the tenant /// </param> /// <param name='policyName'> /// Unique name for the policy /// </param> /// <param name='groupId'> /// application unique Name /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteGroupForMAMPolicyAsync(this IIosOperations operations, string hostName, string policyName, string groupId, CancellationToken cancellationToken = default(CancellationToken)) { await operations.DeleteGroupForMAMPolicyWithHttpMessagesAsync(hostName, policyName, groupId, null, cancellationToken).ConfigureAwait(false); }
/// <summary> /// Delete Group for iOS Policy /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='hostName'> /// Location hostName for the tenant /// </param> /// <param name='policyName'> /// Unique name for the policy /// </param> /// <param name='groupId'> /// application unique Name /// </param> public static void DeleteGroupForMAMPolicy(this IIosOperations operations, string hostName, string policyName, string groupId) { Task.Factory.StartNew(s => ((IIosOperations)s).DeleteGroupForMAMPolicyAsync(hostName, policyName, groupId), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// Add group to an iOSMAMPolicy. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='hostName'> /// Location hostName for the tenant /// </param> /// <param name='policyName'> /// Unique name for the policy /// </param> /// <param name='groupId'> /// group Id /// </param> /// <param name='parameters'> /// Parameters supplied to the Create or update app to an android policy /// operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task AddGroupForMAMPolicyAsync(this IIosOperations operations, string hostName, string policyName, string groupId, MAMPolicyAppIdOrGroupIdPayload parameters, CancellationToken cancellationToken = default(CancellationToken)) { await operations.AddGroupForMAMPolicyWithHttpMessagesAsync(hostName, policyName, groupId, parameters, null, cancellationToken).ConfigureAwait(false); }
/// <summary> /// Returns Intune iOSPolicies. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='hostName'> /// Location hostName for the tenant /// </param> /// <param name='filter'> /// The filter to apply on the operation. /// </param> /// <param name='top'> /// </param> /// <param name='select'> /// select specific fields in entity. /// </param> public static IPage <IOSMAMPolicy> GetMAMPolicies(this IIosOperations operations, string hostName, string filter = default(string), int?top = default(int?), string select = default(string)) { return(Task.Factory.StartNew(s => ((IIosOperations)s).GetMAMPoliciesAsync(hostName, filter, top, select), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Add app to an iOSMAMPolicy. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='hostName'> /// Location hostName for the tenant /// </param> /// <param name='policyName'> /// Unique name for the policy /// </param> /// <param name='appName'> /// application unique Name /// </param> /// <param name='parameters'> /// Parameters supplied to add an app to an ios policy. /// </param> public static void AddAppForMAMPolicy(this IIosOperations operations, string hostName, string policyName, string appName, MAMPolicyAppIdOrGroupIdPayload parameters) { Task.Factory.StartNew(s => ((IIosOperations)s).AddAppForMAMPolicyAsync(hostName, policyName, appName, parameters), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// patch an iOSMAMPolicy. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='hostName'> /// Location hostName for the tenant /// </param> /// <param name='policyName'> /// Unique name for the policy /// </param> /// <param name='parameters'> /// Parameters supplied to the Create or update an android policy operation. /// </param> public static IOSMAMPolicy PatchMAMPolicy(this IIosOperations operations, string hostName, string policyName, IOSMAMPolicy parameters) { return(Task.Factory.StartNew(s => ((IIosOperations)s).PatchMAMPolicyAsync(hostName, policyName, parameters), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }