public ValueTask <Namespace> DeleteNamespace(string namespaceName, CancellationToken cancellationToken = default) { if (string.IsNullOrWhiteSpace(namespaceName)) { throw new ArgumentNullException(nameof(namespaceName)); } return(this.DeleteAsync <Namespace>(NamespaceUrls.ObjectUrl(namespaceName), immediateDeleteOptions, cancellationToken: cancellationToken)); }
public Task <Namespace> GetNamespace(string namespaceName, CancellationToken cancellationToken = default) { if (string.IsNullOrWhiteSpace(namespaceName)) { throw new ArgumentNullException(nameof(namespaceName)); } return(this.GetAsync <Namespace>(NamespaceUrls.ObjectUrl(namespaceName), cancellationToken: cancellationToken)); }
public ValueTask <Namespace> ReplaceNamespace(Namespace @namespace, CancellationToken cancellationToken = default) { if (@namespace == null) { throw new ArgumentNullException(nameof(@namespace)); } if (@namespace.Metadata == null || string.IsNullOrWhiteSpace(@namespace.Metadata.Name)) { throw new ArgumentNullException(nameof(@namespace.Metadata.Name), "Metadata.Name is required."); } return(this.PutAsync <Namespace, Namespace>(NamespaceUrls.ObjectUrl(@namespace.Metadata.Name), payload: @namespace, cancellationToken: cancellationToken)); }