private HmacKeysResource.ListRequest CreateListHmacKeysRequest(string projectId, string serviceAccountEmail, ListHmacKeysOptions options) { var request = Service.Projects.HmacKeys.List(projectId); request.ServiceAccountEmail = serviceAccountEmail; // Note: may be null request.ModifyRequest += _versionHeaderAction; options?.ModifyRequest(request); return(request); }
/// <inheritdoc /> public override PagedAsyncEnumerable <HmacKeysMetadata, HmacKeyMetadata> ListHmacKeysAsync(string projectId, string serviceAccountEmail = null, ListHmacKeysOptions options = null) { GaxPreconditions.CheckNotNull(projectId, nameof(projectId)); return(new RestPagedAsyncEnumerable <HmacKeysResource.ListRequest, HmacKeysMetadata, HmacKeyMetadata>( () => CreateListHmacKeysRequest(projectId, serviceAccountEmail, options), HmacKeyPageManager.Instance)); }
/// <summary> /// Lists the HMAC keys in a given project, asynchronously and lazily, optionally filtering by service account email address. /// </summary> /// <remarks> /// This method fetches the buckets lazily, making requests to the underlying service /// for a page of results at a time, as required. No network requests are made until the returned sequence is enumerated. /// This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared /// for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network /// or service failures can cause exceptions even after the first results have been returned. /// </remarks> /// <param name="projectId">The project containing the HMAC keys. Must not be null.</param> /// <param name="serviceAccountEmail">The service account email address to list keys for. May be null, in which case all HMAC keys associated with the project are returned.</param> /// <param name="options">Additional options for the operation. May be null, in which case appropriate defaults will be used.</param> /// <returns>An asynchronous sequence of HMAC keys within the project.</returns> public virtual PagedAsyncEnumerable <HmacKeysMetadata, HmacKeyMetadata> ListHmacKeysAsync(string projectId, string serviceAccountEmail = null, ListHmacKeysOptions options = null) => throw new NotImplementedException();