Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file:
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-agentidentitycredentials</artifactId>
<version>v1alpha-rev20260813-2.0.0</version>
<version>v1alpha-rev20260912-2.0.0</version>
</dependency>
</dependencies>
</project>
Expand All @@ -35,7 +35,7 @@ repositories {
mavenCentral()
}
dependencies {
implementation 'com.google.apis:google-api-services-agentidentitycredentials:v1alpha-rev20260813-2.0.0'
implementation 'com.google.apis:google-api-services-agentidentitycredentials:v1alpha-rev20260912-2.0.0'
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,149 @@ public Credentials credentials() {
*/
public class Credentials {

/**
* Swaps an input credential for a target credential as per the rules and provider defined in the
* given auth provider.
*
* Create a request for the method "credentials.exchange".
*
* This request holds the parameters needed by the agentidentitycredentials server. After setting
* any optional parameters, call the {@link Exchange#execute()} method to invoke the remote
* operation.
*
* @param authProvider Required. The resource name of the auth provider. Format:
* `projects/{project}/locations/{location}/authProviders/{auth_provider}`
* @param content the {@link com.google.api.services.agentidentitycredentials.v1alpha.model.GoogleCloudAgentidentitycredentialsV1alphaExchangeCredentialsRequest}
* @return the request
*/
public Exchange exchange(java.lang.String authProvider, com.google.api.services.agentidentitycredentials.v1alpha.model.GoogleCloudAgentidentitycredentialsV1alphaExchangeCredentialsRequest content) throws java.io.IOException {
Exchange result = new Exchange(authProvider, content);
initialize(result);
return result;
}

public class Exchange extends AgentIdentityCredentialsRequest<com.google.api.services.agentidentitycredentials.v1alpha.model.GoogleCloudAgentidentitycredentialsV1alphaExchangeCredentialsResponse> {

private static final String REST_PATH = "v1alpha/{+authProvider}/credentials:exchange";

private final java.util.regex.Pattern AUTH_PROVIDER_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/authProviders/[^/]+$");

/**
* Swaps an input credential for a target credential as per the rules and provider defined in the
* given auth provider.
*
* Create a request for the method "credentials.exchange".
*
* This request holds the parameters needed by the the agentidentitycredentials server. After
* setting any optional parameters, call the {@link Exchange#execute()} method to invoke the
* remote operation. <p> {@link
* Exchange#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param authProvider Required. The resource name of the auth provider. Format:
* `projects/{project}/locations/{location}/authProviders/{auth_provider}`
* @param content the {@link com.google.api.services.agentidentitycredentials.v1alpha.model.GoogleCloudAgentidentitycredentialsV1alphaExchangeCredentialsRequest}
* @since 1.13
*/
protected Exchange(java.lang.String authProvider, com.google.api.services.agentidentitycredentials.v1alpha.model.GoogleCloudAgentidentitycredentialsV1alphaExchangeCredentialsRequest content) {
super(AgentIdentityCredentials.this, "POST", REST_PATH, content, com.google.api.services.agentidentitycredentials.v1alpha.model.GoogleCloudAgentidentitycredentialsV1alphaExchangeCredentialsResponse.class);
this.authProvider = com.google.api.client.util.Preconditions.checkNotNull(authProvider, "Required parameter authProvider must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(AUTH_PROVIDER_PATTERN.matcher(authProvider).matches(),
"Parameter authProvider must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/authProviders/[^/]+$");
}
}

@Override
public Exchange set$Xgafv(java.lang.String $Xgafv) {
return (Exchange) super.set$Xgafv($Xgafv);
}

@Override
public Exchange setAccessToken(java.lang.String accessToken) {
return (Exchange) super.setAccessToken(accessToken);
}

@Override
public Exchange setAlt(java.lang.String alt) {
return (Exchange) super.setAlt(alt);
}

@Override
public Exchange setCallback(java.lang.String callback) {
return (Exchange) super.setCallback(callback);
}

@Override
public Exchange setFields(java.lang.String fields) {
return (Exchange) super.setFields(fields);
}

@Override
public Exchange setKey(java.lang.String key) {
return (Exchange) super.setKey(key);
}

@Override
public Exchange setOauthToken(java.lang.String oauthToken) {
return (Exchange) super.setOauthToken(oauthToken);
}

@Override
public Exchange setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Exchange) super.setPrettyPrint(prettyPrint);
}

@Override
public Exchange setQuotaUser(java.lang.String quotaUser) {
return (Exchange) super.setQuotaUser(quotaUser);
}

@Override
public Exchange setUploadType(java.lang.String uploadType) {
return (Exchange) super.setUploadType(uploadType);
}

@Override
public Exchange setUploadProtocol(java.lang.String uploadProtocol) {
return (Exchange) super.setUploadProtocol(uploadProtocol);
}

/**
* Required. The resource name of the auth provider. Format:
* `projects/{project}/locations/{location}/authProviders/{auth_provider}`
*/
@com.google.api.client.util.Key
private java.lang.String authProvider;

/** Required. The resource name of the auth provider. Format:
`projects/{project}/locations/{location}/authProviders/{auth_provider}`
*/
public java.lang.String getAuthProvider() {
return authProvider;
}

/**
* Required. The resource name of the auth provider. Format:
* `projects/{project}/locations/{location}/authProviders/{auth_provider}`
*/
public Exchange setAuthProvider(java.lang.String authProvider) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(AUTH_PROVIDER_PATTERN.matcher(authProvider).matches(),
"Parameter authProvider must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/authProviders/[^/]+$");
}
this.authProvider = authProvider;
return this;
}

