/// <summary>
 /// Promote one release (default latest one) from one deployment to another
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deploymentName'>
 /// deployment name
 /// </param>
 /// <param name='promoteDeploymentName'>
 /// deployment name
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 /// <param name='release'>
 /// Release to be promoted, only needs to provide optional fields, description,
 /// label, disabled, mandatory, rollout, targetBinaryVersion
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CodePushRelease> PromoteAsync(this ICodePushDeployments operations, string deploymentName, string promoteDeploymentName, string ownerName, string appName, CodePushReleasePromote release = default(CodePushReleasePromote), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.PromoteWithHttpMessagesAsync(deploymentName, promoteDeploymentName, ownerName, appName, release, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Creates a CodePush Deployment for the given app
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deployment'>
 /// Deployment to be created
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Deployment> CreateAsync(this ICodePushDeployments operations, Deployment deployment, string ownerName, string appName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(deployment, ownerName, appName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Deletes a CodePush Deployment for the given app
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deploymentName'>
 /// deployment name
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 public static void Delete(this ICodePushDeployments operations, string deploymentName, string ownerName, string appName)
 {
     operations.DeleteAsync(deploymentName, ownerName, appName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Promote one release (default latest one) from one deployment to another
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deploymentName'>
 /// deployment name
 /// </param>
 /// <param name='promoteDeploymentName'>
 /// deployment name
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 /// <param name='release'>
 /// Release to be promoted, only needs to provide optional fields, description,
 /// label, disabled, mandatory, rollout, targetBinaryVersion
 /// </param>
 public static CodePushRelease Promote(this ICodePushDeployments operations, string deploymentName, string promoteDeploymentName, string ownerName, string appName, CodePushReleasePromote release = default(CodePushReleasePromote))
 {
     return(operations.PromoteAsync(deploymentName, promoteDeploymentName, ownerName, appName, release).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Creates a CodePush Deployment for the given app
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deployment'>
 /// Deployment to be created
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 public static Deployment Create(this ICodePushDeployments operations, Deployment deployment, string ownerName, string appName)
 {
     return(operations.CreateAsync(deployment, ownerName, appName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets a list of CodePush deployments for the given app
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 public static IList <Deployment> List(this ICodePushDeployments operations, string ownerName, string appName)
 {
     return(operations.ListAsync(ownerName, appName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Modifies a CodePush Deployment for the given app
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deploymentName'>
 /// deployment name
 /// </param>
 /// <param name='deployment'>
 /// Deployment modification. All fields are optional and only provided fields
 /// will get updated.
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task UpdateAsync(this ICodePushDeployments operations, string deploymentName, DeploymentModification deployment, string ownerName, string appName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.UpdateWithHttpMessagesAsync(deploymentName, deployment, ownerName, appName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Modifies a CodePush Deployment for the given app
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deploymentName'>
 /// deployment name
 /// </param>
 /// <param name='deployment'>
 /// Deployment modification. All fields are optional and only provided fields
 /// will get updated.
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 public static void Update(this ICodePushDeployments operations, string deploymentName, DeploymentModification deployment, string ownerName, string appName)
 {
     operations.UpdateAsync(deploymentName, deployment, ownerName, appName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Gets a CodePush Deployment for the given app
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deploymentName'>
 /// deployment name
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 public static Deployment Get(this ICodePushDeployments operations, string deploymentName, string ownerName, string appName)
 {
     return(operations.GetAsync(deploymentName, ownerName, appName).GetAwaiter().GetResult());
 }