Package com.google.genai.gaos
Class AsyncCredentials
java.lang.Object
com.google.genai.gaos.AsyncCredentials
-
Method Summary
Modifier and TypeMethodDescriptioncreate()Creates a new credential.create(CredentialCreateParams body) Creates a new credential.create(String apiVersion, CredentialCreateParams body, Options options) Creates a new credential.delete()Deletes a credential.Deletes a credential.Deletes a credential.get()Gets a credential by ID.Gets a credential by ID.Gets a credential by ID.list()Lists credentials.Lists credentials.Lists credentials.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.- Returns:
- The async call builder
-
listDirect
Lists credentials.- 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.- Parameters:
apiVersion- API version for request routing.pageSize- Optional. Maximum number of credentials to return.pageToken- Optional. Pagination token.options- additional options- Returns:
CompletableFuture<ListCredentialsResponse>- The async response
-
create
Creates a new credential.- Returns:
- The async call builder
-
create
Creates a new 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 new credential.- Parameters:
apiVersion- API version for request routing.body- Represents the fields of a Credential provided on creation.options- additional options- Returns:
CompletableFuture<CreateCredentialResponse>- The async response
-
delete
Deletes a credential.- Returns:
- The async call builder
-
delete
Deletes a credential.- Parameters:
id- Required. 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.- Parameters:
apiVersion- API version for request routing.id- Required. 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 a credential by ID.- Returns:
- The async call builder
-
get
Gets a credential by ID.- Parameters:
id- Required. 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 a credential by ID.- Parameters:
apiVersion- API version for request routing.id- Required. 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- Required. 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- API version for request routing.id- Required. 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
-