/// <summary>Update the repository properties.</summary>
        /// <param name="value"> Repository properties to set. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        /// <exception cref="ArgumentNullException"> Thrown when <paramref name="value"/> is null. </exception>
        /// <exception cref="RequestFailedException">Thrown when a failure is returned by the Container Registry service.</exception>
        public virtual Response <RepositoryProperties> SetProperties(RepositoryProperties value, CancellationToken cancellationToken = default)
        {
            Argument.AssertNotNull(value, nameof(value));

            using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(ContainerRepository)}.{nameof(SetProperties)}");
            scope.Start();
            try
            {
                return(_restClient.SetProperties(Name, GetRepositoryWriteableProperties(value), cancellationToken));
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }
 private static RepositoryWriteableProperties GetRepositoryWriteableProperties(RepositoryProperties value)
 {
     return(new RepositoryWriteableProperties()
     {
         CanDelete = value.CanDelete,
         CanList = value.CanList,
         CanRead = value.CanRead,
         CanWrite = value.CanWrite,
         TeleportEnabled = value.TeleportEnabled
     });
 }