public virtual ExpressRouteGatewayUpdateTagsOperation UpdateTags(TagsObject expressRouteGatewayParameters, bool waitForCompletion = true, CancellationToken cancellationToken = default)
        {
            if (expressRouteGatewayParameters == null)
            {
                throw new ArgumentNullException(nameof(expressRouteGatewayParameters));
            }

            using var scope = _clientDiagnostics.CreateScope("ExpressRouteGateway.UpdateTags");
            scope.Start();
            try
            {
                var response  = _restClient.UpdateTags(Id.ResourceGroupName, Id.Name, expressRouteGatewayParameters, cancellationToken);
                var operation = new ExpressRouteGatewayUpdateTagsOperation(this, _clientDiagnostics, Pipeline, _restClient.CreateUpdateTagsRequest(Id.ResourceGroupName, Id.Name, expressRouteGatewayParameters).Request, response);
                if (waitForCompletion)
                {
                    operation.WaitForCompletion(cancellationToken);
                }
                return(operation);
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }
        public virtual ArmOperation <ExpressRouteGatewayResource> Update(WaitUntil waitUntil, TagsObject expressRouteGatewayParameters, CancellationToken cancellationToken = default)
        {
            Argument.AssertNotNull(expressRouteGatewayParameters, nameof(expressRouteGatewayParameters));

            using var scope = _expressRouteGatewayClientDiagnostics.CreateScope("ExpressRouteGatewayResource.Update");
            scope.Start();
            try
            {
                var response  = _expressRouteGatewayRestClient.UpdateTags(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expressRouteGatewayParameters, cancellationToken);
                var operation = new NetworkArmOperation <ExpressRouteGatewayResource>(new ExpressRouteGatewayOperationSource(Client), _expressRouteGatewayClientDiagnostics, Pipeline, _expressRouteGatewayRestClient.CreateUpdateTagsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expressRouteGatewayParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation);
                if (waitUntil == WaitUntil.Completed)
                {
                    operation.WaitForCompletion(cancellationToken);
                }
                return(operation);
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }