{@link + * BatchGet#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} + * must be called to initialize this instance immediately after invoking the constructor.
+ * + * @param parent Required. The parent resource shared by all sessions being retrieved. Format: + * `projects/{project}/locations/{location}`. The `parent` field in the + * `BatchGetSessionsRequest` message must match the `parent` of all `Session` resource names + * in `names`. + * @since 1.13 + */ + protected BatchGet(java.lang.String parent) { + super(DeviceRun.this, "GET", REST_PATH, null, com.google.api.services.devicerun.v1alpha.model.BatchGetSessionsResponse.class); + this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+$"); + } + } + + @Override + public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { + return super.executeUsingHead(); + } + + @Override + public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { + return super.buildHttpRequestUsingHead(); + } + + @Override + public BatchGet set$Xgafv(java.lang.String $Xgafv) { + return (BatchGet) super.set$Xgafv($Xgafv); + } + + @Override + public BatchGet setAccessToken(java.lang.String accessToken) { + return (BatchGet) super.setAccessToken(accessToken); + } + + @Override + public BatchGet setAlt(java.lang.String alt) { + return (BatchGet) super.setAlt(alt); + } + + @Override + public BatchGet setCallback(java.lang.String callback) { + return (BatchGet) super.setCallback(callback); + } + + @Override + public BatchGet setFields(java.lang.String fields) { + return (BatchGet) super.setFields(fields); + } + + @Override + public BatchGet setKey(java.lang.String key) { + return (BatchGet) super.setKey(key); + } + + @Override + public BatchGet setOauthToken(java.lang.String oauthToken) { + return (BatchGet) super.setOauthToken(oauthToken); + } + + @Override + public BatchGet setPrettyPrint(java.lang.Boolean prettyPrint) { + return (BatchGet) super.setPrettyPrint(prettyPrint); + } + + @Override + public BatchGet setQuotaUser(java.lang.String quotaUser) { + return (BatchGet) super.setQuotaUser(quotaUser); + } + + @Override + public BatchGet setUploadType(java.lang.String uploadType) { + return (BatchGet) super.setUploadType(uploadType); + } + + @Override + public BatchGet setUploadProtocol(java.lang.String uploadProtocol) { + return (BatchGet) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The parent resource shared by all sessions being retrieved. Format: + * `projects/{project}/locations/{location}`. The `parent` field in the + * `BatchGetSessionsRequest` message must match the `parent` of all `Session` resource + * names in `names`. + */ + @com.google.api.client.util.Key + private java.lang.String parent; + + /** Required. The parent resource shared by all sessions being retrieved. Format: + `projects/{project}/locations/{location}`. The `parent` field in the `BatchGetSessionsRequest` + message must match the `parent` of all `Session` resource names in `names`. + */ + public java.lang.String getParent() { + return parent; + } + + /** + * Required. The parent resource shared by all sessions being retrieved. Format: + * `projects/{project}/locations/{location}`. The `parent` field in the + * `BatchGetSessionsRequest` message must match the `parent` of all `Session` resource + * names in `names`. + */ + public BatchGet setParent(java.lang.String parent) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+$"); + } + this.parent = parent; + return this; + } + + /** + * Required. The names of the sessions to retrieve. A maximum of 500 sessions can be + * retrieved in a batch. Format: + * `projects/{project}/locations/{location}/sessions/{session}`. + */ + @com.google.api.client.util.Key + private java.util.ListThis is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Device Run API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *
+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class BatchGetSessionsResponse extends com.google.api.client.json.GenericJson { + + /** + * The requested sessions, in the same order as the `names` in the request. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List