public virtual Response <KubeEnvironmentResource> Update(KubeEnvironmentPatch patch, CancellationToken cancellationToken = default)
        {
            Argument.AssertNotNull(patch, nameof(patch));

            using var scope = _kubeEnvironmentClientDiagnostics.CreateScope("KubeEnvironmentResource.Update");
            scope.Start();
            try
            {
                var response = _kubeEnvironmentRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken);
                return(Response.FromValue(new KubeEnvironmentResource(Client, response.Value), response.GetRawResponse()));
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }
        public virtual Response <KubeEnvironment> Update(KubeEnvironmentPatchResource kubeEnvironmentEnvelope, CancellationToken cancellationToken = default)
        {
            if (kubeEnvironmentEnvelope == null)
            {
                throw new ArgumentNullException(nameof(kubeEnvironmentEnvelope));
            }

            using var scope = _clientDiagnostics.CreateScope("KubeEnvironment.Update");
            scope.Start();
            try
            {
                var response = _kubeEnvironmentsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, kubeEnvironmentEnvelope, cancellationToken);
                return(Response.FromValue(new KubeEnvironment(this, response.Value), response.GetRawResponse()));
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }