/// <summary>
 /// Asynchronously fetches a notification configuration.
 /// </summary>
 /// <param name="bucket">The bucket associated with the notification configuration. Must not be null.</param>
 /// <param name="notificationId">ID of the notification configuration to fetch. Must not be null.</param>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <param name="cancellationToken">The token to monitor for cancellation requests.</param>
 /// <returns>A task representing the asynchronous operation, with a result returning the
 /// <see cref="Notification"/> representation of the notification configuration.</returns>
 public virtual Task <Notification> GetNotificationAsync(string bucket, string notificationId, GetNotificationOptions options = null, CancellationToken cancellationToken = default) =>
 throw new NotImplementedException();
 /// <summary>
 /// Fetches a notification configuration.
 /// </summary>
 /// <param name="bucket">The bucket associated with the notification configuration. Must not be null.</param>
 /// <param name="notificationId">ID of the notification configuration to fetch. Must not be null.</param>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <returns>The <see cref="Notification"/> representation of the notification configuration.</returns>
 public virtual Notification GetNotification(string bucket, string notificationId, GetNotificationOptions options = null) => throw new NotImplementedException();
Ejemplo n.º 3
0
 /// <inheritdoc />
 public override Notification GetNotification(string bucket, string notificationId, GetNotificationOptions options = null) =>
 CreateGetNotificationRequest(bucket, notificationId, options).Execute();
Ejemplo n.º 4
0
 /// <inheritdoc />
 public override Task <Notification> GetNotificationAsync(string bucket, string notificationId, GetNotificationOptions options = null, CancellationToken cancellationToken = default) =>
 CreateGetNotificationRequest(bucket, notificationId, options).ExecuteAsync(cancellationToken);
Ejemplo n.º 5
0
        private NotificationsResource.GetRequest CreateGetNotificationRequest(string bucket, string notificationId, GetNotificationOptions options)
        {
            ValidateBucketName(bucket);
            GaxPreconditions.CheckNotNull(notificationId, nameof(notificationId));
            var request = Service.Notifications.Get(bucket, notificationId);

            request.ModifyRequest += _versionHeaderAction;
            options?.ModifyRequest(request);
            return(request);
        }