Package com.google.genai.gaos
Class Credentials
java.lang.Object
com.google.genai.gaos.Credentials
-
Method Summary
Modifier and TypeMethodDescriptionasync()Switches to the async SDK.create()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.update()Updates a credential.update(String id, CredentialUpdate body) Updates a credential.Updates a credential.
-
Method Details
-
async
Switches to the async SDK.- Returns:
- The async SDK
-
list
Lists credentials for a project.- Returns:
- The call builder
-
listDirect
Lists credentials for a project.- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
list
public 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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
create
Creates a credential.- Returns:
- The call builder
-
create
Creates a credential.- Parameters:
body- Represents the fields of a Credential provided on creation.- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
create
public 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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
delete
Deletes a credential. Fails if referenced by active triggers.- Returns:
- The 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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
delete
public 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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
get
Gets metadata of a single credential (no secret fields).- Returns:
- The 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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
get
public 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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
update
Updates a credential.- Returns:
- The call builder
-
update
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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
update
public 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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-