/// <summary>
 /// Get operations.
 /// </summary>
 /// <remarks>
 /// List all the operations.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <OperationResponse> > ListAsync(this IOperationOperations operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists a collection of operations associated with tags.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='apiId'>
 /// API revision identifier. Must be unique in the current API Management
 /// service instance. Non-current revision has ;rev=n as a suffix where n is
 /// the revision number.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='includeNotTaggedOperations'>
 /// Include not tagged Operations.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <TagResourceContract> > ListByTagsAsync(this IOperationOperations operations, string resourceGroupName, string serviceName, string apiId, ODataQuery <TagResourceContract> odataQuery = default(ODataQuery <TagResourceContract>), bool?includeNotTaggedOperations = default(bool?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByTagsWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, odataQuery, includeNotTaggedOperations, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists a collection of operations associated with tags.
 /// </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 <TagResourceContract> > ListByTagsNextAsync(this IOperationOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByTagsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #4
0
 /// <summary>
 /// Validate operation for specified backed up item. This is a synchronous
 /// operation.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='vaultName'>
 /// The name of the recovery services vault.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group where the recovery services vault is
 /// present.
 /// </param>
 /// <param name='parameters'>
 /// resource validate operation request
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ValidateOperationsResponse> ValidateAsync(this IOperationOperations operations, string vaultName, string resourceGroupName, ValidateOperationRequest parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ValidateWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #5
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Quota = new QuotaOperations(this);
     QuotaRequestStatus = new QuotaRequestStatusOperations(this);
     AutoQuotaIncrease  = new AutoQuotaIncreaseOperations(this);
     Reservation        = new ReservationOperations(this);
     ReservationOrder   = new ReservationOrderOperations(this);
     Operation          = new OperationOperations(this);
     BaseUri            = new System.Uri("https://management.azure.com");
     AcceptLanguage     = "en-US";
     LongRunningOperationRetryTimeout = 30;
     GenerateClientRequestId          = true;
     SerializationSettings            = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     SerializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
 /// <summary>
 /// Lists a collection of operations associated with tags.
 /// </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 <TagResourceContract> ListByTagsNext(this IOperationOperations operations, string nextPageLink)
 {
     return(operations.ListByTagsNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists a collection of operations associated with tags.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='apiId'>
 /// API revision identifier. Must be unique in the current API Management
 /// service instance. Non-current revision has ;rev=n as a suffix where n is
 /// the revision number.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='includeNotTaggedOperations'>
 /// Include not tagged Operations.
 /// </param>
 public static IPage <TagResourceContract> ListByTags(this IOperationOperations operations, string resourceGroupName, string serviceName, string apiId, ODataQuery <TagResourceContract> odataQuery = default(ODataQuery <TagResourceContract>), bool?includeNotTaggedOperations = default(bool?))
 {
     return(operations.ListByTagsAsync(resourceGroupName, serviceName, apiId, odataQuery, includeNotTaggedOperations).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Get operations.
 /// </summary>
 /// <remarks>
 /// List all the operations.
 /// </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 <OperationResponse> ListNext(this IOperationOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Get operations.
 /// </summary>
 /// <remarks>
 /// List all the operations.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IPage <OperationResponse> List(this IOperationOperations operations)
 {
     return(operations.ListAsync().GetAwaiter().GetResult());
 }
Example #10
0
 /// <summary>
 /// Validate operation for specified backed up item. This is a synchronous
 /// operation.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='vaultName'>
 /// The name of the recovery services vault.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group where the recovery services vault is
 /// present.
 /// </param>
 /// <param name='parameters'>
 /// resource validate operation request
 /// </param>
 public static ValidateOperationsResponse Validate(this IOperationOperations operations, string vaultName, string resourceGroupName, ValidateOperationRequest parameters)
 {
     return(operations.ValidateAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult());
 }