예제 #1
0
 /// <summary>
 /// Initializes a new instance of the SiteRecoveryManagementClient
 /// class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public SiteRecoveryManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._alertSettings                      = new AlertSettingsOperations(this);
     this._events                             = new EventOperations(this);
     this._fabrics                            = new FabricOperations(this);
     this._jobs                               = new JobOperations(this);
     this._logicalNetwork                     = new LogicalNetworkOperations(this);
     this._networkMapping                     = new NetworkMappingOperations(this);
     this._network                            = new NetworkOperations(this);
     this._policies                           = new PolicyOperations(this);
     this._protectableItem                    = new ProtectableItemOperations(this);
     this._protectionContainerMapping         = new ProtectionContainerMappingOperations(this);
     this._protectionContainer                = new ProtectionContainerOperations(this);
     this._recoveryPlan                       = new RecoveryPlanOperations(this);
     this._recoveryPoint                      = new RecoveryPointOperations(this);
     this._recoveryServicesProvider           = new RecoveryServicesProviderOperations(this);
     this._replicationProtectedItem           = new ReplicationProtectedItemOperations(this);
     this._storageClassificationMapping       = new StorageClassificationMappingOperations(this);
     this._storageClassification              = new StorageClassificationOperations(this);
     this._vCenters                           = new VCenterOperations(this);
     this._apiVersion                         = "2015-01-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout                  = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// Get the replication protectable object by Id.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.SiteRecovery.IProtectableItemOperations.
 /// </param>
 /// <param name='fabricName'>
 /// Required. Fabric unique name.
 /// </param>
 /// <param name='protectionContainerName'>
 /// Required. Protection container unique name.
 /// </param>
 /// <param name='protectableItemName'>
 /// Required. Replication protected item unique name.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// The response model for the fabric object
 /// </returns>
 public static ProtectableItemResponse Get(this IProtectableItemOperations operations, string fabricName, string protectionContainerName, string protectableItemName, CustomRequestHeaders customRequestHeaders)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IProtectableItemOperations)s).GetAsync(fabricName, protectionContainerName, protectableItemName, customRequestHeaders);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
 /// <summary>
 /// Enumerate all replication protectable items in a container.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.SiteRecovery.IProtectableItemOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. The url to the next protected items page.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// The response model for the list replicated protected items.
 /// </returns>
 public static ProtectableItemListResponse ListNext(this IProtectableItemOperations operations, string nextLink, CustomRequestHeaders customRequestHeaders)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IProtectableItemOperations)s).ListNextAsync(nextLink, customRequestHeaders);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
 /// <summary>
 /// Initializes a new instance of the SiteRecoveryManagementClient
 /// class.
 /// </summary>
 public SiteRecoveryManagementClient()
     : base()
 {
     this._fabrics                            = new FabricOperations(this);
     this._jobs                               = new JobOperations(this);
     this._logicalNetwork                     = new LogicalNetworkOperations(this);
     this._networkMapping                     = new NetworkMappingOperations(this);
     this._network                            = new NetworkOperations(this);
     this._policies                           = new PolicyOperations(this);
     this._protectableItem                    = new ProtectableItemOperations(this);
     this._protectionContainerMapping         = new ProtectionContainerMappingOperations(this);
     this._protectionContainer                = new ProtectionContainerOperations(this);
     this._recoveryServicesProvider           = new RecoveryServicesProviderOperations(this);
     this._replicationProtectedItem           = new ReplicationProtectedItemOperations(this);
     this._vCenters                           = new VCenterOperations(this);
     this._apiVersion                         = "2015-01-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout                  = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// Get the replication protectable object by Id.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.SiteRecovery.IProtectableItemOperations.
 /// </param>
 /// <param name='fabricName'>
 /// Required. Fabric unique name.
 /// </param>
 /// <param name='protectionContainerName'>
 /// Required. Protection container unique name.
 /// </param>
 /// <param name='protectableItemName'>
 /// Required. Replication protected item unique name.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// The response model for the fabric object
 /// </returns>
 public static Task<ProtectableItemResponse> GetAsync(this IProtectableItemOperations operations, string fabricName, string protectionContainerName, string protectableItemName, CustomRequestHeaders customRequestHeaders)
 {
     return operations.GetAsync(fabricName, protectionContainerName, protectableItemName, customRequestHeaders, CancellationToken.None);
 }
 /// <summary>
 /// Enumerate all replication protectable items in a container.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.SiteRecovery.IProtectableItemOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. The url to the next protected items page.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// The response model for the list replicated protected items.
 /// </returns>
 public static Task<ProtectableItemListResponse> ListNextAsync(this IProtectableItemOperations operations, string nextLink, CustomRequestHeaders customRequestHeaders)
 {
     return operations.ListNextAsync(nextLink, customRequestHeaders, CancellationToken.None);
 }
 /// <summary>
 /// Enumerate all replication protectable items in a container.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.SiteRecovery.IProtectableItemOperations.
 /// </param>
 /// <param name='fabricName'>
 /// Required. Fabric unique name.
 /// </param>
 /// <param name='protectionContainerName'>
 /// Required. Protection container unique name.
 /// </param>
 /// <param name='typeOfEntities'>
 /// Optional. Type of entities to fetch. Protected to fetch protected
 /// only, Unprotected to fetch unprotected only, All to fetch both
 /// unprotected and protected.
 /// </param>
 /// <param name='skipToken'>
 /// Optional. Continuation Token.
 /// </param>
 /// <param name='take'>
 /// Optional. Maximum number of items to be fetched in a request.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// The response model for the list replicated protected items.
 /// </returns>
 public static Task<ProtectableItemListResponse> ListAsync(this IProtectableItemOperations operations, string fabricName, string protectionContainerName, string typeOfEntities, string skipToken, string take, CustomRequestHeaders customRequestHeaders)
 {
     return operations.ListAsync(fabricName, protectionContainerName, typeOfEntities, skipToken, take, customRequestHeaders, CancellationToken.None);
 }