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 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.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.- Returns:
- The call builder
-
listDirect
Lists credentials.- 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.- Parameters:
apiVersion- API version for request routing.pageSize- Optional. Maximum number of credentials to return.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 new credential.- Returns:
- The call builder
-
create
Creates a new 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 new credential.- Parameters:
apiVersion- API version for request routing.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.- Returns:
- The 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:
- 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.- 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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
get
Gets a credential by ID.- Returns:
- The 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:
- 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 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:
- 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- 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:
- 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- 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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-