/// <summary> /// Gets a enrollment account by name. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='name'> /// Enrollment Account name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <EnrollmentAccount> GetAsync(this IEnrollmentAccountsOperations operations, string name, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(name, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get the enrollment account by id. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='billingAccountName'> /// billing Account Id. /// </param> /// <param name='enrollmentAccountName'> /// Enrollment Account Id. /// </param> /// <param name='expand'> /// May be used to expand the Department. /// </param> /// <param name='filter'> /// The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not /// currently support 'ne', 'or', or 'not'. Tag filter is a key value pair /// string where key and value is separated by a colon (:). /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <EnrollmentAccount> GetByEnrollmentAccountIdAsync(this IEnrollmentAccountsOperations operations, string billingAccountName, string enrollmentAccountName, string expand = default(string), string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetByEnrollmentAccountIdWithHttpMessagesAsync(billingAccountName, enrollmentAccountName, expand, filter, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists the enrollment accounts the caller has access to. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <EnrollmentAccountSummary> > ListAsync(this IEnrollmentAccountsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get the enrollment account by id. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='billingAccountName'> /// billing Account Id. /// </param> /// <param name='enrollmentAccountName'> /// Enrollment Account Id. /// </param> /// <param name='expand'> /// May be used to expand the Department. /// </param> /// <param name='filter'> /// The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not /// currently support 'ne', 'or', or 'not'. Tag filter is a key value pair /// string where key and value is separated by a colon (:). /// </param> public static EnrollmentAccount GetByEnrollmentAccountId(this IEnrollmentAccountsOperations operations, string billingAccountName, string enrollmentAccountName, string expand = default(string), string filter = default(string)) { return(operations.GetByEnrollmentAccountIdAsync(billingAccountName, enrollmentAccountName, expand, filter).GetAwaiter().GetResult()); }
/// <summary> /// Gets a enrollment account by name. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='name'> /// Enrollment Account name. /// </param> public static EnrollmentAccount Get(this IEnrollmentAccountsOperations operations, string name) { return(operations.GetAsync(name).GetAwaiter().GetResult()); }
/// <summary> /// Lists the enrollment accounts the caller has access to. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static EnrollmentAccountListResult List(this IEnrollmentAccountsOperations operations) { return(operations.ListAsync().GetAwaiter().GetResult()); }
/// <summary> /// Lists the enrollment accounts the caller has access to. /// </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 <EnrollmentAccountSummary> ListNext(this IEnrollmentAccountsOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Lists the enrollment accounts the caller has access to. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <EnrollmentAccountSummary> List(this IEnrollmentAccountsOperations operations) { return(operations.ListAsync().GetAwaiter().GetResult()); }