///GENMHASH:7AC73E1BD7706C421FC8A2630503FE26:7DA5B1DD2B65AB8ED9049EFDA7288A64
 protected override IDdosProtectionPlan WrapModel(DdosProtectionPlanInner inner)
 {
     if (inner == null)
     {
         return(null);
     }
     return(new DdosProtectionPlanImpl(inner.Name, inner, this.Manager));
 }
Пример #2
0
 /// <summary>
 /// Creates or updates a DDoS protection plan.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='ddosProtectionPlanName'>
 /// The name of the DDoS protection plan.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the create or update operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <DdosProtectionPlanInner> CreateOrUpdateAsync(this IDdosProtectionPlansOperations operations, string resourceGroupName, string ddosProtectionPlanName, DdosProtectionPlanInner parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, ddosProtectionPlanName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
        ///GENMHASH:2FE8C4C2D5EAD7E37787838DE0B47D92:3DCC69EC8D38EE3DACD3F2692DFE39AD
        protected override DdosProtectionPlanImpl WrapModel(string name)
        {
            DdosProtectionPlanInner inner = new DdosProtectionPlanInner();

            return(new DdosProtectionPlanImpl(name, inner, Manager));
        }