Пример #1
0
        private HmacKeysResource.GetRequest CreateGetHmacKeyRequest(string projectId, string accessId, GetHmacKeyOptions options)
        {
            GaxPreconditions.CheckNotNull(projectId, nameof(projectId));
            GaxPreconditions.CheckNotNull(accessId, nameof(accessId));
            var request = Service.Projects.HmacKeys.Get(projectId, accessId);

            request.ModifyRequest += _versionHeaderAction;
            options?.ModifyRequest(request);
            return(request);
        }
Пример #2
0
 /// <inheritdoc />
 public override Task <HmacKeyMetadata> GetHmacKeyAsync(string projectId, string accessId, GetHmacKeyOptions options = null, CancellationToken cancellationToken = default) =>
 CreateGetHmacKeyRequest(projectId, accessId, options).ExecuteAsync(cancellationToken);
Пример #3
0
 /// <summary>
 /// Asynchronously fetches metadata for the specified HMAC key.
 /// </summary>
 /// <param name="projectId">The project containing the HMAC key. Must not be null.</param>
 /// <param name="accessId">The ID of the HMAC key. Must not be null.</param>
 /// <param name="options">Additional options for the operation. May be null, in which case appropriate defaults will be used.</param>
 /// <param name="cancellationToken">The token to monitor for cancellation requests.</param>
 /// <returns>A task representing the asynchronous operation, with a result returning the HMAC key metadata.</returns>
 public virtual Task <HmacKeyMetadata> GetHmacKeyAsync(string projectId, string accessId, GetHmacKeyOptions options = null, CancellationToken cancellationToken = default) =>
 throw new NotImplementedException();
Пример #4
0
 /// <inheritdoc />
 public override HmacKeyMetadata GetHmacKey(string projectId, string accessId, GetHmacKeyOptions options = null) =>
 CreateGetHmacKeyRequest(projectId, accessId, options).Execute();
Пример #5
0
 /// <summary>
 /// Synchronously fetches metadata for the specified HMAC key.
 /// </summary>
 /// <param name="projectId">The project containing the HMAC key. Must not be null.</param>
 /// <param name="accessId">The ID of the HMAC key. Must not be null.</param>
 /// <param name="options">Additional options for the operation. May be null, in which case appropriate defaults will be used.</param>
 /// <returns>The HMAC key metadata</returns>
 public virtual HmacKeyMetadata GetHmacKey(string projectId, string accessId, GetHmacKeyOptions options = null) =>
 throw new NotImplementedException();