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
4 changes: 2 additions & 2 deletions clients/google-api-services-deepreview/v1/2.0.0/README.md
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-deepreview</artifactId>
<version>v1-rev20261020-2.9.2</version>
<version>v1-rev20261027-2.9.2</version>
</dependency>
</dependencies>
</project>
Expand All @@ -35,7 +35,7 @@ repositories {
mavenCentral()
}
dependencies {
implementation 'com.google.apis:google-api-services-deepreview:v1-rev20261020-2.9.2'
implementation 'com.google.apis:google-api-services-deepreview:v1-rev20261027-2.9.2'
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,143 @@ public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Estimates what a review of a document would cost on the caller's Gemini API key. The estimate
* comes from what past reviews with the same model and depth cost, adjusted to this document's size
* and repriced at the Gemini API's current list prices. It covers one review attempt that runs to
* completion, and doesn't include retries after errors.
*
* Create a request for the method "documents.estimateReviewCost".
*
* This request holds the parameters needed by the deepreview server. After setting any optional
* parameters, call the {@link EstimateReviewCost#execute()} method to invoke the remote operation.
*
* @param document Required. The document to review. Format: `documents/{document}`
* @param content the {@link com.google.api.services.deepreview.v1.model.EstimateReviewCostRequest}
* @return the request
*/
public EstimateReviewCost estimateReviewCost(java.lang.String document, com.google.api.services.deepreview.v1.model.EstimateReviewCostRequest content) throws java.io.IOException {
EstimateReviewCost result = new EstimateReviewCost(document, content);
initialize(result);
return result;
}

public class EstimateReviewCost extends DeepReviewRequest<com.google.api.services.deepreview.v1.model.EstimateReviewCostResponse> {

private static final String REST_PATH = "v1/{+document}:estimateReviewCost";

private final java.util.regex.Pattern DOCUMENT_PATTERN =
java.util.regex.Pattern.compile("^documents/[^/]+$");

/**
* Estimates what a review of a document would cost on the caller's Gemini API key. The estimate
* comes from what past reviews with the same model and depth cost, adjusted to this document's
* size and repriced at the Gemini API's current list prices. It covers one review attempt that
* runs to completion, and doesn't include retries after errors.
*
* Create a request for the method "documents.estimateReviewCost".
*
* This request holds the parameters needed by the the deepreview server. After setting any
* optional parameters, call the {@link EstimateReviewCost#execute()} method to invoke the remote
* operation. <p> {@link EstimateReviewCost#initialize(com.google.api.client.googleapis.services.A
* bstractGoogleClientRequest)} must be called to initialize this instance immediately after
* invoking the constructor. </p>
*
* @param document Required. The document to review. Format: `documents/{document}`
* @param content the {@link com.google.api.services.deepreview.v1.model.EstimateReviewCostRequest}
* @since 1.13
*/
protected EstimateReviewCost(java.lang.String document, com.google.api.services.deepreview.v1.model.EstimateReviewCostRequest content) {
super(DeepReview.this, "POST", REST_PATH, content, com.google.api.services.deepreview.v1.model.EstimateReviewCostResponse.class);
this.document = com.google.api.client.util.Preconditions.checkNotNull(document, "Required parameter document must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(DOCUMENT_PATTERN.matcher(document).matches(),
"Parameter document must conform to the pattern " +
"^documents/[^/]+$");
}
}

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

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

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

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

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

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

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

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

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

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

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

/** Required. The document to review. Format: `documents/{document}` */
@com.google.api.client.util.Key
private java.lang.String document;

/** Required. The document to review. Format: `documents/{document}`
*/
public java.lang.String getDocument() {
return document;
}

/** Required. The document to review. Format: `documents/{document}` */
public EstimateReviewCost setDocument(java.lang.String document) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(DOCUMENT_PATTERN.matcher(document).matches(),
"Parameter document must conform to the pattern " +
"^documents/[^/]+$");
}
this.document = document;
return this;
}

