|
| 1 | +// Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | +// Licensed under the MIT License. |
| 3 | + |
| 4 | +// <auto-generated/> |
| 5 | + |
| 6 | +#nullable disable |
| 7 | + |
| 8 | +using System; |
| 9 | +using System.Globalization; |
| 10 | +using System.Threading; |
| 11 | +using System.Threading.Tasks; |
| 12 | +using Azure; |
| 13 | +using Azure.Core; |
| 14 | +using Azure.Core.Pipeline; |
| 15 | +using Azure.ResourceManager; |
| 16 | +using Azure.ResourceManager.CosmosDB.Models; |
| 17 | + |
| 18 | +namespace Azure.ResourceManager.CosmosDB |
| 19 | +{ |
| 20 | + /// <summary> |
| 21 | + /// A Class representing a RestorableCosmosDBAccount along with the instance operations that can be performed on it. |
| 22 | + /// If you have a <see cref="ResourceIdentifier" /> you can construct a <see cref="RestorableCosmosDBAccountResource" /> |
| 23 | + /// from an instance of <see cref="ArmClient" /> using the GetRestorableCosmosDBAccountResource method. |
| 24 | + /// Otherwise you can get one from its parent resource <see cref="CosmosDBLocationResource" /> using the GetRestorableCosmosDBAccount method. |
| 25 | + /// </summary> |
| 26 | + public partial class RestorableCosmosDBAccountResource : ArmResource |
| 27 | + { |
| 28 | + /// <summary> |
| 29 | + /// Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB collections under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission |
| 30 | + /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections |
| 31 | + /// Operation Id: RestorableMongodbCollections_List |
| 32 | + /// </summary> |
| 33 | + /// <param name="restorableMongoDBDatabaseRid"> The resource ID of the MongoDB database. </param> |
| 34 | + /// <param name="cancellationToken"> The cancellation token to use. </param> |
| 35 | + /// <returns> An async collection of <see cref="RestorableMongoDBCollection" /> that may take multiple service requests to iterate over. </returns> |
| 36 | + public virtual AsyncPageable<RestorableMongoDBCollection> GetRestorableMongoDBCollectionsAsync(string restorableMongoDBDatabaseRid, CancellationToken cancellationToken) |
| 37 | + { |
| 38 | + HttpMessage FirstPageRequest(int? pageSizeHint) => _restorableMongoDBCollectionsRestClient.CreateListRequest(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Guid.Parse(Id.Name), restorableMongoDBDatabaseRid, null, null); |
| 39 | + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, RestorableMongoDBCollection.DeserializeRestorableMongoDBCollection, _restorableMongoDBCollectionsClientDiagnostics, Pipeline, "RestorableCosmosDBAccountResource.GetRestorableMongoDBCollections", "value", null, cancellationToken); |
| 40 | + } |
| 41 | + |
| 42 | + /// <summary> |
| 43 | + /// Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB collections under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission |
| 44 | + /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections |
| 45 | + /// Operation Id: RestorableMongodbCollections_List |
| 46 | + /// </summary> |
| 47 | + /// <param name="restorableMongoDBDatabaseRid"> The resource ID of the MongoDB database. </param> |
| 48 | + /// <param name="cancellationToken"> The cancellation token to use. </param> |
| 49 | + /// <returns> A collection of <see cref="RestorableMongoDBCollection" /> that may take multiple service requests to iterate over. </returns> |
| 50 | + public virtual Pageable<RestorableMongoDBCollection> GetRestorableMongoDBCollections(string restorableMongoDBDatabaseRid, CancellationToken cancellationToken) |
| 51 | + { |
| 52 | + HttpMessage FirstPageRequest(int? pageSizeHint) => _restorableMongoDBCollectionsRestClient.CreateListRequest(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Guid.Parse(Id.Name), restorableMongoDBDatabaseRid, null, null); |
| 53 | + return PageableHelpers.CreatePageable(FirstPageRequest, null, RestorableMongoDBCollection.DeserializeRestorableMongoDBCollection, _restorableMongoDBCollectionsClientDiagnostics, Pipeline, "RestorableCosmosDBAccountResource.GetRestorableMongoDBCollections", "value", null, cancellationToken); |
| 54 | + } |
| 55 | + } |
| 56 | +} |
0 commit comments