Current section
Files
Jump to
Current section
Files
lib/google_api/spectrum/v1explorer/api/paws.ex
# Copyright 2017 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.
# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule GoogleApi.Spectrum.V1explorer.Api.Paws do
@moduledoc """
API calls for all endpoints tagged `Paws`.
"""
alias GoogleApi.Spectrum.V1explorer.Connection
alias GoogleApi.Gax.{Request, Response}
@doc """
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.
## Parameters
- connection (GoogleApi.Spectrum.V1explorer.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for the response.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
- :userIp (String.t): Deprecated. Please use quotaUser instead.
- :body (PawsGetSpectrumRequest):
## Returns
{:ok, %GoogleApi.Spectrum.V1explorer.Model.PawsGetSpectrumResponse{}} on success
{:error, info} on failure
"""
@spec spectrum_paws_get_spectrum(Tesla.Env.client(), keyword()) ::
{:ok, GoogleApi.Spectrum.V1explorer.Model.PawsGetSpectrumResponse.t()}
| {:error, Tesla.Env.t()}
def spectrum_paws_get_spectrum(connection, opts \\ []) do
optional_params = %{
:alt => :query,
:fields => :query,
:key => :query,
:oauth_token => :query,
:prettyPrint => :query,
:quotaUser => :query,
:userIp => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/getSpectrum")
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Spectrum.V1explorer.Model.PawsGetSpectrumResponse{})
end
@doc """
The Google Spectrum Database does not support batch requests, so this method always yields an UNIMPLEMENTED error.
## Parameters
- connection (GoogleApi.Spectrum.V1explorer.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for the response.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
- :userIp (String.t): Deprecated. Please use quotaUser instead.
- :body (PawsGetSpectrumBatchRequest):
## Returns
{:ok, %GoogleApi.Spectrum.V1explorer.Model.PawsGetSpectrumBatchResponse{}} on success
{:error, info} on failure
"""
@spec spectrum_paws_get_spectrum_batch(Tesla.Env.client(), keyword()) ::
{:ok, GoogleApi.Spectrum.V1explorer.Model.PawsGetSpectrumBatchResponse.t()}
| {:error, Tesla.Env.t()}
def spectrum_paws_get_spectrum_batch(connection, opts \\ []) do
optional_params = %{
:alt => :query,
:fields => :query,
:key => :query,
:oauth_token => :query,
:prettyPrint => :query,
:quotaUser => :query,
:userIp => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/getSpectrumBatch")
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(
struct: %GoogleApi.Spectrum.V1explorer.Model.PawsGetSpectrumBatchResponse{}
)
end
@doc """
Initializes the connection between a white space device and the database.
## Parameters
- connection (GoogleApi.Spectrum.V1explorer.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for the response.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
- :userIp (String.t): Deprecated. Please use quotaUser instead.
- :body (PawsInitRequest):
## Returns
{:ok, %GoogleApi.Spectrum.V1explorer.Model.PawsInitResponse{}} on success
{:error, info} on failure
"""
@spec spectrum_paws_init(Tesla.Env.client(), keyword()) ::
{:ok, GoogleApi.Spectrum.V1explorer.Model.PawsInitResponse.t()}
| {:error, Tesla.Env.t()}
def spectrum_paws_init(connection, opts \\ []) do
optional_params = %{
:alt => :query,
:fields => :query,
:key => :query,
:oauth_token => :query,
:prettyPrint => :query,
:quotaUser => :query,
:userIp => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/init")
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Spectrum.V1explorer.Model.PawsInitResponse{})
end
@doc """
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.
## Parameters
- connection (GoogleApi.Spectrum.V1explorer.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for the response.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
- :userIp (String.t): Deprecated. Please use quotaUser instead.
- :body (PawsNotifySpectrumUseRequest):
## Returns
{:ok, %GoogleApi.Spectrum.V1explorer.Model.PawsNotifySpectrumUseResponse{}} on success
{:error, info} on failure
"""
@spec spectrum_paws_notify_spectrum_use(Tesla.Env.client(), keyword()) ::
{:ok, GoogleApi.Spectrum.V1explorer.Model.PawsNotifySpectrumUseResponse.t()}
| {:error, Tesla.Env.t()}
def spectrum_paws_notify_spectrum_use(connection, opts \\ []) do
optional_params = %{
:alt => :query,
:fields => :query,
:key => :query,
:oauth_token => :query,
:prettyPrint => :query,
:quotaUser => :query,
:userIp => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/notifySpectrumUse")
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(
struct: %GoogleApi.Spectrum.V1explorer.Model.PawsNotifySpectrumUseResponse{}
)
end
@doc """
The Google Spectrum Database implements registration in the getSpectrum method. As such this always returns an UNIMPLEMENTED error.
## Parameters
- connection (GoogleApi.Spectrum.V1explorer.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for the response.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
- :userIp (String.t): Deprecated. Please use quotaUser instead.
- :body (PawsRegisterRequest):
## Returns
{:ok, %GoogleApi.Spectrum.V1explorer.Model.PawsRegisterResponse{}} on success
{:error, info} on failure
"""
@spec spectrum_paws_register(Tesla.Env.client(), keyword()) ::
{:ok, GoogleApi.Spectrum.V1explorer.Model.PawsRegisterResponse.t()}
| {:error, Tesla.Env.t()}
def spectrum_paws_register(connection, opts \\ []) do
optional_params = %{
:alt => :query,
:fields => :query,
:key => :query,
:oauth_token => :query,
:prettyPrint => :query,
:quotaUser => :query,
:userIp => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/register")
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Spectrum.V1explorer.Model.PawsRegisterResponse{})
end
@doc """
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.
## Parameters
- connection (GoogleApi.Spectrum.V1explorer.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for the response.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
- :userIp (String.t): Deprecated. Please use quotaUser instead.
- :body (PawsVerifyDeviceRequest):
## Returns
{:ok, %GoogleApi.Spectrum.V1explorer.Model.PawsVerifyDeviceResponse{}} on success
{:error, info} on failure
"""
@spec spectrum_paws_verify_device(Tesla.Env.client(), keyword()) ::
{:ok, GoogleApi.Spectrum.V1explorer.Model.PawsVerifyDeviceResponse.t()}
| {:error, Tesla.Env.t()}
def spectrum_paws_verify_device(connection, opts \\ []) do
optional_params = %{
:alt => :query,
:fields => :query,
:key => :query,
:oauth_token => :query,
:prettyPrint => :query,
:quotaUser => :query,
:userIp => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/verifyDevice")
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Spectrum.V1explorer.Model.PawsVerifyDeviceResponse{})
end
end