Class SecretsPager
- java.lang.Object
-
- com.ibm.cloud.secrets_manager_sdk.secrets_manager.v2.model.SecretsPager
-
public class SecretsPager extends Object
SecretsPager can be used to simplify the use of the "listSecrets" method.
-
-
Constructor Summary
Constructors Constructor Description SecretsPager(SecretsManager client, ListSecretsOptions options)Constructs a new SecretsPager instance with the specified client and options model instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<SecretMetadata>getAll()Returns all results by invoking getNext() repeatedly until all pages of results have been retrieved.List<SecretMetadata>getNext()Returns the next page of results.booleanhasNext()Returns true if there are more results to be retrieved.
-
-
-
Constructor Detail
-
SecretsPager
public SecretsPager(SecretsManager client, ListSecretsOptions options)
Constructs a new SecretsPager instance with the specified client and options model instance.- Parameters:
client- the SecretsManager instance to be used to invoke the "listSecrets" methodoptions- the ListSecretsOptions instance to be used to invoke the "listSecrets" method
-
-
Method Detail
-
hasNext
public boolean hasNext()
Returns true if there are more results to be retrieved.- Returns:
- boolean
-
getNext
public List<SecretMetadata> getNext()
Returns the next page of results.- Returns:
- a List<SecretMetadata> that contains the next page of results
-
getAll
public List<SecretMetadata> getAll()
Returns all results by invoking getNext() repeatedly until all pages of results have been retrieved.- Returns:
- a List<SecretMetadata> containing all results returned by the "listSecrets" method
-
-