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); }
/// <inheritdoc /> public override Task <HmacKeyMetadata> GetHmacKeyAsync(string projectId, string accessId, GetHmacKeyOptions options = null, CancellationToken cancellationToken = default) => CreateGetHmacKeyRequest(projectId, accessId, options).ExecuteAsync(cancellationToken);
/// <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();
/// <inheritdoc /> public override HmacKeyMetadata GetHmacKey(string projectId, string accessId, GetHmacKeyOptions options = null) => CreateGetHmacKeyRequest(projectId, accessId, options).Execute();
/// <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();