Package com.google.genai.gaos
Class AsyncCredentials
java.lang.Object
com.google.genai.gaos.AsyncCredentials
-
Method Summary
Modifier and TypeMethodDescriptioncreate()Creates a credential.create(CredentialCreateParams body) Creates a credential.create(String apiVersion, CredentialCreateParams body, Options options) Creates a credential.delete()Deletes a credential.Deletes a credential.Deletes a credential.get()Gets metadata of a single credential (no secret fields).Gets metadata of a single credential (no secret fields).Gets metadata of a single credential (no secret fields).list()Lists credentials for a project.Lists credentials for a project.Lists credentials for a project.sync()Switches to the sync SDK.update()Updates a credential.update(String id, CredentialUpdate body) Updates a credential.Updates a credential.
-
Method Details
-
sync
Switches to the sync SDK.- Returns:
- The sync SDK
-
list
Lists credentials for a project.- Returns:
- The async call builder
-
listDirect
Lists credentials for a project.- Returns:
CompletableFuture<ListCredentialsResponse>- The async response
-
list
public CompletableFuture<ListCredentialsResponse> list(@Nullable String apiVersion, @Nullable Integer pageSize, @Nullable String pageToken, @Nullable Options options) Lists credentials for a project.- Parameters:
apiVersion- Which version of the API to use.pageSize- Optional. Maximum number of credentials to return. If unspecified, defaults to 50. Maximum is 1000.pageToken- Optional. Pagination token.options- additional options- Returns:
CompletableFuture<ListCredentialsResponse>- The async response
-
create
Creates a credential.- Returns:
- The async call builder
-
create
Creates a credential.- Parameters:
body- Represents the fields of a Credential provided on creation.- Returns:
CompletableFuture<CreateCredentialResponse>- The async response
-
create
public CompletableFuture<CreateCredentialResponse> create(@Nullable String apiVersion, @Nonnull CredentialCreateParams body, @Nullable Options options) Creates a credential.- Parameters:
apiVersion- Which version of the API to use.body- Represents the fields of a Credential provided on creation.options- additional options- Returns:
CompletableFuture<CreateCredentialResponse>- The async response
-
delete
Deletes a credential. Fails if referenced by active triggers.- Returns:
- The async call builder
-
delete
Deletes a credential. Fails if referenced by active triggers.- Parameters:
id- Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.- Returns:
CompletableFuture<DeleteCredentialResponse>- The async response
-
delete
public CompletableFuture<DeleteCredentialResponse> delete(@Nullable String apiVersion, @Nonnull String id, @Nullable Options options) Deletes a credential. Fails if referenced by active triggers.- Parameters:
apiVersion- Which version of the API to use.id- Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.options- additional options- Returns:
CompletableFuture<DeleteCredentialResponse>- The async response
-
get
Gets metadata of a single credential (no secret fields).- Returns:
- The async call builder
-
get
Gets metadata of a single credential (no secret fields).- Parameters:
id- Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.- Returns:
CompletableFuture<GetCredentialResponse>- The async response
-
get
public CompletableFuture<GetCredentialResponse> get(@Nullable String apiVersion, @Nonnull String id, @Nullable Options options) Gets metadata of a single credential (no secret fields).- Parameters:
apiVersion- Which version of the API to use.id- Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.options- additional options- Returns:
CompletableFuture<GetCredentialResponse>- The async response
-
update
Updates a credential.- Returns:
- The async call builder
-
update
public CompletableFuture<UpdateCredentialResponse> update(@Nonnull String id, @Nonnull CredentialUpdate body) Updates a credential.- Parameters:
id- Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.body- Represents the fields of a Credential that can be updated.- Returns:
CompletableFuture<UpdateCredentialResponse>- The async response
-
update
public CompletableFuture<UpdateCredentialResponse> update(@Nullable String apiVersion, @Nonnull String id, @Nullable String updateMask, @Nonnull CredentialUpdate body, @Nullable Options options) Updates a credential.- Parameters:
apiVersion- Which version of the API to use.id- Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.updateMask- Optional. The list of fields to update.body- Represents the fields of a Credential that can be updated.options- additional options- Returns:
CompletableFuture<UpdateCredentialResponse>- The async response
-