@Override
public Exchange set(String parameterName, Object value) {
return (Exchange) super.set(parameterName, value);
}
}
/**
* Finalizes the credentials after a successful consent flow.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/

package com.google.api.services.agentidentitycredentials.v1alpha.model;

/**
* Request message for `ExchangeCredentials`.
*
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Agent Identity Credentials API. For a detailed
* explanation see:
* <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
* </p>
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class GoogleCloudAgentidentitycredentialsV1alphaExchangeCredentialsRequest extends com.google.api.client.json.GenericJson {

/**
* Optional. The desired downstream OAuth scopes to request for the exchanged token.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List<java.lang.String> scopes;

/**
* Required. The incoming identity or assertion token to be exchanged.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String sourceCredential;

/**
* Optional. The desired target token type to be returned from the exchange. If unspecified,
* defaults to the token type configured on the AuthProvider.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String targetTokenType;

/**
* Optional. The token binding parameters to be applied to downstream tokens and embedded into the
* ID-JAG assertion.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private GoogleCloudAgentidentitycredentialsV1alphaTokenBinding tokenBinding;

/**
* Optional. The desired downstream OAuth scopes to request for the exchanged token.
* @return value or {@code null} for none
*/
public java.util.List<java.lang.String> getScopes() {
return scopes;
}

/**
* Optional. The desired downstream OAuth scopes to request for the exchanged token.
* @param scopes scopes or {@code null} for none
*/
public GoogleCloudAgentidentitycredentialsV1alphaExchangeCredentialsRequest setScopes(java.util.List<java.lang.String> scopes) {
this.scopes = scopes;
return this;
}

/**
* Required. The incoming identity or assertion token to be exchanged.
* @return value or {@code null} for none
*/
public java.lang.String getSourceCredential() {
return sourceCredential;
}

/**
* Required. The incoming identity or assertion token to be exchanged.
* @param sourceCredential sourceCredential or {@code null} for none
*/
public GoogleCloudAgentidentitycredentialsV1alphaExchangeCredentialsRequest setSourceCredential(java.lang.String sourceCredential) {
this.sourceCredential = sourceCredential;
return this;
}

/**
* Optional. The desired target token type to be returned from the exchange. If unspecified,
* defaults to the token type configured on the AuthProvider.
* @return value or {@code null} for none
*/
public java.lang.String getTargetTokenType() {
return targetTokenType;
}

/**
* Optional. The desired target token type to be returned from the exchange. If unspecified,
* defaults to the token type configured on the AuthProvider.
* @param targetTokenType targetTokenType or {@code null} for none
*/
public GoogleCloudAgentidentitycredentialsV1alphaExchangeCredentialsRequest setTargetTokenType(java.lang.String targetTokenType) {
this.targetTokenType = targetTokenType;
return this;
}

/**
* Optional. The token binding parameters to be applied to downstream tokens and embedded into the
* ID-JAG assertion.
* @return value or {@code null} for none
*/
public GoogleCloudAgentidentitycredentialsV1alphaTokenBinding getTokenBinding() {
return tokenBinding;
}

/**
* Optional. The token binding parameters to be applied to downstream tokens and embedded into the
* ID-JAG assertion.
* @param tokenBinding tokenBinding or {@code null} for none
*/
public GoogleCloudAgentidentitycredentialsV1alphaExchangeCredentialsRequest setTokenBinding(GoogleCloudAgentidentitycredentialsV1alphaTokenBinding tokenBinding) {
this.tokenBinding = tokenBinding;
return this;
}

@Override
public GoogleCloudAgentidentitycredentialsV1alphaExchangeCredentialsRequest set(String fieldName, Object value) {
return (GoogleCloudAgentidentitycredentialsV1alphaExchangeCredentialsRequest) super.set(fieldName, value);
}

@Override
public GoogleCloudAgentidentitycredentialsV1alphaExchangeCredentialsRequest clone() {
return (GoogleCloudAgentidentitycredentialsV1alphaExchangeCredentialsRequest) super.clone();
}

}
Loading
Loading