@Override
public EstimateReviewCost set(String parameterName, Object value) {
return (EstimateReviewCost) super.set(parameterName, value);
}
}
/**
* Retrieves document metadata and review history.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
*/
public class DeepReviewScopes {

/** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
public static final String CLOUD_PLATFORM = "https://www.googleapis.com/auth/cloud-platform";

/** See, edit, create, and delete only the specific Google Drive files you use with this app. */
public static final String DRIVE_FILE = "https://www.googleapis.com/auth/drive.file";

Expand All @@ -33,6 +36,7 @@ public class DeepReviewScopes {
*/
public static java.util.Set<String> all() {
java.util.Set<String> set = new java.util.HashSet<String>();
set.add(CLOUD_PLATFORM);
set.add(DRIVE_FILE);
return java.util.Collections.unmodifiableSet(set);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* 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.deepreview.v1.model;

/**
* Request message for estimating what a review would cost.
*
* <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 Deep Review 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 EstimateReviewCostRequest extends com.google.api.client.json.GenericJson {

/**
* Required. The review to estimate, as it would be passed to `CreateReview`. Only its
* `run_config` is read, and `run_config.gemini_api_key` is ignored.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private Review review;

/**
* Required. The review to estimate, as it would be passed to `CreateReview`. Only its
* `run_config` is read, and `run_config.gemini_api_key` is ignored.
* @return value or {@code null} for none
*/
public Review getReview() {
return review;
}

/**
* Required. The review to estimate, as it would be passed to `CreateReview`. Only its
* `run_config` is read, and `run_config.gemini_api_key` is ignored.
* @param review review or {@code null} for none
*/
public EstimateReviewCostRequest setReview(Review review) {
this.review = review;
return this;
}

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

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

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
/*
* 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.deepreview.v1.model;

/**
* Response message for estimating what a review would cost. When the cost can't be estimated, for
* example because too few past reviews used the same model and depth, the costs are unset and
* `past_review_count` is 0.
*
* <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 Deep Review 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 EstimateReviewCostResponse extends com.google.api.client.json.GenericJson {

/**
* The 95th percentile of what comparable past reviews would cost for this document.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private Money highCost;

/**
* The 20th percentile of what comparable past reviews would cost for this document.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private Money lowCost;

/**
* The median of what comparable past reviews would cost for this document.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private Money medianCost;

/**
* Number of past reviews the estimate is based on.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Integer pastReviewCount;

/**
* The 95th percentile of what comparable past reviews would cost for this document.
* @return value or {@code null} for none
*/
public Money getHighCost() {
return highCost;
}

/**
* The 95th percentile of what comparable past reviews would cost for this document.
* @param highCost highCost or {@code null} for none
*/
public EstimateReviewCostResponse setHighCost(Money highCost) {
this.highCost = highCost;
return this;
}

/**
* The 20th percentile of what comparable past reviews would cost for this document.
* @return value or {@code null} for none
*/
public Money getLowCost() {
return lowCost;
}

/**
* The 20th percentile of what comparable past reviews would cost for this document.
* @param lowCost lowCost or {@code null} for none
*/
public EstimateReviewCostResponse setLowCost(Money lowCost) {
this.lowCost = lowCost;
return this;
}

/**
* The median of what comparable past reviews would cost for this document.
* @return value or {@code null} for none
*/
public Money getMedianCost() {
return medianCost;
}

/**
* The median of what comparable past reviews would cost for this document.
* @param medianCost medianCost or {@code null} for none
*/
public EstimateReviewCostResponse setMedianCost(Money medianCost) {
this.medianCost = medianCost;
return this;
}

/**
* Number of past reviews the estimate is based on.
* @return value or {@code null} for none
*/
public java.lang.Integer getPastReviewCount() {
return pastReviewCount;
}

/**
* Number of past reviews the estimate is based on.
* @param pastReviewCount pastReviewCount or {@code null} for none
*/
public EstimateReviewCostResponse setPastReviewCount(java.lang.Integer pastReviewCount) {
this.pastReviewCount = pastReviewCount;
return this;
}

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

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

}
Loading
Loading