![JAR search and dependency download from the Maven repository](/logo.png)
com.google.api.services.spectrum.Spectrum 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: 2016-05-04 15:59:39 UTC)
* on 2016-05-18 at 06:28:13 UTC
* Modify at your own risk.
*/
package com.google.api.services.spectrum;
/**
* Service definition for Spectrum (v1explorer).
*
*
* API for spectrum-management functions.
*
*
*
* For more information about this service, see the
* API Documentation
*
*
*
* This service uses {@link SpectrumRequestInitializer} to initialize global parameters via its
* {@link Builder}.
*
*
* @since 1.3
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public class Spectrum 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.22.0 of the Google Spectrum Database 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://www.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 = "spectrum/v1explorer/paws/";
/**
* 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 Spectrum(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
*/
Spectrum(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 Paws collection.
*
* The typical use is:
*
* {@code Spectrum spectrum = new Spectrum(...);}
* {@code Spectrum.Paws.List request = spectrum.paws().list(parameters ...)}
*
*
* @return the resource collection
*/
public Paws paws() {
return new Paws();
}
/**
* The "paws" collection of methods.
*/
public class Paws {
/**
* Requests information about the available spectrum for a device at a location. Requests from a
* fixed-mode device must include owner information so the device can be registered with the
* database.
*
* Create a request for the method "paws.getSpectrum".
*
* This request holds the parameters needed by the spectrum server. After setting any optional
* parameters, call the {@link GetSpectrum#execute()} method to invoke the remote operation.
*
* @param content the {@link com.google.api.services.spectrum.model.PawsGetSpectrumRequest}
* @return the request
*/
public GetSpectrum getSpectrum(com.google.api.services.spectrum.model.PawsGetSpectrumRequest content) throws java.io.IOException {
GetSpectrum result = new GetSpectrum(content);
initialize(result);
return result;
}
public class GetSpectrum extends SpectrumRequest {
private static final String REST_PATH = "getSpectrum";
/**
* Requests information about the available spectrum for a device at a location. Requests from a
* fixed-mode device must include owner information so the device can be registered with the
* database.
*
* Create a request for the method "paws.getSpectrum".
*
* This request holds the parameters needed by the the spectrum server. After setting any
* optional parameters, call the {@link GetSpectrum#execute()} method to invoke the remote
* operation. {@link
* GetSpectrum#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.spectrum.model.PawsGetSpectrumRequest}
* @since 1.13
*/
protected GetSpectrum(com.google.api.services.spectrum.model.PawsGetSpectrumRequest content) {
super(Spectrum.this, "POST", REST_PATH, content, com.google.api.services.spectrum.model.PawsGetSpectrumResponse.class);
}
@Override
public GetSpectrum setAlt(java.lang.String alt) {
return (GetSpectrum) super.setAlt(alt);
}
@Override
public GetSpectrum setFields(java.lang.String fields) {
return (GetSpectrum) super.setFields(fields);
}
@Override
public GetSpectrum setKey(java.lang.String key) {
return (GetSpectrum) super.setKey(key);
}
@Override
public GetSpectrum setOauthToken(java.lang.String oauthToken) {
return (GetSpectrum) super.setOauthToken(oauthToken);
}
@Override
public GetSpectrum setPrettyPrint(java.lang.Boolean prettyPrint) {
return (GetSpectrum) super.setPrettyPrint(prettyPrint);
}
@Override
public GetSpectrum setQuotaUser(java.lang.String quotaUser) {
return (GetSpectrum) super.setQuotaUser(quotaUser);
}
@Override
public GetSpectrum setUserIp(java.lang.String userIp) {
return (GetSpectrum) super.setUserIp(userIp);
}
@Override
public GetSpectrum set(String parameterName, Object value) {
return (GetSpectrum) super.set(parameterName, value);
}
}
/**
* The Google Spectrum Database does not support batch requests, so this method always yields an
* UNIMPLEMENTED error.
*
* Create a request for the method "paws.getSpectrumBatch".
*
* This request holds the parameters needed by the spectrum server. After setting any optional
* parameters, call the {@link GetSpectrumBatch#execute()} method to invoke the remote operation.
*
* @param content the {@link com.google.api.services.spectrum.model.PawsGetSpectrumBatchRequest}
* @return the request
*/
public GetSpectrumBatch getSpectrumBatch(com.google.api.services.spectrum.model.PawsGetSpectrumBatchRequest content) throws java.io.IOException {
GetSpectrumBatch result = new GetSpectrumBatch(content);
initialize(result);
return result;
}
public class GetSpectrumBatch extends SpectrumRequest {
private static final String REST_PATH = "getSpectrumBatch";
/**
* The Google Spectrum Database does not support batch requests, so this method always yields an
* UNIMPLEMENTED error.
*
* Create a request for the method "paws.getSpectrumBatch".
*
* This request holds the parameters needed by the the spectrum server. After setting any
* optional parameters, call the {@link GetSpectrumBatch#execute()} method to invoke the remote
* operation. {@link GetSpectrumBatch#initialize(com.google.api.client.googleapis.services.Abs
* tractGoogleClientRequest)} must be called to initialize this instance immediately after
* invoking the constructor.
*
* @param content the {@link com.google.api.services.spectrum.model.PawsGetSpectrumBatchRequest}
* @since 1.13
*/
protected GetSpectrumBatch(com.google.api.services.spectrum.model.PawsGetSpectrumBatchRequest content) {
super(Spectrum.this, "POST", REST_PATH, content, com.google.api.services.spectrum.model.PawsGetSpectrumBatchResponse.class);
}
@Override
public GetSpectrumBatch setAlt(java.lang.String alt) {
return (GetSpectrumBatch) super.setAlt(alt);
}
@Override
public GetSpectrumBatch setFields(java.lang.String fields) {
return (GetSpectrumBatch) super.setFields(fields);
}
@Override
public GetSpectrumBatch setKey(java.lang.String key) {
return (GetSpectrumBatch) super.setKey(key);
}
@Override
public GetSpectrumBatch setOauthToken(java.lang.String oauthToken) {
return (GetSpectrumBatch) super.setOauthToken(oauthToken);
}
@Override
public GetSpectrumBatch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (GetSpectrumBatch) super.setPrettyPrint(prettyPrint);
}
@Override
public GetSpectrumBatch setQuotaUser(java.lang.String quotaUser) {
return (GetSpectrumBatch) super.setQuotaUser(quotaUser);
}
@Override
public GetSpectrumBatch setUserIp(java.lang.String userIp) {
return (GetSpectrumBatch) super.setUserIp(userIp);
}
@Override
public GetSpectrumBatch set(String parameterName, Object value) {
return (GetSpectrumBatch) super.set(parameterName, value);
}
}
/**
* Initializes the connection between a white space device and the database.
*
* Create a request for the method "paws.init".
*
* This request holds the parameters needed by the spectrum server. After setting any optional
* parameters, call the {@link Init#execute()} method to invoke the remote operation.
*
* @param content the {@link com.google.api.services.spectrum.model.PawsInitRequest}
* @return the request
*/
public Init init(com.google.api.services.spectrum.model.PawsInitRequest content) throws java.io.IOException {
Init result = new Init(content);
initialize(result);
return result;
}
public class Init extends SpectrumRequest {
private static final String REST_PATH = "init";
/**
* Initializes the connection between a white space device and the database.
*
* Create a request for the method "paws.init".
*
* This request holds the parameters needed by the the spectrum server. After setting any
* optional parameters, call the {@link Init#execute()} method to invoke the remote operation.
* {@link Init#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.spectrum.model.PawsInitRequest}
* @since 1.13
*/
protected Init(com.google.api.services.spectrum.model.PawsInitRequest content) {
super(Spectrum.this, "POST", REST_PATH, content, com.google.api.services.spectrum.model.PawsInitResponse.class);
}
@Override
public Init setAlt(java.lang.String alt) {
return (Init) super.setAlt(alt);
}
@Override
public Init setFields(java.lang.String fields) {
return (Init) super.setFields(fields);
}
@Override
public Init setKey(java.lang.String key) {
return (Init) super.setKey(key);
}
@Override
public Init setOauthToken(java.lang.String oauthToken) {
return (Init) super.setOauthToken(oauthToken);
}
@Override
public Init setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Init) super.setPrettyPrint(prettyPrint);
}
@Override
public Init setQuotaUser(java.lang.String quotaUser) {
return (Init) super.setQuotaUser(quotaUser);
}
@Override
public Init setUserIp(java.lang.String userIp) {
return (Init) super.setUserIp(userIp);
}
@Override
public Init set(String parameterName, Object value) {
return (Init) super.set(parameterName, value);
}
}
/**
* Notifies the database that the device has selected certain frequency ranges for transmission.
* Only to be invoked when required by the regulator. The Google Spectrum Database does not operate
* in domains that require notification, so this always yields an UNIMPLEMENTED error.
*
* Create a request for the method "paws.notifySpectrumUse".
*
* This request holds the parameters needed by the spectrum server. After setting any optional
* parameters, call the {@link NotifySpectrumUse#execute()} method to invoke the remote operation.
*
* @param content the {@link com.google.api.services.spectrum.model.PawsNotifySpectrumUseRequest}
* @return the request
*/
public NotifySpectrumUse notifySpectrumUse(com.google.api.services.spectrum.model.PawsNotifySpectrumUseRequest content) throws java.io.IOException {
NotifySpectrumUse result = new NotifySpectrumUse(content);
initialize(result);
return result;
}
public class NotifySpectrumUse extends SpectrumRequest {
private static final String REST_PATH = "notifySpectrumUse";
/**
* Notifies the database that the device has selected certain frequency ranges for transmission.
* Only to be invoked when required by the regulator. The Google Spectrum Database does not
* operate in domains that require notification, so this always yields an UNIMPLEMENTED error.
*
* Create a request for the method "paws.notifySpectrumUse".
*
* This request holds the parameters needed by the the spectrum server. After setting any
* optional parameters, call the {@link NotifySpectrumUse#execute()} method to invoke the remote
* operation. {@link NotifySpectrumUse#initialize(com.google.api.client.googleapis.services.Ab
* stractGoogleClientRequest)} must be called to initialize this instance immediately after
* invoking the constructor.
*
* @param content the {@link com.google.api.services.spectrum.model.PawsNotifySpectrumUseRequest}
* @since 1.13
*/
protected NotifySpectrumUse(com.google.api.services.spectrum.model.PawsNotifySpectrumUseRequest content) {
super(Spectrum.this, "POST", REST_PATH, content, com.google.api.services.spectrum.model.PawsNotifySpectrumUseResponse.class);
}
@Override
public NotifySpectrumUse setAlt(java.lang.String alt) {
return (NotifySpectrumUse) super.setAlt(alt);
}
@Override
public NotifySpectrumUse setFields(java.lang.String fields) {
return (NotifySpectrumUse) super.setFields(fields);
}
@Override
public NotifySpectrumUse setKey(java.lang.String key) {
return (NotifySpectrumUse) super.setKey(key);
}
@Override
public NotifySpectrumUse setOauthToken(java.lang.String oauthToken) {
return (NotifySpectrumUse) super.setOauthToken(oauthToken);
}
@Override
public NotifySpectrumUse setPrettyPrint(java.lang.Boolean prettyPrint) {
return (NotifySpectrumUse) super.setPrettyPrint(prettyPrint);
}
@Override
public NotifySpectrumUse setQuotaUser(java.lang.String quotaUser) {
return (NotifySpectrumUse) super.setQuotaUser(quotaUser);
}
@Override
public NotifySpectrumUse setUserIp(java.lang.String userIp) {
return (NotifySpectrumUse) super.setUserIp(userIp);
}
@Override
public NotifySpectrumUse set(String parameterName, Object value) {
return (NotifySpectrumUse) super.set(parameterName, value);
}
}
/**
* The Google Spectrum Database implements registration in the getSpectrum method. As such this
* always returns an UNIMPLEMENTED error.
*
* Create a request for the method "paws.register".
*
* This request holds the parameters needed by the spectrum server. After setting any optional
* parameters, call the {@link Register#execute()} method to invoke the remote operation.
*
* @param content the {@link com.google.api.services.spectrum.model.PawsRegisterRequest}
* @return the request
*/
public Register register(com.google.api.services.spectrum.model.PawsRegisterRequest content) throws java.io.IOException {
Register result = new Register(content);
initialize(result);
return result;
}
public class Register extends SpectrumRequest {
private static final String REST_PATH = "register";
/**
* The Google Spectrum Database implements registration in the getSpectrum method. As such this
* always returns an UNIMPLEMENTED error.
*
* Create a request for the method "paws.register".
*
* This request holds the parameters needed by the the spectrum server. After setting any
* optional parameters, call the {@link Register#execute()} method to invoke the remote operation.
* {@link
* Register#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.spectrum.model.PawsRegisterRequest}
* @since 1.13
*/
protected Register(com.google.api.services.spectrum.model.PawsRegisterRequest content) {
super(Spectrum.this, "POST", REST_PATH, content, com.google.api.services.spectrum.model.PawsRegisterResponse.class);
}
@Override
public Register setAlt(java.lang.String alt) {
return (Register) super.setAlt(alt);
}
@Override
public Register setFields(java.lang.String fields) {
return (Register) super.setFields(fields);
}
@Override
public Register setKey(java.lang.String key) {
return (Register) super.setKey(key);
}
@Override
public Register setOauthToken(java.lang.String oauthToken) {
return (Register) super.setOauthToken(oauthToken);
}
@Override
public Register setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Register) super.setPrettyPrint(prettyPrint);
}
@Override
public Register setQuotaUser(java.lang.String quotaUser) {
return (Register) super.setQuotaUser(quotaUser);
}
@Override
public Register setUserIp(java.lang.String userIp) {
return (Register) super.setUserIp(userIp);
}
@Override
public Register set(String parameterName, Object value) {
return (Register) super.set(parameterName, value);
}
}
/**
* Validates a device for white space use in accordance with regulatory rules. The Google Spectrum
* Database does not support master/slave configurations, so this always yields an UNIMPLEMENTED
* error.
*
* Create a request for the method "paws.verifyDevice".
*
* This request holds the parameters needed by the spectrum server. After setting any optional
* parameters, call the {@link VerifyDevice#execute()} method to invoke the remote operation.
*
* @param content the {@link com.google.api.services.spectrum.model.PawsVerifyDeviceRequest}
* @return the request
*/
public VerifyDevice verifyDevice(com.google.api.services.spectrum.model.PawsVerifyDeviceRequest content) throws java.io.IOException {
VerifyDevice result = new VerifyDevice(content);
initialize(result);
return result;
}
public class VerifyDevice extends SpectrumRequest {
private static final String REST_PATH = "verifyDevice";
/**
* Validates a device for white space use in accordance with regulatory rules. The Google Spectrum
* Database does not support master/slave configurations, so this always yields an UNIMPLEMENTED
* error.
*
* Create a request for the method "paws.verifyDevice".
*
* This request holds the parameters needed by the the spectrum server. After setting any
* optional parameters, call the {@link VerifyDevice#execute()} method to invoke the remote
* operation. {@link
* VerifyDevice#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.spectrum.model.PawsVerifyDeviceRequest}
* @since 1.13
*/
protected VerifyDevice(com.google.api.services.spectrum.model.PawsVerifyDeviceRequest content) {
super(Spectrum.this, "POST", REST_PATH, content, com.google.api.services.spectrum.model.PawsVerifyDeviceResponse.class);
}
@Override
public VerifyDevice setAlt(java.lang.String alt) {
return (VerifyDevice) super.setAlt(alt);
}
@Override
public VerifyDevice setFields(java.lang.String fields) {
return (VerifyDevice) super.setFields(fields);
}
@Override
public VerifyDevice setKey(java.lang.String key) {
return (VerifyDevice) super.setKey(key);
}
@Override
public VerifyDevice setOauthToken(java.lang.String oauthToken) {
return (VerifyDevice) super.setOauthToken(oauthToken);
}
@Override
public VerifyDevice setPrettyPrint(java.lang.Boolean prettyPrint) {
return (VerifyDevice) super.setPrettyPrint(prettyPrint);
}
@Override
public VerifyDevice setQuotaUser(java.lang.String quotaUser) {
return (VerifyDevice) super.setQuotaUser(quotaUser);
}
@Override
public VerifyDevice setUserIp(java.lang.String userIp) {
return (VerifyDevice) super.setUserIp(userIp);
}
@Override
public VerifyDevice set(String parameterName, Object value) {
return (VerifyDevice) super.set(parameterName, value);
}
}
}
/**
* Builder for {@link Spectrum}.
*
*
* 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 Spectrum}. */
@Override
public Spectrum build() {
return new Spectrum(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 SpectrumRequestInitializer}.
*
* @since 1.12
*/
public Builder setSpectrumRequestInitializer(
SpectrumRequestInitializer spectrumRequestInitializer) {
return (Builder) super.setGoogleClientRequestInitializer(spectrumRequestInitializer);
}
@Override
public Builder setGoogleClientRequestInitializer(
com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) {
return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer);
}
}
}