com.google.api.services.youtubereporting.YouTubeReporting Maven / Gradle / Ivy
/*
* Copyright 2010 Google Inc.
*
* 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/google/apis-client-generator/
* (build: 2017-09-26 19:19:48 UTC)
* on 2017-10-18 at 10:15:35 UTC
* Modify at your own risk.
*/
package com.google.api.services.youtubereporting;
/**
* Service definition for YouTubeReporting (v1).
*
*
* Schedules reporting jobs containing your YouTube Analytics data and downloads the resulting bulk data reports in the form of CSV files.
*
*
*
* For more information about this service, see the
* API Documentation
*
*
*
* This service uses {@link YouTubeReportingRequestInitializer} to initialize global parameters via its
* {@link Builder}.
*
*
* @since 1.3
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public class YouTubeReporting extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient {
// Note: Leave this static initializer at the top of the file.
static {
com.google.api.client.util.Preconditions.checkState(
com.google.api.client.googleapis.GoogleUtils.MAJOR_VERSION == 1 &&
com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION >= 15,
"You are currently running with version %s of google-api-client. " +
"You need at least version 1.15 of google-api-client to run version " +
"1.21.0 of the YouTube Reporting API library.", com.google.api.client.googleapis.GoogleUtils.VERSION);
}
/**
* The default encoded root URL of the service. This is determined when the library is generated
* and normally should not be changed.
*
* @since 1.7
*/
public static final String DEFAULT_ROOT_URL = "https://youtubereporting.googleapis.com/";
/**
* The default encoded service path of the service. This is determined when the library is
* generated and normally should not be changed.
*
* @since 1.7
*/
public static final String DEFAULT_SERVICE_PATH = "";
/**
* The default encoded base URL of the service. This is determined when the library is generated
* and normally should not be changed.
*/
public static final String DEFAULT_BASE_URL = DEFAULT_ROOT_URL + DEFAULT_SERVICE_PATH;
/**
* Constructor.
*
*
* Use {@link Builder} if you need to specify any of the optional parameters.
*
*
* @param transport HTTP transport, which should normally be:
*
* - Google App Engine:
* {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}
* - Android: {@code newCompatibleTransport} from
* {@code com.google.api.client.extensions.android.http.AndroidHttp}
* - Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()}
*
*
* @param jsonFactory JSON factory, which may be:
*
* - Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}
* - Google GSON: {@code com.google.api.client.json.gson.GsonFactory}
* - Android Honeycomb or higher:
* {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}
*
* @param httpRequestInitializer HTTP request initializer or {@code null} for none
* @since 1.7
*/
public YouTubeReporting(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory,
com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
this(new Builder(transport, jsonFactory, httpRequestInitializer));
}
/**
* @param builder builder
*/
YouTubeReporting(Builder builder) {
super(builder);
}
@Override
protected void initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest> httpClientRequest) throws java.io.IOException {
super.initialize(httpClientRequest);
}
/**
* An accessor for creating requests from the Jobs collection.
*
* The typical use is:
*
* {@code YouTubeReporting youtubereporting = new YouTubeReporting(...);}
* {@code YouTubeReporting.Jobs.List request = youtubereporting.jobs().list(parameters ...)}
*
*
* @return the resource collection
*/
public Jobs jobs() {
return new Jobs();
}
/**
* The "jobs" collection of methods.
*/
public class Jobs {
/**
* Creates a job and returns it.
*
* Create a request for the method "jobs.create".
*
* This request holds the parameters needed by the youtubereporting server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param content the {@link com.google.api.services.youtubereporting.model.Job}
* @return the request
*/
public Create create(com.google.api.services.youtubereporting.model.Job content) throws java.io.IOException {
Create result = new Create(content);
initialize(result);
return result;
}
public class Create extends YouTubeReportingRequest {
private static final String REST_PATH = "v1/jobs";
/**
* Creates a job and returns it.
*
* Create a request for the method "jobs.create".
*
* This request holds the parameters needed by the the youtubereporting server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
* {@link
* Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param content the {@link com.google.api.services.youtubereporting.model.Job}
* @since 1.13
*/
protected Create(com.google.api.services.youtubereporting.model.Job content) {
super(YouTubeReporting.this, "POST", REST_PATH, content, com.google.api.services.youtubereporting.model.Job.class);
}
@Override
public Create set$Xgafv(java.lang.String $Xgafv) {
return (Create) super.set$Xgafv($Xgafv);
}
@Override
public Create setAccessToken(java.lang.String accessToken) {
return (Create) super.setAccessToken(accessToken);
}
@Override
public Create setAlt(java.lang.String alt) {
return (Create) super.setAlt(alt);
}
@Override
public Create setBearerToken(java.lang.String bearerToken) {
return (Create) super.setBearerToken(bearerToken);
}
@Override
public Create setCallback(java.lang.String callback) {
return (Create) super.setCallback(callback);
}
@Override
public Create setFields(java.lang.String fields) {
return (Create) super.setFields(fields);
}
@Override
public Create setKey(java.lang.String key) {
return (Create) super.setKey(key);
}
@Override
public Create setOauthToken(java.lang.String oauthToken) {
return (Create) super.setOauthToken(oauthToken);
}
@Override
public Create setPp(java.lang.Boolean pp) {
return (Create) super.setPp(pp);
}
@Override
public Create setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Create) super.setPrettyPrint(prettyPrint);
}
@Override
public Create setQuotaUser(java.lang.String quotaUser) {
return (Create) super.setQuotaUser(quotaUser);
}
@Override
public Create setUploadType(java.lang.String uploadType) {
return (Create) super.setUploadType(uploadType);
}
@Override
public Create setUploadProtocol(java.lang.String uploadProtocol) {
return (Create) super.setUploadProtocol(uploadProtocol);
}
/**
* The content owner's external ID on which behalf the user is acting on. If not set, the user
* is acting for himself (his own channel).
*/
@com.google.api.client.util.Key
private java.lang.String onBehalfOfContentOwner;
/** The content owner's external ID on which behalf the user is acting on. If not set, the user is
acting for himself (his own channel).
*/
public java.lang.String getOnBehalfOfContentOwner() {
return onBehalfOfContentOwner;
}
/**
* The content owner's external ID on which behalf the user is acting on. If not set, the user
* is acting for himself (his own channel).
*/
public Create setOnBehalfOfContentOwner(java.lang.String onBehalfOfContentOwner) {
this.onBehalfOfContentOwner = onBehalfOfContentOwner;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Deletes a job.
*
* Create a request for the method "jobs.delete".
*
* This request holds the parameters needed by the youtubereporting server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param jobId The ID of the job to delete.
* @return the request
*/
public Delete delete(java.lang.String jobId) throws java.io.IOException {
Delete result = new Delete(jobId);
initialize(result);
return result;
}
public class Delete extends YouTubeReportingRequest {
private static final String REST_PATH = "v1/jobs/{jobId}";
/**
* Deletes a job.
*
* Create a request for the method "jobs.delete".
*
* This request holds the parameters needed by the the youtubereporting server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param jobId The ID of the job to delete.
* @since 1.13
*/
protected Delete(java.lang.String jobId) {
super(YouTubeReporting.this, "DELETE", REST_PATH, null, com.google.api.services.youtubereporting.model.Empty.class);
this.jobId = com.google.api.client.util.Preconditions.checkNotNull(jobId, "Required parameter jobId must be specified.");
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setBearerToken(java.lang.String bearerToken) {
return (Delete) super.setBearerToken(bearerToken);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPp(java.lang.Boolean pp) {
return (Delete) super.setPp(pp);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/** The ID of the job to delete. */
@com.google.api.client.util.Key
private java.lang.String jobId;
/** The ID of the job to delete.
*/
public java.lang.String getJobId() {
return jobId;
}
/** The ID of the job to delete. */
public Delete setJobId(java.lang.String jobId) {
this.jobId = jobId;
return this;
}
/**
* The content owner's external ID on which behalf the user is acting on. If not set, the user
* is acting for himself (his own channel).
*/
@com.google.api.client.util.Key
private java.lang.String onBehalfOfContentOwner;
/** The content owner's external ID on which behalf the user is acting on. If not set, the user is
acting for himself (his own channel).
*/
public java.lang.String getOnBehalfOfContentOwner() {
return onBehalfOfContentOwner;
}
/**
* The content owner's external ID on which behalf the user is acting on. If not set, the user
* is acting for himself (his own channel).
*/
public Delete setOnBehalfOfContentOwner(java.lang.String onBehalfOfContentOwner) {
this.onBehalfOfContentOwner = onBehalfOfContentOwner;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Gets a job.
*
* Create a request for the method "jobs.get".
*
* This request holds the parameters needed by the youtubereporting server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param jobId The ID of the job to retrieve.
* @return the request
*/
public Get get(java.lang.String jobId) throws java.io.IOException {
Get result = new Get(jobId);
initialize(result);
return result;
}
public class Get extends YouTubeReportingRequest {
private static final String REST_PATH = "v1/jobs/{jobId}";
/**
* Gets a job.
*
* Create a request for the method "jobs.get".
*
* This request holds the parameters needed by the the youtubereporting server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
* {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param jobId The ID of the job to retrieve.
* @since 1.13
*/
protected Get(java.lang.String jobId) {
super(YouTubeReporting.this, "GET", REST_PATH, null, com.google.api.services.youtubereporting.model.Job.class);
this.jobId = com.google.api.client.util.Preconditions.checkNotNull(jobId, "Required parameter jobId must be specified.");
}
@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 Get set$Xgafv(java.lang.String $Xgafv) {
return (Get) super.set$Xgafv($Xgafv);
}
@Override
public Get setAccessToken(java.lang.String accessToken) {
return (Get) super.setAccessToken(accessToken);
}
@Override
public Get setAlt(java.lang.String alt) {
return (Get) super.setAlt(alt);
}
@Override
public Get setBearerToken(java.lang.String bearerToken) {
return (Get) super.setBearerToken(bearerToken);
}
@Override
public Get setCallback(java.lang.String callback) {
return (Get) super.setCallback(callback);
}
@Override
public Get setFields(java.lang.String fields) {
return (Get) super.setFields(fields);
}
@Override
public Get setKey(java.lang.String key) {
return (Get) super.setKey(key);
}
@Override
public Get setOauthToken(java.lang.String oauthToken) {
return (Get) super.setOauthToken(oauthToken);
}
@Override
public Get setPp(java.lang.Boolean pp) {
return (Get) super.setPp(pp);
}
@Override
public Get setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Get) super.setPrettyPrint(prettyPrint);
}
@Override
public Get setQuotaUser(java.lang.String quotaUser) {
return (Get) super.setQuotaUser(quotaUser);
}
@Override
public Get setUploadType(java.lang.String uploadType) {
return (Get) super.setUploadType(uploadType);
}
@Override
public Get setUploadProtocol(java.lang.String uploadProtocol) {
return (Get) super.setUploadProtocol(uploadProtocol);
}
/** The ID of the job to retrieve. */
@com.google.api.client.util.Key
private java.lang.String jobId;
/** The ID of the job to retrieve.
*/
public java.lang.String getJobId() {
return jobId;
}
/** The ID of the job to retrieve. */
public Get setJobId(java.lang.String jobId) {
this.jobId = jobId;
return this;
}
/**
* The content owner's external ID on which behalf the user is acting on. If not set, the user
* is acting for himself (his own channel).
*/
@com.google.api.client.util.Key
private java.lang.String onBehalfOfContentOwner;
/** The content owner's external ID on which behalf the user is acting on. If not set, the user is
acting for himself (his own channel).
*/
public java.lang.String getOnBehalfOfContentOwner() {
return onBehalfOfContentOwner;
}
/**
* The content owner's external ID on which behalf the user is acting on. If not set, the user
* is acting for himself (his own channel).
*/
public Get setOnBehalfOfContentOwner(java.lang.String onBehalfOfContentOwner) {
this.onBehalfOfContentOwner = onBehalfOfContentOwner;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists jobs.
*
* Create a request for the method "jobs.list".
*
* This request holds the parameters needed by the youtubereporting server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @return the request
*/
public List list() throws java.io.IOException {
List result = new List();
initialize(result);
return result;
}
public class List extends YouTubeReportingRequest {
private static final String REST_PATH = "v1/jobs";
/**
* Lists jobs.
*
* Create a request for the method "jobs.list".
*
* This request holds the parameters needed by the the youtubereporting server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @since 1.13
*/
protected List() {
super(YouTubeReporting.this, "GET", REST_PATH, null, com.google.api.services.youtubereporting.model.ListJobsResponse.class);
}
@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 List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setBearerToken(java.lang.String bearerToken) {
return (List) super.setBearerToken(bearerToken);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@Override
public List setFields(java.lang.String fields) {
return (List) super.setFields(fields);
}
@Override
public List setKey(java.lang.String key) {
return (List) super.setKey(key);
}
@Override
public List setOauthToken(java.lang.String oauthToken) {
return (List) super.setOauthToken(oauthToken);
}
@Override
public List setPp(java.lang.Boolean pp) {
return (List) super.setPp(pp);
}
@Override
public List setPrettyPrint(java.lang.Boolean prettyPrint) {
return (List) super.setPrettyPrint(prettyPrint);
}
@Override
public List setQuotaUser(java.lang.String quotaUser) {
return (List) super.setQuotaUser(quotaUser);
}
@Override
public List setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/**
* Requested page size. Server may return fewer jobs than requested. If unspecified, server
* will pick an appropriate default.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** Requested page size. Server may return fewer jobs than requested. If unspecified, server will pick
an appropriate default.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* Requested page size. Server may return fewer jobs than requested. If unspecified, server
* will pick an appropriate default.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* The content owner's external ID on which behalf the user is acting on. If not set, the user
* is acting for himself (his own channel).
*/
@com.google.api.client.util.Key
private java.lang.String onBehalfOfContentOwner;
/** The content owner's external ID on which behalf the user is acting on. If not set, the user is
acting for himself (his own channel).
*/
public java.lang.String getOnBehalfOfContentOwner() {
return onBehalfOfContentOwner;
}
/**
* The content owner's external ID on which behalf the user is acting on. If not set, the user
* is acting for himself (his own channel).
*/
public List setOnBehalfOfContentOwner(java.lang.String onBehalfOfContentOwner) {
this.onBehalfOfContentOwner = onBehalfOfContentOwner;
return this;
}
/**
* If set to true, also system-managed jobs will be returned; otherwise only user-created jobs
* will be returned. System-managed jobs can neither be modified nor deleted.
*/
@com.google.api.client.util.Key
private java.lang.Boolean includeSystemManaged;
/** If set to true, also system-managed jobs will be returned; otherwise only user-created jobs will be
returned. System-managed jobs can neither be modified nor deleted.
*/
public java.lang.Boolean getIncludeSystemManaged() {
return includeSystemManaged;
}
/**
* If set to true, also system-managed jobs will be returned; otherwise only user-created jobs
* will be returned. System-managed jobs can neither be modified nor deleted.
*/
public List setIncludeSystemManaged(java.lang.Boolean includeSystemManaged) {
this.includeSystemManaged = includeSystemManaged;
return this;
}
/**
* A token identifying a page of results the server should return. Typically, this is the
* value of ListReportTypesResponse.next_page_token returned in response to the previous call
* to the `ListJobs` method.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** A token identifying a page of results the server should return. Typically, this is the value of
ListReportTypesResponse.next_page_token returned in response to the previous call to the `ListJobs`
method.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* A token identifying a page of results the server should return. Typically, this is the
* value of ListReportTypesResponse.next_page_token returned in response to the previous call
* to the `ListJobs` method.
*/
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* An accessor for creating requests from the Reports collection.
*
* The typical use is:
*
* {@code YouTubeReporting youtubereporting = new YouTubeReporting(...);}
* {@code YouTubeReporting.Reports.List request = youtubereporting.reports().list(parameters ...)}
*
*
* @return the resource collection
*/
public Reports reports() {
return new Reports();
}
/**
* The "reports" collection of methods.
*/
public class Reports {
/**
* Gets the metadata of a specific report.
*
* Create a request for the method "reports.get".
*
* This request holds the parameters needed by the youtubereporting server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param jobId The ID of the job.
* @param reportId The ID of the report to retrieve.
* @return the request
*/
public Get get(java.lang.String jobId, java.lang.String reportId) throws java.io.IOException {
Get result = new Get(jobId, reportId);
initialize(result);
return result;
}
public class Get extends YouTubeReportingRequest {
private static final String REST_PATH = "v1/jobs/{jobId}/reports/{reportId}";
/**
* Gets the metadata of a specific report.
*
* Create a request for the method "reports.get".
*
* This request holds the parameters needed by the the youtubereporting server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
* {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param jobId The ID of the job.
* @param reportId The ID of the report to retrieve.
* @since 1.13
*/
protected Get(java.lang.String jobId, java.lang.String reportId) {
super(YouTubeReporting.this, "GET", REST_PATH, null, com.google.api.services.youtubereporting.model.Report.class);
this.jobId = com.google.api.client.util.Preconditions.checkNotNull(jobId, "Required parameter jobId must be specified.");
this.reportId = com.google.api.client.util.Preconditions.checkNotNull(reportId, "Required parameter reportId must be specified.");
}
@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 Get set$Xgafv(java.lang.String $Xgafv) {
return (Get) super.set$Xgafv($Xgafv);
}
@Override
public Get setAccessToken(java.lang.String accessToken) {
return (Get) super.setAccessToken(accessToken);
}
@Override
public Get setAlt(java.lang.String alt) {
return (Get) super.setAlt(alt);
}
@Override
public Get setBearerToken(java.lang.String bearerToken) {
return (Get) super.setBearerToken(bearerToken);
}
@Override
public Get setCallback(java.lang.String callback) {
return (Get) super.setCallback(callback);
}
@Override
public Get setFields(java.lang.String fields) {
return (Get) super.setFields(fields);
}
@Override
public Get setKey(java.lang.String key) {
return (Get) super.setKey(key);
}
@Override
public Get setOauthToken(java.lang.String oauthToken) {
return (Get) super.setOauthToken(oauthToken);
}
@Override
public Get setPp(java.lang.Boolean pp) {
return (Get) super.setPp(pp);
}
@Override
public Get setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Get) super.setPrettyPrint(prettyPrint);
}
@Override
public Get setQuotaUser(java.lang.String quotaUser) {
return (Get) super.setQuotaUser(quotaUser);
}
@Override
public Get setUploadType(java.lang.String uploadType) {
return (Get) super.setUploadType(uploadType);
}
@Override
public Get setUploadProtocol(java.lang.String uploadProtocol) {
return (Get) super.setUploadProtocol(uploadProtocol);
}
/** The ID of the job. */
@com.google.api.client.util.Key
private java.lang.String jobId;
/** The ID of the job.
*/
public java.lang.String getJobId() {
return jobId;
}
/** The ID of the job. */
public Get setJobId(java.lang.String jobId) {
this.jobId = jobId;
return this;
}
/** The ID of the report to retrieve. */
@com.google.api.client.util.Key
private java.lang.String reportId;
/** The ID of the report to retrieve.
*/
public java.lang.String getReportId() {
return reportId;
}
/** The ID of the report to retrieve. */
public Get setReportId(java.lang.String reportId) {
this.reportId = reportId;
return this;
}
/**
* The content owner's external ID on which behalf the user is acting on. If not set, the
* user is acting for himself (his own channel).
*/
@com.google.api.client.util.Key
private java.lang.String onBehalfOfContentOwner;
/** The content owner's external ID on which behalf the user is acting on. If not set, the user is
acting for himself (his own channel).
*/
public java.lang.String getOnBehalfOfContentOwner() {
return onBehalfOfContentOwner;
}
/**
* The content owner's external ID on which behalf the user is acting on. If not set, the
* user is acting for himself (his own channel).
*/
public Get setOnBehalfOfContentOwner(java.lang.String onBehalfOfContentOwner) {
this.onBehalfOfContentOwner = onBehalfOfContentOwner;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists reports created by a specific job. Returns NOT_FOUND if the job does not exist.
*
* Create a request for the method "reports.list".
*
* This request holds the parameters needed by the youtubereporting server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param jobId The ID of the job.
* @return the request
*/
public List list(java.lang.String jobId) throws java.io.IOException {
List result = new List(jobId);
initialize(result);
return result;
}
public class List extends YouTubeReportingRequest {
private static final String REST_PATH = "v1/jobs/{jobId}/reports";
/**
* Lists reports created by a specific job. Returns NOT_FOUND if the job does not exist.
*
* Create a request for the method "reports.list".
*
* This request holds the parameters needed by the the youtubereporting server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param jobId The ID of the job.
* @since 1.13
*/
protected List(java.lang.String jobId) {
super(YouTubeReporting.this, "GET", REST_PATH, null, com.google.api.services.youtubereporting.model.ListReportsResponse.class);
this.jobId = com.google.api.client.util.Preconditions.checkNotNull(jobId, "Required parameter jobId must be specified.");
}
@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 List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setBearerToken(java.lang.String bearerToken) {
return (List) super.setBearerToken(bearerToken);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@Override
public List setFields(java.lang.String fields) {
return (List) super.setFields(fields);
}
@Override
public List setKey(java.lang.String key) {
return (List) super.setKey(key);
}
@Override
public List setOauthToken(java.lang.String oauthToken) {
return (List) super.setOauthToken(oauthToken);
}
@Override
public List setPp(java.lang.Boolean pp) {
return (List) super.setPp(pp);
}
@Override
public List setPrettyPrint(java.lang.Boolean prettyPrint) {
return (List) super.setPrettyPrint(prettyPrint);
}
@Override
public List setQuotaUser(java.lang.String quotaUser) {
return (List) super.setQuotaUser(quotaUser);
}
@Override
public List setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/** The ID of the job. */
@com.google.api.client.util.Key
private java.lang.String jobId;
/** The ID of the job.
*/
public java.lang.String getJobId() {
return jobId;
}
/** The ID of the job. */
public List setJobId(java.lang.String jobId) {
this.jobId = jobId;
return this;
}
/**
* If set, only reports whose start time is smaller than the specified date/time are
* returned.
*/
@com.google.api.client.util.Key
private String startTimeBefore;
/** If set, only reports whose start time is smaller than the specified date/time are returned.
*/
public String getStartTimeBefore() {
return startTimeBefore;
}
/**
* If set, only reports whose start time is smaller than the specified date/time are
* returned.
*/
public List setStartTimeBefore(String startTimeBefore) {
this.startTimeBefore = startTimeBefore;
return this;
}
/** If set, only reports created after the specified date/time are returned. */
@com.google.api.client.util.Key
private String createdAfter;
/** If set, only reports created after the specified date/time are returned.
*/
public String getCreatedAfter() {
return createdAfter;
}
/** If set, only reports created after the specified date/time are returned. */
public List setCreatedAfter(String createdAfter) {
this.createdAfter = createdAfter;
return this;
}
/**
* A token identifying a page of results the server should return. Typically, this is the
* value of ListReportsResponse.next_page_token returned in response to the previous call to
* the `ListReports` method.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** A token identifying a page of results the server should return. Typically, this is the value of
ListReportsResponse.next_page_token returned in response to the previous call to the `ListReports`
method.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* A token identifying a page of results the server should return. Typically, this is the
* value of ListReportsResponse.next_page_token returned in response to the previous call to
* the `ListReports` method.
*/
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
/**
* If set, only reports whose start time is greater than or equal the specified date/time
* are returned.
*/
@com.google.api.client.util.Key
private String startTimeAtOrAfter;
/** If set, only reports whose start time is greater than or equal the specified date/time are
returned.
*/
public String getStartTimeAtOrAfter() {
return startTimeAtOrAfter;
}
/**
* If set, only reports whose start time is greater than or equal the specified date/time
* are returned.
*/
public List setStartTimeAtOrAfter(String startTimeAtOrAfter) {
this.startTimeAtOrAfter = startTimeAtOrAfter;
return this;
}
/**
* Requested page size. Server may return fewer report types than requested. If unspecified,
* server will pick an appropriate default.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** Requested page size. Server may return fewer report types than requested. If unspecified, server
will pick an appropriate default.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* Requested page size. Server may return fewer report types than requested. If unspecified,
* server will pick an appropriate default.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* The content owner's external ID on which behalf the user is acting on. If not set, the
* user is acting for himself (his own channel).
*/
@com.google.api.client.util.Key
private java.lang.String onBehalfOfContentOwner;
/** The content owner's external ID on which behalf the user is acting on. If not set, the user is
acting for himself (his own channel).
*/
public java.lang.String getOnBehalfOfContentOwner() {
return onBehalfOfContentOwner;
}
/**
* The content owner's external ID on which behalf the user is acting on. If not set, the
* user is acting for himself (his own channel).
*/
public List setOnBehalfOfContentOwner(java.lang.String onBehalfOfContentOwner) {
this.onBehalfOfContentOwner = onBehalfOfContentOwner;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
}
}
/**
* An accessor for creating requests from the Media collection.
*
* The typical use is:
*
* {@code YouTubeReporting youtubereporting = new YouTubeReporting(...);}
* {@code YouTubeReporting.Media.List request = youtubereporting.media().list(parameters ...)}
*
*
* @return the resource collection
*/
public Media media() {
return new Media();
}
/**
* The "media" collection of methods.
*/
public class Media {
/**
* Method for media download. Download is supported on the URI `/v1/media/{+name}?alt=media`.
*
* Create a request for the method "media.download".
*
* This request holds the parameters needed by the youtubereporting server. After setting any
* optional parameters, call the {@link Download#execute()} method to invoke the remote operation.
*
* @param resourceName Name of the media that is being downloaded. See
ReadRequest.resource_name.
* @return the request
*/
public Download download(java.lang.String resourceName) throws java.io.IOException {
Download result = new Download(resourceName);
initialize(result);
return result;
}
public class Download extends YouTubeReportingRequest {
private static final String REST_PATH = "v1/media/{+resourceName}";
private final java.util.regex.Pattern RESOURCE_NAME_PATTERN =
java.util.regex.Pattern.compile("^.+$");
/**
* Method for media download. Download is supported on the URI `/v1/media/{+name}?alt=media`.
*
* Create a request for the method "media.download".
*
* This request holds the parameters needed by the the youtubereporting server. After setting any
* optional parameters, call the {@link Download#execute()} method to invoke the remote operation.
* {@link
* Download#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param resourceName Name of the media that is being downloaded. See
ReadRequest.resource_name.
* @since 1.13
*/
protected Download(java.lang.String resourceName) {
super(YouTubeReporting.this, "GET", REST_PATH, null, com.google.api.services.youtubereporting.model.Media.class);
this.resourceName = com.google.api.client.util.Preconditions.checkNotNull(resourceName, "Required parameter resourceName must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_NAME_PATTERN.matcher(resourceName).matches(),
"Parameter resourceName must conform to the pattern " +
"^.+$");
}
initializeMediaDownload();
}
@Override
public void executeMediaAndDownloadTo(java.io.OutputStream outputStream) throws java.io.IOException {
super.executeMediaAndDownloadTo(outputStream);
}
@Override
public java.io.InputStream executeMediaAsInputStream() throws java.io.IOException {
return super.executeMediaAsInputStream();
}
@Override
public com.google.api.client.http.HttpResponse executeMedia() throws java.io.IOException {
return super.executeMedia();
}
@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 Download set$Xgafv(java.lang.String $Xgafv) {
return (Download) super.set$Xgafv($Xgafv);
}
@Override
public Download setAccessToken(java.lang.String accessToken) {
return (Download) super.setAccessToken(accessToken);
}
@Override
public Download setAlt(java.lang.String alt) {
return (Download) super.setAlt(alt);
}
@Override
public Download setBearerToken(java.lang.String bearerToken) {
return (Download) super.setBearerToken(bearerToken);
}
@Override
public Download setCallback(java.lang.String callback) {
return (Download) super.setCallback(callback);
}
@Override
public Download setFields(java.lang.String fields) {
return (Download) super.setFields(fields);
}
@Override
public Download setKey(java.lang.String key) {
return (Download) super.setKey(key);
}
@Override
public Download setOauthToken(java.lang.String oauthToken) {
return (Download) super.setOauthToken(oauthToken);
}
@Override
public Download setPp(java.lang.Boolean pp) {
return (Download) super.setPp(pp);
}
@Override
public Download setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Download) super.setPrettyPrint(prettyPrint);
}
@Override
public Download setQuotaUser(java.lang.String quotaUser) {
return (Download) super.setQuotaUser(quotaUser);
}
@Override
public Download setUploadType(java.lang.String uploadType) {
return (Download) super.setUploadType(uploadType);
}
@Override
public Download setUploadProtocol(java.lang.String uploadProtocol) {
return (Download) super.setUploadProtocol(uploadProtocol);
}
/**
* Name of the media that is being downloaded. See ReadRequest.resource_name.
*/
@com.google.api.client.util.Key
private java.lang.String resourceName;
/** Name of the media that is being downloaded. See ReadRequest.resource_name.
*/
public java.lang.String getResourceName() {
return resourceName;
}
/**
* Name of the media that is being downloaded. See ReadRequest.resource_name.
*/
public Download setResourceName(java.lang.String resourceName) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_NAME_PATTERN.matcher(resourceName).matches(),
"Parameter resourceName must conform to the pattern " +
"^.+$");
}
this.resourceName = resourceName;
return this;
}
@Override
public Download set(String parameterName, Object value) {
return (Download) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the ReportTypes collection.
*
* The typical use is:
*
* {@code YouTubeReporting youtubereporting = new YouTubeReporting(...);}
* {@code YouTubeReporting.ReportTypes.List request = youtubereporting.reportTypes().list(parameters ...)}
*
*
* @return the resource collection
*/
public ReportTypes reportTypes() {
return new ReportTypes();
}
/**
* The "reportTypes" collection of methods.
*/
public class ReportTypes {
/**
* Lists report types.
*
* Create a request for the method "reportTypes.list".
*
* This request holds the parameters needed by the youtubereporting server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @return the request
*/
public List list() throws java.io.IOException {
List result = new List();
initialize(result);
return result;
}
public class List extends YouTubeReportingRequest {
private static final String REST_PATH = "v1/reportTypes";
/**
* Lists report types.
*
* Create a request for the method "reportTypes.list".
*
* This request holds the parameters needed by the the youtubereporting server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @since 1.13
*/
protected List() {
super(YouTubeReporting.this, "GET", REST_PATH, null, com.google.api.services.youtubereporting.model.ListReportTypesResponse.class);
}
@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 List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setBearerToken(java.lang.String bearerToken) {
return (List) super.setBearerToken(bearerToken);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@Override
public List setFields(java.lang.String fields) {
return (List) super.setFields(fields);
}
@Override
public List setKey(java.lang.String key) {
return (List) super.setKey(key);
}
@Override
public List setOauthToken(java.lang.String oauthToken) {
return (List) super.setOauthToken(oauthToken);
}
@Override
public List setPp(java.lang.Boolean pp) {
return (List) super.setPp(pp);
}
@Override
public List setPrettyPrint(java.lang.Boolean prettyPrint) {
return (List) super.setPrettyPrint(prettyPrint);
}
@Override
public List setQuotaUser(java.lang.String quotaUser) {
return (List) super.setQuotaUser(quotaUser);
}
@Override
public List setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/**
* Requested page size. Server may return fewer report types than requested. If unspecified,
* server will pick an appropriate default.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** Requested page size. Server may return fewer report types than requested. If unspecified, server
will pick an appropriate default.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* Requested page size. Server may return fewer report types than requested. If unspecified,
* server will pick an appropriate default.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* The content owner's external ID on which behalf the user is acting on. If not set, the user
* is acting for himself (his own channel).
*/
@com.google.api.client.util.Key
private java.lang.String onBehalfOfContentOwner;
/** The content owner's external ID on which behalf the user is acting on. If not set, the user is
acting for himself (his own channel).
*/
public java.lang.String getOnBehalfOfContentOwner() {
return onBehalfOfContentOwner;
}
/**
* The content owner's external ID on which behalf the user is acting on. If not set, the user
* is acting for himself (his own channel).
*/
public List setOnBehalfOfContentOwner(java.lang.String onBehalfOfContentOwner) {
this.onBehalfOfContentOwner = onBehalfOfContentOwner;
return this;
}
/**
* If set to true, also system-managed report types will be returned; otherwise only the
* report types that can be used to create new reporting jobs will be returned.
*/
@com.google.api.client.util.Key
private java.lang.Boolean includeSystemManaged;
/** If set to true, also system-managed report types will be returned; otherwise only the report types
that can be used to create new reporting jobs will be returned.
*/
public java.lang.Boolean getIncludeSystemManaged() {
return includeSystemManaged;
}
/**
* If set to true, also system-managed report types will be returned; otherwise only the
* report types that can be used to create new reporting jobs will be returned.
*/
public List setIncludeSystemManaged(java.lang.Boolean includeSystemManaged) {
this.includeSystemManaged = includeSystemManaged;
return this;
}
/**
* A token identifying a page of results the server should return. Typically, this is the
* value of ListReportTypesResponse.next_page_token returned in response to the previous call
* to the `ListReportTypes` method.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** A token identifying a page of results the server should return. Typically, this is the value of
ListReportTypesResponse.next_page_token returned in response to the previous call to the
`ListReportTypes` method.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* A token identifying a page of results the server should return. Typically, this is the
* value of ListReportTypesResponse.next_page_token returned in response to the previous call
* to the `ListReportTypes` method.
*/
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
}
/**
* Builder for {@link YouTubeReporting}.
*
*
* Implementation is not thread-safe.
*
*
* @since 1.3.0
*/
public static final class Builder extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient.Builder {
/**
* Returns an instance of a new builder.
*
* @param transport HTTP transport, which should normally be:
*
* - Google App Engine:
* {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}
* - Android: {@code newCompatibleTransport} from
* {@code com.google.api.client.extensions.android.http.AndroidHttp}
* - Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()}
*
*
* @param jsonFactory JSON factory, which may be:
*
* - Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}
* - Google GSON: {@code com.google.api.client.json.gson.GsonFactory}
* - Android Honeycomb or higher:
* {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}
*
* @param httpRequestInitializer HTTP request initializer or {@code null} for none
* @since 1.7
*/
public Builder(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory,
com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
super(
transport,
jsonFactory,
DEFAULT_ROOT_URL,
DEFAULT_SERVICE_PATH,
httpRequestInitializer,
false);
}
/** Builds a new instance of {@link YouTubeReporting}. */
@Override
public YouTubeReporting build() {
return new YouTubeReporting(this);
}
@Override
public Builder setRootUrl(String rootUrl) {
return (Builder) super.setRootUrl(rootUrl);
}
@Override
public Builder setServicePath(String servicePath) {
return (Builder) super.setServicePath(servicePath);
}
@Override
public Builder setHttpRequestInitializer(com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
return (Builder) super.setHttpRequestInitializer(httpRequestInitializer);
}
@Override
public Builder setApplicationName(String applicationName) {
return (Builder) super.setApplicationName(applicationName);
}
@Override
public Builder setSuppressPatternChecks(boolean suppressPatternChecks) {
return (Builder) super.setSuppressPatternChecks(suppressPatternChecks);
}
@Override
public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) {
return (Builder) super.setSuppressRequiredParameterChecks(suppressRequiredParameterChecks);
}
@Override
public Builder setSuppressAllChecks(boolean suppressAllChecks) {
return (Builder) super.setSuppressAllChecks(suppressAllChecks);
}
/**
* Set the {@link YouTubeReportingRequestInitializer}.
*
* @since 1.12
*/
public Builder setYouTubeReportingRequestInitializer(
YouTubeReportingRequestInitializer youtubereportingRequestInitializer) {
return (Builder) super.setGoogleClientRequestInitializer(youtubereportingRequestInitializer);
}
@Override
public Builder setGoogleClientRequestInitializer(
com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) {
return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer);
}
}
}