Import refactored library. See MIGRATING.MD for details

This commit is contained in:
Steven Bazyl 2015-04-16 17:28:38 -07:00
parent 9b7809174d
commit f584a2cec8
373 changed files with 255715 additions and 474 deletions

2
.rspec
View File

@ -1,2 +1,2 @@
--colour
--color
--format documentation

7
.rubocop.yml Normal file
View File

@ -0,0 +1,7 @@
inherit_from: .rubocop_todo.yml
Metrics/LineLength:
Max: 120
Style/FormatString:
EnforcedStyle: sprintf

63
.rubocop_todo.yml Normal file
View File

@ -0,0 +1,63 @@
# This configuration was generated by `rubocop --auto-gen-config`
# on 2015-03-25 23:30:36 -0700 using RuboCop version 0.29.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
# Offense count: 19
Metrics/AbcSize:
Max: 79
# Offense count: 2
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 220
# Offense count: 5
Metrics/CyclomaticComplexity:
Max: 10
# Offense count: 99
# Configuration parameters: AllowURI, URISchemes.
Metrics/LineLength:
Max: 127
# Offense count: 18
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 43
# Offense count: 1
# Configuration parameters: CountKeywordArgs.
Metrics/ParameterLists:
Max: 6
# Offense count: 4
Metrics/PerceivedComplexity:
Max: 11
# Offense count: 14
Style/Documentation:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
Style/EmptyLines:
Enabled: false
# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/EmptyLinesAroundClassBody:
Enabled: false
# Offense count: 2
# Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles.
Style/Next:
Enabled: false
# Offense count: 3
# Cop supports --auto-correct.
Style/RedundantSelf:
Enabled: false

View File

@ -3,15 +3,13 @@ rvm:
- 2.2
- 2.0.0
- 2.1
- 1.9.3
- rbx-2
- jruby
- jruby-9000
env:
- RAILS_VERSION="~>3.2"
- RAILS_VERSION="~>4.0.0"
- RAILS_VERSION="~>4.1.0"
- RAILS_VERSION="~>4.2.0"
script: "bundle exec rake spec:all"
script: "rake spec:all"
before_install:
- sudo apt-get update
- sudo apt-get install idn

View File

@ -1,7 +1,12 @@
--markup markdown
--hide-void-return
--no-private
--verbose
--markup-provider=redcarpet
--markup=markdown
lib/**/*.rb
ext/**/*.c
generated/**/*.rb
-
README.md
CHANGELOG.md
MIGRATING.md
CONTRIBUTING.md
LICENSE

View File

@ -1,3 +1,9 @@
# 0.9.0
* WARNING: Please see [MIGRATING](MIGRATING.md) for important information.
* API classes are now generated ahead of time instead of at runtime.
* Drop support for Ruby versions < 2.0
* Switch from Faraday to Hurley for HTTP client
# 0.8.6
* Use discovered 'rootUrl' as base URI for services
* Respect discovered methods with colons in path
@ -27,7 +33,7 @@
* Batch requests with the service interface now inherit the service's connection
* `register_discover_document` now returns the API instance
* Added `:proxy` option to set Faraday's HTTP proxy setting
* Added `:faraday_options` option to allow passthrough settings to Faraday connection
* Added `:faraday_option` option to allow passthrough settings to Faraday connection
* Drop 1.8.x support
* This will be the last release with 1.9.x support

View File

@ -2,7 +2,7 @@
## Contributor License Agreements
We'd love to accept your sample apps and patches! Before we can take them, we
We'd love to accept your sample apps and patches! Before we can take them, we
have to jump a couple of legal hurdles.
Please fill out either the individual or corporate Contributor License Agreement
@ -29,4 +29,3 @@ accept your pull requests.
1. Ensure that your code is clear and comprehensible.
1. Ensure that your code has an appropriate set of unit tests which all pass.
1. Submit a pull request.

30
Gemfile
View File

@ -1,9 +1,35 @@
source 'https://rubygems.org'
# Specify your gem's dependencies in google-apis.gemspec
gemspec
gem 'jruby-openssl', :platforms => :jruby
group :development do
gem 'bundler', '~> 1.7'
gem 'rake', '~> 10.0'
gem 'rspec', '~> 3.1'
gem 'json_spec', '~> 1.1'
gem 'webmock', '~> 1.21'
gem 'simplecov', '~> 0.9'
gem 'coveralls', '~> 0.7.11'
gem 'rubocop', '~> 0.29'
gem 'launchy', '~> 2.4'
end
platforms :jruby do
group :development do
gem 'jruby-openssl'
end
end
platforms :ruby do
group :development do
gem 'yard', '~> 0.8'
gem 'redcarpet', '~> 3.2'
gem 'github-markup', '~> 1.3'
end
end
if ENV['RAILS_VERSION']
gem 'rails', ENV['RAILS_VERSION']
end
end

171
MIGRATING.md Normal file
View File

@ -0,0 +1,171 @@
# Migrating from version `0.8.x` to `0.9`
Many changes and improvements have been made to the `google-api-ruby-client`
library to bring it to `0.9`. If you are starting a new project or haven't used
this library before version `0.9`, see the [README][readme] to get started
as you won't need to migrate anything.
Code written against the `0.8.x` version of this library will not work with the `0.9`
version without modification.
## Discovery
In `0.8.x` the library would "discover" APIs on the fly, introducing
additional network calls and instability. That has been fixed in `0.9`.
To get the `drive` client in `0.8.x` required this:
```ruby
require 'google/api_client'
client = Google::APIClient.new
drive = client.discovered_api('drive', 'v2')
```
In `0.9` the same thing can be accomplished like this:
```ruby
require 'google/apis/drive_v2'
drive = Google::Apis::DriveV2::DriveService.new
```
All APIs are immediately accessible without requiring additional network calls or runtime code generation.
## API Methods
The calling style for API methods has changed. In `0.8.x` all calls were via a generic `execute` method. In `0.9`
the generated services have fully defined method signatures for all available methods.
To get a file using the Google Drive API in `0.8.x` required this:
```ruby
file = client.execute(:api_method => drive.file.get, :parameters => { 'id' => 'abc123' })
```
In `0.9` the same thing can be accomplished like this:
```ruby
file = drive.get_file('abc123')
```
Full API definitions including available methods, parameters, and data classes can be found in the `generated` directory.
## Authorization
In the 0.9 version of this library, the authentication and authorization code was moved
to the new [googleauth](https://github.com/google/google-auth-library-ruby) library. While the new library provides
significantly simpler APIs for some use cases, not all features have been migrated. Missing features
are expected to be added by end of Q2 2015.
The underlying [Signet](https://github.com/google/signet) is still used for authorization. OAuth 2 credentials obtained
previously will continue to work with the `0.9` version. OAuth 1 is no longer supported.
## Media uploads
Media uploads are significantly simpler in `0.9`.
The old `0.8.x` way of uploading media:
```ruby
media = Google::APIClient::UploadIO.new('mymovie.m4v', 'video/mp4')
metadata = {
'title' => 'My movie',
'description' => 'The best home movie ever made'
}
client.execute(:api_method => drive.files.insert,
:parameters => { 'uploadType' => 'multipart' },
:body_object => metadata,
:media => media )
```
The new way in `0.9` using `upload_source` and `content_type` parameters:
```ruby
metadata = {
title: 'My movie',
description: 'The best home movie ever made'
}
drive.insert_file(metadata, upload_source: 'mymovie.m4v', content_type: 'video/mp4')
```
`upload_source` can be either a path to a file, an `IO` stream, or a `StringIO` instance.
Uploads are resumable and will be automatically retried if interrupted.
## Media downloads
`0.9` introduces support for media downloads (`alt=media`). To download content, use the `download_dest` parameter:
```ruby
drive.get_file('abc123', download_dest: '/tmp/myfile.txt')
```
`download_dest` may be either a path to a file or an `IO` stream.
## Batch Requests
The old `0.8.x` way of performing batch requests:
```ruby
client = Google::APIClient.new
urlshortener = client.discovered_api('urlshortener')
batch = Google::APIClient::BatchRequest.new do |result|
puts result.data
end
batch.add(:api_method => urlshortener.url.insert,
:body_object => { 'longUrl' => 'http://example.com/foo' })
batch.add(:api_method => urlshortener.url.insert,
:body_object => { 'longUrl' => 'http://example.com/bar' })
client.execute(batch)
```
In `0.9`, the equivalent code is:
```ruby
require 'google/apis/urlshortner_v1'
urlshortener = Google::Apis::UrlshortenerV1::UrlshortenerService.new
urlshortener.batch do |urlshortener|
urlshortner.insert_url({long_url: 'http://example.com/foo'}) do |res, err|
puts res
end
urlshortner.insert_url({long_url: 'http://example.com/bar'}) do |res, err|
puts res
end
end
```
Or if sharing the same block:
```ruby
require 'google/apis/urlshortner_v1'
urlshortener = Google::Apis::UrlshortenerV1::UrlshortenerService.new
callback = lambda { |res, err| puts res }
urlshortener.batch do |urlshortener|
urlshortner.insert_url({long_url: 'http://example.com/foo'}, &callback)
urlshortner.insert_url({long_url: 'http://example.com/bar'}, &callback)
end
```
## JRuby
Jruby 1.7.4 in 2.0 compatibility mode is supported. To enable for a specific script:
```
jruby --2.0 myscript.rb
```
Or set as the default:
```
export JRUBY_OPTS=--2.0
```
JRuby 9000 will be supported once released.

368
README.md
View File

@ -1,218 +1,226 @@
# Google API Client
<dl>
<dt>Homepage</dt><dd><a href="http://www.github.com/google/google-api-ruby-client">http://www.github.com/google/google-api-ruby-client</a></dd>
<dt>Authors</dt><dd>Bob Aman, <a href="mailto:sbazyl@google.com">Steven Bazyl</a></dd>
<dt>Copyright</dt><dd>Copyright © 2011 Google, Inc.</dd>
<dt>License</dt><dd>Apache 2.0</dd>
</dl>
[![Build Status](https://secure.travis-ci.org/google/google-api-ruby-client.png)](http://travis-ci.org/google/google-api-ruby-client)
[![Dependency Status](https://gemnasium.com/google/google-api-ruby-client.png)](https://gemnasium.com/google/google-api-ruby-client)
## Description
The Google API Ruby Client makes it trivial to discover and access supported
APIs.
## Alpha
This library is in Alpha. We will make an effort to support the library, but we reserve the right to make incompatible changes when necessary.
This library is in Alpha. We will make an effort to support the library, but we reserve the right to make incompatible
changes when necessary.
## Install
## Migrating from 0.8.x
Be sure `https://rubygems.org/` is in your gem sources.
Version 0.9 is not compatible with previous versions. See [MIGRATING](MIGRATING.md) for additional details on how to
migrate to the latest version.
For normal client usage, this is sufficient:
## Installation
```bash
$ gem install google-api-client
```
## Example Usage
Add this line to your application's Gemfile:
```ruby
require 'google/api_client'
require 'google/api_client/client_secrets'
require 'google/api_client/auth/installed_app'
# Initialize the client.
client = Google::APIClient.new(
:application_name => 'Example Ruby application',
:application_version => '1.0.0'
)
# Initialize Google+ API. Note this will make a request to the
# discovery service every time, so be sure to use serialization
# in your production code. Check the samples for more details.
plus = client.discovered_api('plus')
# Load client secrets from your client_secrets.json.
client_secrets = Google::APIClient::ClientSecrets.load
# Run installed application flow. Check the samples for a more
# complete example that saves the credentials between runs.
flow = Google::APIClient::InstalledAppFlow.new(
:client_id => client_secrets.client_id,
:client_secret => client_secrets.client_secret,
:scope => ['https://www.googleapis.com/auth/plus.me']
)
client.authorization = flow.authorize
# Make an API call.
result = client.execute(
:api_method => plus.activities.list,
:parameters => {'collection' => 'public', 'userId' => 'me'}
)
puts result.data
gem 'google-api-client'
```
## API Features
And then execute:
### API Discovery
$ bundle
To take full advantage of the client, load API definitions prior to use. To load an API:
Or install it yourself as:
$ gem install google-api-client
## Usage
### Basic usage
To use an API, include the corresponding generated file and instantiate the service. For example to use the Drive API:
```ruby
urlshortener = client.discovered_api('urlshortener')
```
require 'google/apis/drive_v2'
Specific versions of the API can be loaded as well:
Drive = Google::Apis::DriveV2 # Alias the module
drive = Drive::DriveService.new
drive.authorization = authorization # See Googleauth or Signet libraries
```ruby
drive = client.discovered_api('drive', 'v2')
```
Locally cached discovery documents may be used as well. To load an API from a local file:
```ruby
# Output discovery document to JSON
File.open('my-api.json', 'w') do |f| f.puts MultiJson.dump(client.discovery_document('myapi', 'v1')) end
# Read discovery document and load API
doc = File.read('my-api.json')
client.register_discovery_document('myapi', 'v1', doc)
my_api = client.discovered_api('myapi', 'v1')
```
### Authorization
Most interactions with Google APIs require users to authorize applications via OAuth 2.0. The client library uses [Signet](https://github.com/google/signet) to handle most aspects of authorization. For additional details about Google's OAuth support, see [Google Developers](https://developers.google.com/accounts/docs/OAuth2).
Credentials can be managed at the connection level, as shown, or supplied on a per-request basis when calling `execute`.
For server-to-server interactions, like those between a web application and Google Cloud Storage, Prediction, or BigQuery APIs, use service accounts.
As of version 0.8.3, service accounts can be configured using
[Application Default Credentials][1], which rely on the credentials being
available in a well-known location. If the credentials are not present
and it's being used on a Compute Engine VM, it will use the VM's default credentials.
```ruby
client.authorization = :google_app_default # in a later version, this will become the default
client.authorization.fetch_access_token!
client.execute(...)
```
This is simpler API to use than in previous versions, although that is still available:
```ruby
key = Google::APIClient::KeyUtils.load_from_pkcs12('client.p12', 'notasecret')
client.authorization = Signet::OAuth2::Client.new(
:token_credential_uri => 'https://accounts.google.com/o/oauth2/token',
:audience => 'https://accounts.google.com/o/oauth2/token',
:scope => 'https://www.googleapis.com/auth/prediction',
:issuer => '123456-abcdef@developer.gserviceaccount.com',
:signing_key => key)
client.authorization.fetch_access_token!
client.execute(...)
```
Service accounts are also used for delegation in Google Apps domains. The target user for impersonation is specified by setting the `:person` parameter to the user's email address
in the credentials. Detailed instructions on how to enable delegation for your domain can be found at [developers.google.com](https://developers.google.com/drive/delegation).
### Automatic Retries & Backoff
The API client can automatically retry requests for recoverable errors. To enable retries, set the `client.retries` property to
the number of additional attempts. To avoid flooding servers, retries invovle a 1 second delay that increases on each subsequent retry.
In the case of authentication token expiry, the API client will attempt to refresh the token and retry the failed operation - this
is a specific exception to the retry rules.
The default value for retries is 0, but will be enabled by default in future releases.
### Batching Requests
Some Google APIs support batching requests into a single HTTP request. Use `Google::APIClient::BatchRequest`
to bundle multiple requests together.
Example:
```ruby
client = Google::APIClient.new
urlshortener = client.discovered_api('urlshortener')
batch = Google::APIClient::BatchRequest.new do |result|
puts result.data
# Search for files in Drive (first page only)
files = drive.list_files(q: "title contains 'finances'")
files.items.each do |file|
puts file.title
end
batch.add(:api_method => urlshortener.url.insert,
:body_object => { 'longUrl' => 'http://example.com/foo' })
batch.add(:api_method => urlshortener.url.insert,
:body_object => { 'longUrl' => 'http://example.com/bar' })
client.execute(batch)
# Upload a file
metadata = Drive::File.new(title: 'My document')
metadata = drive.insert_file(metadata, upload_source: 'test.txt', content_type: 'text/plain')
# Download a file
drive.get_file(metadata.id, download_dest: '/tmp/myfile.txt')
```
Blocks for handling responses can be specified either at the batch level or when adding an individual API call. For example:
### Media
Methods that allow media operations have additional parameters to specify the upload source or download destination.
For uploads, the `upload_source` parameter can be specified with either a path to a file, an `IO` stream, or `StringIO`
instance.
For downloads, the `download_dest` parameter can also be either a path to a file, an `IO` stream, or `StringIO` instance.
Both uploads & downloads are resumable. If an error occurs during transmission the request will be automatically
retried from the last received byte.
### Errors & Retries
Retries are disabled by default, but enabling retries is strongly encouraged. The number of retries can be configured
via `Google::Apis::RequestOptions`. Any number greater than 0 will enable retries.
To enable retries for all services:
```ruby
batch.add(:api_method=>urlshortener.url.insert, :body_object => { 'longUrl' => 'http://example.com/bar' }) do |result|
puts result.data
Google::Apis::RequestOptions.default.retries = 5
```
With retries enabled globally, retries can be disabled for specific calls by including a retry value of 0 in the
request options:
```ruby
drive.insert_file(metadata, upload_source: 'test.txt', content_type: 'text/plain', options: { retries: 0 })
```
When retries are enabled, if a server or rate limit error occurs during a request it is automatically retried with
an exponentially increasing delay on subsequent retries. If a request can not be retried or if the maximum number
of retries is exceeded, an exception is thrown.
### Callbacks
A block an be specified when making calls. If present, the block will be called with the result or error, rather than
returning the result from the call or raising the error. Example:
```ruby
# Search for files in Drive (first page only)
drive.list_files(q: "title contains 'finances'") do |res, err|
if err
# Handle error
else
# Handle response
end
end
```
### Media Upload
This calling style is required when making batch requests as responses are not available until the entire batch
is complete.
### Batches
Multiple requests can be batched together into a single HTTP request to reduce overhead. Batched calls are executed
in parallel and the responses processed once all results are available
For APIs that support file uploads, use `Google::APIClient::UploadIO` to load the stream. Both multipart and resumable
uploads can be used. For example, to upload a file to Google Drive using multipart
```ruby
drive = client.discovered_api('drive', 'v2')
media = Google::APIClient::UploadIO.new('mymovie.m4v', 'video/mp4')
metadata = {
'title' => 'My movie',
'description' => 'The best home movie ever made'
}
client.execute(:api_method => drive.files.insert,
:parameters => { 'uploadType' => 'multipart' },
:body_object => metadata,
:media => media )
```
To use resumable uploads, change the `uploadType` parameter to `resumable`. To check the status of the upload
and continue if necessary, check `result.resumable_upload`.
```ruby
client.execute(:api_method => drive.files.insert,
:parameters => { 'uploadType' => 'resumable' },
:body_object => metadata,
:media => media )
upload = result.resumable_upload
# Resume if needed
if upload.resumable?
client.execute(upload)
# Fetch a bunch of files by ID
ids = ['file_id_1', 'file_id_2', 'file_id_3', 'file_id_4']
drive.batch do |drive|
ids.each do |id|
drive.get_file(id) do |res, err|
# Handle response
end
end
end
```
## Samples
Media operations -- uploads & downloads -- can not be included in batch with other requests.
See the full list of [samples on Github](https://github.com/google/google-api-ruby-client-samples).
However, some APIs support batch uploads. To upload multiple files in a batch, use the `batch_upload` method instead.
Batch uploads should only be used when uploading multiple small files. For large files, upload files individually to
take advantage of the libraries built-in reusmable upload support.
### Hashes
While the API will always return instances of schema classes, plain hashes are accepted in method calls for
convenience. Hash keys must be symbols matching the attribute names on the corresponding object the hash is meant
to replace. For example:
```ruby
file = {id: '123', title: 'My document', labels: { starred: true }}
file = drive.insert_file(file) # Returns a Drive::File instance
```
is equivalent to:
```ruby
file = Drive::File.new(id: '123', title: 'My document')
file.labels = Drive::File::Labels.new(starred: true)
file = drive.update_file(file) # Returns a Drive::File instance
```
## Authorization
[OAuth 2](https://developers.google.com/accounts/docs/OAuth2) is used to authorize applications. This library uses
both [Signet](https://github.com/google/signet) and
[Google Auth Library for Ruby](https://github.com/google/google-auth-library-ruby) for OAuth 2 support.
The [Google Auth Library for Ruby](https://github.com/google/google-auth-library-ruby) provides an implementation of
[application default credentials] for Ruby. It offers a simple way to get authorization credentials for use in
calling Google APIs, best suited for cases when the call needs to have the same identity
and authorization level for the application independent of the user. This is
the recommended approach to authorize calls to Cloud APIs, particularly when
you're building an application that uses Google Compute Engine.
For per-user authorization, use [Signet](https://github.com/google/signet) to obtain user authorization.
### Passing authorization to requests
Authorization can be specified for the entire client, for an individual service instance, or on a per-request basis.
Set authorization for all service:
```ruby
Google::Apis::RequestOptions.default.authorization = authorization
# Services instantiated after this will inherit the authorization
```
On a per-service level:
```ruby
drive = Google::Apis::DriveV2::DriveService.new
drive.authorization = authorization
# All requests made with this service will use the same authorization
```
Per-request:
```ruby
drive.get_file('123', options: { authorization: authorization })
```
## Generating APIs
For [Cloud Endpoints](https://cloud.google.com/endpoints/) or other APIs not included in the gem, ruby code can be
generated from the discovery document.
To generate from a local discovery file:
$ generate-api gen <outdir> --file=<path>
A URL can also be specified:
$ generate-api gen <outdir> --url=<url>
## TODO
* ETag support (if-not-modified)
* Auto-paging results (maybe)
* Caching
* Model validations
## License
This library is licensed under Apache 2.0. Full license text is
available in [LICENSE.txt](LICENSE.txt).
## Contributing
See [CONTRIBUTING](contributing).
## Support
Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
[1]: https://developers.google.com/accounts/docs/application-default-credentials
Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't
hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs
on [StackOverflow](http://stackoverflow.com).

View File

@ -1,41 +1,2 @@
# -*- ruby -*-
lib_dir = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib_dir)
$LOAD_PATH.uniq!
require "bundler/gem_tasks"
require 'bundler/gem_tasks'
require 'rubygems'
require 'rake'
require File.join(File.dirname(__FILE__), 'lib/google/api_client', 'version')
PKG_DISPLAY_NAME = 'Google API Client'
PKG_NAME = PKG_DISPLAY_NAME.downcase.gsub(/\s/, '-')
PKG_VERSION = Google::APIClient::VERSION::STRING
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
PKG_HOMEPAGE = 'https://github.com/google/google-api-ruby-client'
RELEASE_NAME = "REL #{PKG_VERSION}"
PKG_AUTHOR = ["Bob Aman", "Steve Bazyl"]
PKG_AUTHOR_EMAIL = "sbazyl@google.com"
PKG_SUMMARY = 'Package Summary'
PKG_DESCRIPTION = <<-TEXT
The Google API Ruby Client makes it trivial to discover and access supported
APIs.
TEXT
list = FileList[
'lib/**/*', 'spec/**/*', 'vendor/**/*',
'tasks/**/*', 'website/**/*',
'[A-Z]*', 'Rakefile'
].exclude(/[_\.]git$/)
(open(".gitignore") { |file| file.read }).split("\n").each do |pattern|
list.exclude(pattern)
end
PKG_FILES = list
task :default => 'spec'
WINDOWS = (RUBY_PLATFORM =~ /mswin|win32|mingw|bccwin|cygwin/) rescue false
SUDO = WINDOWS ? '' : ('sudo' unless ENV['SUDOLESS'])

871
api_names.yaml Normal file
View File

@ -0,0 +1,871 @@
---
"/adexchangebuyer:v1.3/PerformanceReport/latency50thPercentile": latency_50th_percentile
"/adexchangebuyer:v1.3/PerformanceReport/latency85thPercentile": latency_85th_percentile
"/adexchangebuyer:v1.3/PerformanceReport/latency95thPercentile": latency_95th_percentile
"/adexchangeseller:v2.0/adexchangeseller.accounts.adclients.list": list_account_ad_clients
"/adexchangeseller:v2.0/adexchangeseller.accounts.customchannels.get": get_account_custom_channel
"/adexchangeseller:v2.0/adexchangeseller.accounts.customchannels.list": list_account_custom_channels
"/adexchangeseller:v2.0/adexchangeseller.accounts.metadata.dimensions.list": list_account_metadata_dimensions
"/adexchangeseller:v2.0/adexchangeseller.accounts.metadata.metrics.list": list_account_metadata_metrics
"/adexchangeseller:v2.0/adexchangeseller.accounts.preferreddeals.get": get_account_preferred_deal
"/adexchangeseller:v2.0/adexchangeseller.accounts.preferreddeals.list": list_account_preferred_deals
"/adexchangeseller:v2.0/adexchangeseller.accounts.reports.saved.generate": generate_account_saved_report
"/adexchangeseller:v2.0/adexchangeseller.accounts.reports.saved.list": list_account_saved_reports
"/adexchangeseller:v2.0/adexchangeseller.accounts.urlchannels.list": list_account_url_channels
"/admin:directory_v1/directory.chromeosdevices.get": get_chrome_os_device
"/admin:directory_v1/directory.chromeosdevices.list": list_chrome_os_devices
"/admin:directory_v1/directory.chromeosdevices.patch": patch_chrome_os_device
"/admin:directory_v1/directory.chromeosdevices.update": update_chrome_os_device
"/admin:directory_v1/directory.groups.aliases.delete/alias": group_alias
"/admin:directory_v1/directory.mobiledevices.action": action_mobile_device
"/admin:directory_v1/directory.mobiledevices.delete": delete_mobile_device
"/admin:directory_v1/directory.mobiledevices.get": get_mobile_device
"/admin:directory_v1/directory.mobiledevices.list": list_mobile_devices
"/admin:directory_v1/directory.orgunits.delete": delete_org_unit
"/admin:directory_v1/directory.orgunits.get": get_org_unit
"/admin:directory_v1/directory.orgunits.insert": insert_org_unit
"/admin:directory_v1/directory.orgunits.list": list_org_units
"/admin:directory_v1/directory.orgunits.patch": patch_org_unit
"/admin:directory_v1/directory.orgunits.update": update_org_unit
"/admin:directory_v1/directory.users.aliases.delete/alias": user_alias
"/adsense:v1.4/AdsenseReportsGenerateResponse": generate_report_response
"/adsense:v1.4/adsense.accounts.adclients.list": list_account_ad_clients
"/adsense:v1.4/adsense.accounts.adunits.customchannels.list": list_account_ad_unit_custom_channels
"/adsense:v1.4/adsense.accounts.adunits.get": get_account_ad_unit
"/adsense:v1.4/adsense.accounts.adunits.getAdCode": get_account_ad_unit_ad_code
"/adsense:v1.4/adsense.accounts.adunits.list": list_account_ad_units
"/adsense:v1.4/adsense.accounts.customchannels.adunits.list": list_account_custom_channel_ad_units
"/adsense:v1.4/adsense.accounts.customchannels.get": get_account_custom_channel
"/adsense:v1.4/adsense.accounts.customchannels.list": list_account_custom_channels
"/adsense:v1.4/adsense.accounts.reports.saved.generate": generate_account_saved_report
"/adsense:v1.4/adsense.accounts.reports.saved.list": list_account_saved_reports
"/adsense:v1.4/adsense.accounts.savedadstyles.get": get_account_saved_ad_style
"/adsense:v1.4/adsense.accounts.savedadstyles.list": list_account_saved_ad_styles
"/adsense:v1.4/adsense.accounts.urlchannels.list": list_account_url_channels
"/adsense:v1.4/adsense.adclients.list": list_ad_clients
"/adsense:v1.4/adsense.adunits.customchannels.list": list_ad_unit_custom_channels
"/adsense:v1.4/adsense.adunits.get": get_ad_unit
"/adsense:v1.4/adsense.adunits.getAdCode": get_ad_code_ad_unit
"/adsense:v1.4/adsense.adunits.list": list_ad_units
"/adsense:v1.4/adsense.customchannels.adunits.list": list_custom_channel_ad_units
"/adsense:v1.4/adsense.customchannels.get": get_custom_channel
"/adsense:v1.4/adsense.customchannels.list": list_custom_channels
"/adsense:v1.4/adsense.metadata.dimensions.list": list_metadata_dimensions
"/adsense:v1.4/adsense.metadata.metrics.list": list_metadata_metrics
"/adsense:v1.4/adsense.reports.saved.generate": generate_saved_report
"/adsense:v1.4/adsense.reports.saved.list": list_saved_reports
"/adsense:v1.4/adsense.savedadstyles.get": get_saved_ad_style
"/adsense:v1.4/adsense.savedadstyles.list": list_saved_ad_styles
"/adsense:v1.4/adsense.urlchannels.list": list_url_channels
"/adsensehost:v4.1/adsensehost.accounts.adclients.get": get_account_ad_client
"/adsensehost:v4.1/adsensehost.accounts.adclients.list": list_account_ad_clients
"/adsensehost:v4.1/adsensehost.accounts.adunits.delete": delete_account_ad_unit
"/adsensehost:v4.1/adsensehost.accounts.adunits.get": get_account_ad_unit
"/adsensehost:v4.1/adsensehost.accounts.adunits.getAdCode": get_account_ad_unit_ad_code
"/adsensehost:v4.1/adsensehost.accounts.adunits.insert": insert_account_ad_unit
"/adsensehost:v4.1/adsensehost.accounts.adunits.list": list_account_ad_units
"/adsensehost:v4.1/adsensehost.accounts.adunits.patch": patch_account_ad_unit
"/adsensehost:v4.1/adsensehost.accounts.adunits.update": update_account_ad_unit
"/adsensehost:v4.1/adsensehost.adclients.get": get_ad_client
"/adsensehost:v4.1/adsensehost.adclients.list": list_ad_clients
"/adsensehost:v4.1/adsensehost.associationsessions.start": start_association_session
"/adsensehost:v4.1/adsensehost.associationsessions.verify": verify_association_session
"/adsensehost:v4.1/adsensehost.customchannels.delete": delete_custom_channel
"/adsensehost:v4.1/adsensehost.customchannels.get": get_custom_channel
"/adsensehost:v4.1/adsensehost.customchannels.insert": insert_custom_channel
"/adsensehost:v4.1/adsensehost.customchannels.list": list_custom_channels
"/adsensehost:v4.1/adsensehost.customchannels.patch": patch_custom_channel
"/adsensehost:v4.1/adsensehost.customchannels.update": update_custom_channel
"/adsensehost:v4.1/adsensehost.urlchannels.delete": delete_url_channel
"/adsensehost:v4.1/adsensehost.urlchannels.insert": insert_url_channel
"/adsensehost:v4.1/adsensehost.urlchannels.list": list_url_channels
"/analytics:v3/AnalyticsDataimportDeleteUploadDataRequest": delete_upload_data_request
"/analytics:v3/UnsampledReport/cloudStorageDownloadDetails/objectId": obj_id
"/analytics:v3/analytics.data.ga.get": get_ga_data
"/analytics:v3/analytics.data.mcf.get": get_mcf_data
"/analytics:v3/analytics.data.realtime.get": get_realtime_data
"/analytics:v3/analytics.management.accountSummaries.list": list_account_summaries
"/analytics:v3/analytics.management.accountUserLinks.delete": delete_account_user_link
"/analytics:v3/analytics.management.accountUserLinks.insert": insert_account_user_link
"/analytics:v3/analytics.management.accountUserLinks.list": list_account_user_links
"/analytics:v3/analytics.management.accountUserLinks.update": update_account_user_link
"/analytics:v3/analytics.management.accounts.list": list_accounts
"/analytics:v3/analytics.management.customDataSources.list": list_custom_data_sources
"/analytics:v3/analytics.management.customDimensions.get": get_custom_dimension
"/analytics:v3/analytics.management.customDimensions.insert": insert_custom_dimension
"/analytics:v3/analytics.management.customDimensions.list": list_custom_dimensions
"/analytics:v3/analytics.management.customDimensions.patch": patch_custom_dimension
"/analytics:v3/analytics.management.customDimensions.update": update_custom_dimension
"/analytics:v3/analytics.management.customMetrics.get": get_custom_metric
"/analytics:v3/analytics.management.customMetrics.insert": insert_custom_metric
"/analytics:v3/analytics.management.customMetrics.list": list_custom_metrics
"/analytics:v3/analytics.management.customMetrics.patch": patch_custom_metric
"/analytics:v3/analytics.management.customMetrics.update": update_custom_metric
"/analytics:v3/analytics.management.experiments.delete": delete_experiment
"/analytics:v3/analytics.management.experiments.get": get_experiment
"/analytics:v3/analytics.management.experiments.insert": insert_experiment
"/analytics:v3/analytics.management.experiments.list": list_experiments
"/analytics:v3/analytics.management.experiments.patch": patch_experiment
"/analytics:v3/analytics.management.experiments.update": update_experiment
"/analytics:v3/analytics.management.filters.delete": delete_filter
"/analytics:v3/analytics.management.filters.get": get_filter
"/analytics:v3/analytics.management.filters.insert": insert_filter
"/analytics:v3/analytics.management.filters.list": list_filters
"/analytics:v3/analytics.management.filters.patch": patch_filter
"/analytics:v3/analytics.management.filters.update": update_filter
"/analytics:v3/analytics.management.goals.get": get_goal
"/analytics:v3/analytics.management.goals.insert": insert_goal
"/analytics:v3/analytics.management.goals.list": list_goals
"/analytics:v3/analytics.management.goals.patch": patch_goal
"/analytics:v3/analytics.management.goals.update": update_goal
"/analytics:v3/analytics.management.profileFilterLinks.delete": delete_profile_filter_link
"/analytics:v3/analytics.management.profileFilterLinks.get": get_profile_filter_link
"/analytics:v3/analytics.management.profileFilterLinks.insert": insert_profile_filter_link
"/analytics:v3/analytics.management.profileFilterLinks.list": list_profile_filter_links
"/analytics:v3/analytics.management.profileFilterLinks.patch": patch_profile_filter_link
"/analytics:v3/analytics.management.profileFilterLinks.update": update_profile_filter_link
"/analytics:v3/analytics.management.profileUserLinks.delete": delete_profile_user_link
"/analytics:v3/analytics.management.profileUserLinks.insert": insert_profile_user_link
"/analytics:v3/analytics.management.profileUserLinks.list": list_profile_user_links
"/analytics:v3/analytics.management.profileUserLinks.update": update_profile_user_link
"/analytics:v3/analytics.management.profiles.delete": delete_profile
"/analytics:v3/analytics.management.profiles.get": get_profile
"/analytics:v3/analytics.management.profiles.insert": insert_profile
"/analytics:v3/analytics.management.profiles.list": list_profiles
"/analytics:v3/analytics.management.profiles.patch": patch_profile
"/analytics:v3/analytics.management.profiles.update": update_profile
"/analytics:v3/analytics.management.segments.list": list_segments
"/analytics:v3/analytics.management.unsampledReports.get": get_unsampled_report
"/analytics:v3/analytics.management.unsampledReports.insert": insert_unsampled_report
"/analytics:v3/analytics.management.unsampledReports.list": list_unsampled_reports
"/analytics:v3/analytics.management.uploads.deleteUploadData": delete_upload_data
"/analytics:v3/analytics.management.uploads.get": get_upload
"/analytics:v3/analytics.management.uploads.list": list_uploads
"/analytics:v3/analytics.management.uploads.uploadData": upload_data
"/analytics:v3/analytics.management.webPropertyAdWordsLinks.delete": delete_web_property_ad_words_link
"/analytics:v3/analytics.management.webPropertyAdWordsLinks.get": get_web_property_ad_words_link
"/analytics:v3/analytics.management.webPropertyAdWordsLinks.insert": insert_web_property_ad_words_link
"/analytics:v3/analytics.management.webPropertyAdWordsLinks.list": list_web_property_ad_words_links
"/analytics:v3/analytics.management.webPropertyAdWordsLinks.patch": patch_web_property_ad_words_link
"/analytics:v3/analytics.management.webPropertyAdWordsLinks.update": update_web_property_ad_words_link
"/analytics:v3/analytics.management.webproperties.get": get_web_property
"/analytics:v3/analytics.management.webproperties.insert": insert_web_property
"/analytics:v3/analytics.management.webproperties.list": list_web_properties
"/analytics:v3/analytics.management.webproperties.patch": patch_web_property
"/analytics:v3/analytics.management.webproperties.update": update_web_property
"/analytics:v3/analytics.management.webpropertyUserLinks.delete": delete_web_property_user_link
"/analytics:v3/analytics.management.webpropertyUserLinks.insert": insert_web_property_user_link
"/analytics:v3/analytics.management.webpropertyUserLinks.list": list_web_property_user_links
"/analytics:v3/analytics.management.webpropertyUserLinks.update": update_web_property_user_link
"/analytics:v3/analytics.metadata.columns.list": list_metadata_columns
"/analytics:v3/analytics.provisioning.createAccountTicket": create_account_ticket
"/androidenterprise:v1/CollectionViewersListResponse": list_collection_viewers_response
"/androidenterprise:v1/CollectionsListResponse": list_collections_response
"/androidenterprise:v1/DevicesListResponse": list_devices_response
"/androidenterprise:v1/EnterprisesListResponse": list_enterprises_response
"/androidenterprise:v1/EntitlementsListResponse": list_entitlements_response
"/androidenterprise:v1/GroupLicenseUsersListResponse": list_group_license_users_response
"/androidenterprise:v1/GroupLicensesListResponse": list_group_licenses_response
"/androidenterprise:v1/InstallsListResponse": list_installs_response
"/androidenterprise:v1/UsersListResponse": list_users_response
"/androidenterprise:v1/androidenterprise.collectionviewers.delete": delete_collection_viewer
"/androidenterprise:v1/androidenterprise.collectionviewers.get": get_collection_viewer
"/androidenterprise:v1/androidenterprise.collectionviewers.list": list_collection_viewers
"/androidenterprise:v1/androidenterprise.collectionviewers.patch": patch_collection_viewer
"/androidenterprise:v1/androidenterprise.collectionviewers.update": update_collection_viewer
"/androidenterprise:v1/androidenterprise.grouplicenses.get": get_group_license
"/androidenterprise:v1/androidenterprise.grouplicenses.list": list_group_licenses
"/androidenterprise:v1/androidenterprise.grouplicenseusers.list": list_group_license_users
"/androidenterprise:v1/androidenterprise.products.generateApprovalUrl": generate_product_approval_url
"/androidenterprise:v1/androidenterprise.products.getAppRestrictionsSchema": get_product_app_restrictions_schema
"/androidenterprise:v1/androidenterprise.products.getPermissions": get_product_permissions
"/androidenterprise:v1/androidenterprise.products.updatePermissions": update_product_permissions
"/androidenterprise:v1/androidenterprise.users.generateToken": generate_user_token
"/androidenterprise:v1/androidenterprise.users.revokeToken": revoke_user_token
"/androidenterprise:v1/ProductsGenerateApprovalUrlResponse": generate_product_approval_url_response
"/androidenterprise:v1/ProductsApproveRequest": approve_product_request
"/androidpublisher:v2/ApkListingsListResponse": list_apk_listings_response
"/androidpublisher:v2/ApksAddExternallyHostedRequest": apks_add_externally_hosted_request
"/androidpublisher:v2/ApksAddExternallyHostedResponse": apks_add_externally_hosted_response
"/androidpublisher:v2/ApksListResponse": list_apks_response
"/androidpublisher:v2/EntitlementsListResponse": list_entitlements_response
"/androidpublisher:v2/ExpansionFilesUploadResponse": upload_expansion_files_response
"/androidpublisher:v2/ImagesDeleteAllResponse": images_delete_all_response
"/androidpublisher:v2/ImagesListResponse": list_images_response
"/androidpublisher:v2/ImagesUploadResponse": upload_images_response
"/androidpublisher:v2/InappproductsBatchRequest": in_app_products_batch_request
"/androidpublisher:v2/InappproductsBatchRequestEntry": in_app_products_batch_request_entry
"/androidpublisher:v2/InappproductsBatchResponse": in_app_products_batch_response
"/androidpublisher:v2/InappproductsBatchResponseEntry": in_app_products_batch_response_entry
"/androidpublisher:v2/InappproductsInsertRequest": insert_in_app_products_request
"/androidpublisher:v2/InappproductsInsertResponse": insert_in_app_products_response
"/androidpublisher:v2/InappproductsListResponse": list_in_app_products_response
"/androidpublisher:v2/InappproductsUpdateRequest": update_in_app_products_request
"/androidpublisher:v2/InappproductsUpdateResponse": update_in_app_products_response
"/androidpublisher:v2/ListingsListResponse": list_listings_response
"/androidpublisher:v2/SubscriptionPurchasesDeferRequest": defer_subscription_purchases_request
"/androidpublisher:v2/SubscriptionPurchasesDeferResponse": defer_subscription_purchases_response
"/androidpublisher:v2/TracksListResponse": list_tracks_response
"/androidpublisher:v2/androidpublisher.edits.apklistings.delete": delete_apk_listing
"/androidpublisher:v2/androidpublisher.edits.apklistings.deleteall": delete_all_apk_listings
"/androidpublisher:v2/androidpublisher.edits.apklistings.get": get_apk_listing
"/androidpublisher:v2/androidpublisher.edits.apklistings.list": list_apk_listings
"/androidpublisher:v2/androidpublisher.edits.apklistings.patch": patch_apk_listing
"/androidpublisher:v2/androidpublisher.edits.apklistings.update": update_apk_listing
"/androidpublisher:v2/androidpublisher.edits.apks.addexternallyhosted": add_externally_hosted_apk
"/androidpublisher:v2/androidpublisher.edits.apks.list": list_apks
"/androidpublisher:v2/androidpublisher.edits.apks.upload": upload_apk
"/androidpublisher:v2/androidpublisher.edits.details.get": get_detail
"/androidpublisher:v2/androidpublisher.edits.details.patch": patch_detail
"/androidpublisher:v2/androidpublisher.edits.details.update": update_detail
"/androidpublisher:v2/androidpublisher.edits.expansionfiles.get": get_expansion_file
"/androidpublisher:v2/androidpublisher.edits.expansionfiles.patch": patch_expansion_file
"/androidpublisher:v2/androidpublisher.edits.expansionfiles.update": update_expansion_file
"/androidpublisher:v2/androidpublisher.edits.expansionfiles.upload": upload_expansion_file
"/androidpublisher:v2/androidpublisher.edits.images.delete": delete_image
"/androidpublisher:v2/androidpublisher.edits.images.deleteall": delete_all_images
"/androidpublisher:v2/androidpublisher.edits.images.list": list_images
"/androidpublisher:v2/androidpublisher.edits.images.upload": upload_image
"/androidpublisher:v2/androidpublisher.edits.listings.delete": delete_listing
"/androidpublisher:v2/androidpublisher.edits.listings.deleteall": delete_all_listings
"/androidpublisher:v2/androidpublisher.edits.listings.get": get_listing
"/androidpublisher:v2/androidpublisher.edits.listings.list": list_listings
"/androidpublisher:v2/androidpublisher.edits.listings.patch": patch_listing
"/androidpublisher:v2/androidpublisher.edits.listings.update": update_listing
"/androidpublisher:v2/androidpublisher.edits.testers.get": get_tester
"/androidpublisher:v2/androidpublisher.edits.testers.patch": patch_tester
"/androidpublisher:v2/androidpublisher.edits.testers.update": update_tester
"/androidpublisher:v2/androidpublisher.edits.tracks.get": get_track
"/androidpublisher:v2/androidpublisher.edits.tracks.list": list_tracks
"/androidpublisher:v2/androidpublisher.edits.tracks.patch": patch_track
"/androidpublisher:v2/androidpublisher.edits.tracks.update": update_track
"/androidpublisher:v2/androidpublisher.entitlements.list": list_entitlements
"/androidpublisher:v2/androidpublisher.inappproducts.batch": batch_update_in_app_products
"/androidpublisher:v2/androidpublisher.inappproducts.delete": delete_in_app_product
"/androidpublisher:v2/androidpublisher.inappproducts.get": get_in_app_product
"/androidpublisher:v2/androidpublisher.inappproducts.insert": insert_in_app_product
"/androidpublisher:v2/androidpublisher.inappproducts.list": list_in_app_products
"/androidpublisher:v2/androidpublisher.inappproducts.patch": patch_in_app_product
"/androidpublisher:v2/androidpublisher.inappproducts.update": update_in_app_product
"/androidpublisher:v2/androidpublisher.purchases.products.get": get_purchase_product
"/androidpublisher:v2/androidpublisher.purchases.subscriptions.cancel": cancel_purchase_subscription
"/androidpublisher:v2/androidpublisher.purchases.subscriptions.defer": defer_purchase_subscription
"/androidpublisher:v2/androidpublisher.purchases.subscriptions.get": get_purchase_subscription
"/androidpublisher:v2/androidpublisher.purchases.subscriptions.refund": refund_purchase_subscription
"/androidpublisher:v2/androidpublisher.purchases.subscriptions.revoke": revoke_purchase_subscription
"/autoscaler:v1beta2/AutoscalerListResponse": list_autoscaler_response
"/bigquery:v2/TableDataInsertAllRequest": insert_all_table_data_request
"/bigquery:v2/TableDataInsertAllResponse": insert_all_table_data_response
"/bigquery:v2/bigquery.jobs.getQueryResults": get_job_query_results
"/bigquery:v2/bigquery.tabledata.insertAll": insert_all_table_data
"/bigquery:v2/bigquery.tabledata.list": list_table_data
"/bigquery:v2/JobCancelResponse": cancel_job_response
"/blogger:v3/blogger.blogs.getByUrl": get_blog_by_url
"/blogger:v3/blogger.blogs.listByUser": list_blogs_by_user
"/blogger:v3/blogger.comments.listByBlog": list_comments_by_blog
"/blogger:v3/blogger.comments.markAsSpam": mark_comment_as_spam
"/blogger:v3/blogger.comments.removeContent": remove_comment_content
"/blogger:v3/blogger.postUserInfos.get": get_post_user_info
"/blogger:v3/blogger.postUserInfos.list": list_post_user_info
"/blogger:v3/blogger.posts.getByPath": get_post_by_path
"/books:v1/Annotationdata": annotation_data
"/books:v1/AnnotationsSummary": annotations_summary
"/books:v1/Annotationsdata": annotations_data
"/books:v1/BooksAnnotationsRange": annotatins_Range
"/books:v1/BooksCloudloadingResource": loading_resource
"/books:v1/BooksVolumesRecommendedRateResponse": rate_recommended_volume_response
"/books:v1/Dictlayerdata": dict_layer_data
"/books:v1/Geolayerdata": geo_layer_data
"/books:v1/Layersummaries": layer_summaries
"/books:v1/Layersummary": layer_summary
"/books:v1/Usersettings": user_settings
"/books:v1/Volumeannotation": volume_annotation
"/books:v1/books.bookshelves.get": get_bookshelf
"/books:v1/books.bookshelves.list": list_bookshelves
"/books:v1/books.bookshelves.volumes.list": list_bookshelf_volumes
"/books:v1/books.cloudloading.addBook": add_book
"/books:v1/books.cloudloading.deleteBook": delete_book
"/books:v1/books.cloudloading.updateBook": update_book
"/books:v1/books.dictionary.listOfflineMetadata": list_offline_metadata_dictionary
"/books:v1/books.layers.annotationData.get": get_layer_annotation_data
"/books:v1/books.layers.annotationData.list": list_layer_annotation_data
"/books:v1/books.layers.get": get_layer
"/books:v1/books.layers.list": list_layers
"/books:v1/books.layers.volumeAnnotations.get": get_layer_volume_annotation
"/books:v1/books.layers.volumeAnnotations.list": list_layer_volume_annotations
"/books:v1/books.myconfig.getUserSettings": get_user_settings
"/books:v1/books.myconfig.releaseDownloadAccess": release_download_access
"/books:v1/books.myconfig.requestAccess": request_access
"/books:v1/books.myconfig.syncVolumeLicenses": sync_volume_licenses
"/books:v1/books.myconfig.updateUserSettings": update_user_settings
"/books:v1/books.mylibrary.annotations.delete": delete_my_library_annotation
"/books:v1/books.mylibrary.annotations.insert": insert_my_library_annotation
"/books:v1/books.mylibrary.annotations.list": list_my_library_annotations
"/books:v1/books.mylibrary.annotations.summary": summarize_my_library_annotation
"/books:v1/books.mylibrary.annotations.update": update_my_library_annotation
"/books:v1/books.mylibrary.bookshelves.addVolume": add_my_library_volume
"/books:v1/books.mylibrary.bookshelves.clearVolumes": clear_my_library_volumes
"/books:v1/books.mylibrary.bookshelves.get": get_my_library_bookshelf
"/books:v1/books.mylibrary.bookshelves.list": list_my_library_bookshelves
"/books:v1/books.mylibrary.bookshelves.moveVolume": move_my_library_volume
"/books:v1/books.mylibrary.bookshelves.removeVolume": remove_my_library_volume
"/books:v1/books.mylibrary.bookshelves.volumes.list": list_my_library_volumes
"/books:v1/books.mylibrary.readingpositions.get": get_my_library_reading_position
"/books:v1/books.mylibrary.readingpositions.setPosition": set_my_library_reading_position
"/books:v1/books.onboarding.listCategories": list_onboarding_categories
"/books:v1/books.onboarding.listCategoryVolumes": list_onboarding_category_volumes
"/books:v1/books.promooffer.accept": accept_promo_offer
"/books:v1/books.promooffer.dismiss": dismiss_promo_offer
"/books:v1/books.promooffer.get": get_promo_offer
"/books:v1/books.volumes.associated.list": list_associated_volumes
"/books:v1/books.volumes.mybooks.list": list_my_books
"/books:v1/books.volumes.recommended.list": list_recommended_volumes
"/books:v1/books.volumes.recommended.rate": rate_recommended_volume
"/books:v1/books.volumes.useruploaded.list": list_user_uploaded_volumes
"/calendar:v3/CalendarNotification/method": delivery_method
"/calendar:v3/Event/gadget/display": display_mode
"/calendar:v3/EventReminder/method": reminder_method
"/civicinfo:v2/DivisionSearchResponse": search_division_response
"/civicinfo:v2/ElectionsQueryResponse": query_elections_response
"/civicinfo:v2/civicinfo.divisions.search": search_divisions
"/civicinfo:v2/civicinfo.elections.electionQuery": query_election
"/civicinfo:v2/civicinfo.elections.voterInfoQuery": query_voter_info
"/civicinfo:v2/civicinfo.representatives.representativeInfoByAddress": representative_info_by_address
"/civicinfo:v2/civicinfo.representatives.representativeInfoByDivision": representative_info_by_division
"/compute:v1/DiskMoveRequest": move_disk_request
"/compute:v1/InstanceMoveRequest": move_instance_request
"/compute:v1/TargetPoolsAddHealthCheckRequest": add_target_pools_health_check_request
"/compute:v1/TargetPoolsAddInstanceRequest": add_target_pools_instance_request
"/compute:v1/TargetPoolsRemoveHealthCheckRequest": remove_target_pools_health_check_request
"/compute:v1/TargetPoolsRemoveInstanceRequest": remove_target_pools_instance_request
"/compute:v1/UrlMapsValidateRequest": validate_url_maps_request
"/compute:v1/UrlMapsValidateResponse": validate_url_maps_response
"/compute:v1/compute.addresses.aggregatedList": list_aggregated_addresses
"/compute:v1/compute.backendServices.getHealth": get_backend_service_health
"/compute:v1/compute.diskTypes.aggregatedList": list_aggregated_disk_types
"/compute:v1/compute.disks.aggregatedList": list_aggregated_disk
"/compute:v1/compute.disks.createSnapshot": create_disk_snapshot
"/compute:v1/compute.forwardingRules.aggregatedList": list_aggregated_forwarding_rules
"/compute:v1/compute.forwardingRules.setTarget": set_forwarding_rule_target
"/compute:v1/compute.globalForwardingRules.setTarget": set_global_forwarding_rule_target
"/compute:v1/compute.globalOperations.aggregatedList": list_aggregated_global_operation
"/compute:v1/compute.instances.addAccessConfig": add_instance_access_config
"/compute:v1/compute.instances.aggregatedList": list_aggregated_instances
"/compute:v1/compute.instances.attachDisk": attach_disk
"/compute:v1/compute.instances.deleteAccessConfig": delete_instance_access_config
"/compute:v1/compute.instances.detachDisk": detach_disk
"/compute:v1/compute.instances.getSerialPortOutput": get_instance_serial_port_output
"/compute:v1/compute.instances.setDiskAutoDelete": set_disk_auto_delete
"/compute:v1/compute.instances.setMetadata": set_instance_metadata
"/compute:v1/compute.instances.setScheduling": set_instance_scheduling
"/compute:v1/compute.instances.setTags": set_instance_tags
"/compute:v1/compute.machineTypes.aggregatedList": list_aggregated_machine_types
"/compute:v1/compute.projects.moveDisk": move_disk
"/compute:v1/compute.projects.moveInstance": move_instance
"/compute:v1/compute.projects.setCommonInstanceMetadata": set_common_instance_metadata
"/compute:v1/compute.projects.setUsageExportBucket": set_usage_export_bucket
"/compute:v1/compute.targetHttpProxies.setUrlMap": set_target_http_proxy_url_map
"/compute:v1/compute.targetInstances.aggregatedList": list_aggregated_target_instance
"/compute:v1/compute.targetPools.addHealthCheck": add_target_pool_health_check
"/compute:v1/compute.targetPools.addInstance": add_target_pool_instance
"/compute:v1/compute.targetPools.aggregatedList": list_aggregated_target_pools
"/compute:v1/compute.targetPools.getHealth": get_target_pool_health
"/compute:v1/compute.targetPools.removeHealthCheck": remove_target_pool_health_check
"/compute:v1/compute.targetPools.removeInstance": remove_target_pool_instance
"/compute:v1/compute.targetPools.setBackup": set_target_pool_backup
"/compute:v1/compute.targetVpnGateways.aggregatedList": list_aggregated_target_vpn_gateways
"/compute:v1/compute.targetVpnGateways.delete": delete_target_vpn_gateway
"/compute:v1/compute.targetVpnGateways.get": get_target_vpn_gateway
"/compute:v1/compute.targetVpnGateways.insert": insert_target_vpn_gateway
"/compute:v1/compute.targetVpnGateways.list": list_target_vpn_gateways
"/compute:v1/compute.vpnTunnels.aggregatedList": list_aggregated_vpn_tunnel
"/container:v1beta1/container.projects.clusters.list": list_clusters
"/container:v1beta1/container.projects.operations.list": list_operations
"/container:v1beta1/container.projects.zones.clusters.create": create_cluster
"/container:v1beta1/container.projects.zones.clusters.delete": delete_zone_cluster
"/container:v1beta1/container.projects.zones.clusters.get": get_zone_cluster
"/container:v1beta1/container.projects.zones.clusters.list": list_zone_clusters
"/container:v1beta1/container.projects.zones.operations.get": get_zone_operation
"/container:v1beta1/container.projects.zones.operations.list": list_zone_operations
"/container:v1beta1/container.projects.zones.tokens.get": get_zone_token
"/content:v2/AccountsAuthInfoResponse": accounts_auth_info_response
"/content:v2/AccountsCustomBatchRequest": accounts_custom_batch_request
"/content:v2/AccountsCustomBatchRequest": batch_accounts_request
"/content:v2/AccountsCustomBatchRequestEntry": accounts_batch_request_entry
"/content:v2/AccountsCustomBatchRequestEntry/method": request_method
"/content:v2/AccountsCustomBatchResponse": batch_accounts_response
"/content:v2/AccountsCustomBatchResponse": batch_accounts_response
"/content:v2/AccountsCustomBatchResponseEntry": accounts_batch_response_entry
"/content:v2/AccountsListResponse": list_accounts_response
"/content:v2/AccountshippingCustomBatchRequest": batch_account_shipping_request
"/content:v2/AccountshippingCustomBatchRequest": batch_account_shipping_request
"/content:v2/AccountshippingCustomBatchRequestEntry": account_shipping_batch_request_entry
"/content:v2/AccountshippingCustomBatchRequestEntry/method": request_method
"/content:v2/AccountshippingCustomBatchResponse": batch_account_shipping_response
"/content:v2/AccountshippingCustomBatchResponse": batch_account_shipping_response
"/content:v2/AccountshippingCustomBatchResponseEntry": account_shipping_batch_response_entry
"/content:v2/AccountshippingListResponse": list_account_shipping_response
"/content:v2/AccountstatusesCustomBatchRequest": batch_account_statuses_request
"/content:v2/AccountstatusesCustomBatchRequest": batch_account_statuses_request
"/content:v2/AccountstatusesCustomBatchRequestEntry": account_statuses_batch_request_entry
"/content:v2/AccountstatusesCustomBatchRequestEntry/method": request_method
"/content:v2/AccountstatusesCustomBatchResponse": batch_account_statuses_response
"/content:v2/AccountstatusesCustomBatchResponse": batch_account_statuses_response
"/content:v2/AccountstatusesCustomBatchResponseEntry": account_statuses_batch_response_entry
"/content:v2/AccountstatusesListResponse": list_account_statuses_response
"/content:v2/AccounttaxCustomBatchRequest": batch_account_tax_request
"/content:v2/AccounttaxCustomBatchRequest": batch_account_tax_request
"/content:v2/AccounttaxCustomBatchRequestEntry": account_tax_batch_request_entry
"/content:v2/AccounttaxCustomBatchRequestEntry/method": request_method
"/content:v2/AccounttaxCustomBatchResponse": batch_account_tax_response
"/content:v2/AccounttaxCustomBatchResponse": batch_account_tax_response
"/content:v2/AccounttaxCustomBatchResponseEntry": account_tax_batch_response_entry
"/content:v2/AccounttaxListResponse": list_account_tax_response
"/content:v2/DatafeedsCustomBatchRequest": batch_datafeeds_request
"/content:v2/DatafeedsCustomBatchRequest": batch_datafeeds_request
"/content:v2/DatafeedsCustomBatchRequestEntry": datafeeds_batch_request_entry
"/content:v2/DatafeedsCustomBatchRequestEntry/method": request_method
"/content:v2/DatafeedsCustomBatchResponse": batch_datafeeds_response
"/content:v2/DatafeedsCustomBatchResponse": batch_datafeeds_response
"/content:v2/DatafeedsCustomBatchResponseEntry": datafeeds_batch_response_entry
"/content:v2/DatafeedsListResponse": list_datafeeds_response
"/content:v2/DatafeedstatusesCustomBatchRequest": batch_datafeed_statuses_request
"/content:v2/DatafeedstatusesCustomBatchRequest": batch_datafeed_statuses_request
"/content:v2/DatafeedstatusesCustomBatchRequestEntry": datafeed_statuses_batch_request_entry
"/content:v2/DatafeedstatusesCustomBatchRequestEntry/method": request_method
"/content:v2/DatafeedstatusesCustomBatchResponse": batch_datafeed_statuses_response
"/content:v2/DatafeedstatusesCustomBatchResponse": batch_datafeed_statuses_response
"/content:v2/DatafeedstatusesCustomBatchResponseEntry": datafeed_statuses_batch_response_entry
"/content:v2/DatafeedstatusesListResponse": list_datafeed_statuses_response
"/content:v2/InventoryCustomBatchRequest": batch_inventory_request
"/content:v2/InventoryCustomBatchRequest": batch_inventory_request
"/content:v2/InventoryCustomBatchRequestEntry": inventory_batch_request_entry
"/content:v2/InventoryCustomBatchResponse": batch_inventory_response
"/content:v2/InventoryCustomBatchResponse": batch_inventory_response
"/content:v2/InventoryCustomBatchResponseEntry": inventory_batch_response_entry
"/content:v2/InventorySetRequest": set_inventory_request
"/content:v2/InventorySetResponse": set_inventory_response
"/content:v2/ProductsCustomBatchRequest": batch_products_request
"/content:v2/ProductsCustomBatchRequest": batch_products_request
"/content:v2/ProductsCustomBatchRequestEntry": products_batch_request_entry
"/content:v2/ProductsCustomBatchRequestEntry/method": request_method
"/content:v2/ProductsCustomBatchResponse": batch_products_response
"/content:v2/ProductsCustomBatchResponse": batch_products_response
"/content:v2/ProductsCustomBatchResponseEntry": products_batch_response_entry
"/content:v2/ProductsListResponse": list_products_response
"/content:v2/ProductstatusesCustomBatchRequest": batch_product_statuses_request
"/content:v2/ProductstatusesCustomBatchRequest": batch_product_statuses_request
"/content:v2/ProductstatusesCustomBatchRequestEntry": product_statuses_batch_request_entry
"/content:v2/ProductstatusesCustomBatchRequestEntry/method": request_method
"/content:v2/ProductstatusesCustomBatchResponse": batch_product_statuses_response
"/content:v2/ProductstatusesCustomBatchResponse": batch_product_statuses_response
"/content:v2/ProductstatusesCustomBatchResponseEntry": product_statuses_batch_response_entry
"/content:v2/ProductstatusesListResponse": list_product_statuses_response
"/content:v2/content.accounts.authinfo": get_account_authinfo
"/content:v2/content.accounts.custombatch": batch_account
"/content:v2/content.accountshipping.custombatch": batch_account_shipping
"/content:v2/content.accountshipping.get": get_account_shipping
"/content:v2/content.accountshipping.list": list_account_shippings
"/content:v2/content.accountshipping.patch": patch_account_shipping
"/content:v2/content.accountshipping.update": update_account_shipping
"/content:v2/content.accountstatuses.custombatch": batch_account_status
"/content:v2/content.accountstatuses.get": get_account_status
"/content:v2/content.accountstatuses.list": list_account_statuses
"/content:v2/content.accounttax.custombatch": batch_account_tax
"/content:v2/content.accounttax.get": get_account_tax
"/content:v2/content.accounttax.list": list_account_taxes
"/content:v2/content.accounttax.patch": patch_account_tax
"/content:v2/content.accounttax.update": update_account_tax
"/content:v2/content.datafeeds.custombatch": batch_datafeed
"/content:v2/content.datafeedstatuses.custombatch": batch_datafeed_status
"/content:v2/content.datafeedstatuses.get": get_datafeed_status
"/content:v2/content.datafeedstatuses.list": list_datafeed_statuses
"/content:v2/content.inventory.custombatch": batch_inventory
"/content:v2/content.inventory.set": set_inventory
"/content:v2/content.products.custombatch": batch_product
"/content:v2/content.productstatuses.custombatch": batch_product_status
"/content:v2/content.productstatuses.get": get_product_status
"/content:v2/content.productstatuses.list": list_product_statuses
"/coordinate:v1/CustomFieldDefListResponse": list_custom_field_def_response
"/coordinate:v1/JobListResponse": list_job_response
"/coordinate:v1/LocationListResponse": list_location_response
"/coordinate:v1/TeamListResponse": list_team_response
"/coordinate:v1/WorkerListResponse": list_worker_response
"/datastore:v1beta2/AllocateIdsRequest": allocate_ids_request
"/datastore:v1beta2/AllocateIdsResponse": allocate_ids_response
"/datastore:v1beta2/BeginTransactionRequest": begin_transaction_request
"/datastore:v1beta2/BeginTransactionResponse": begin_transaction_response
"/deploymentmanager:v2beta1/DeploymentsListResponse": list_deployments_response
"/deploymentmanager:v2beta1/ManifestsListResponse": list_manifests_response
"/deploymentmanager:v2beta1/OperationsListResponse": list_operations_response
"/deploymentmanager:v2beta1/ResourcesListResponse": list_resources_response
"/deploymentmanager:v2beta1/TypesListResponse": list_types_response
"/deploymentmanager:v2beta2/DeploymentsListResponse": list_deployments_response
"/deploymentmanager:v2beta2/ManifestsListResponse": list_manifests_response
"/deploymentmanager:v2beta2/OperationsListResponse": list_operations_response
"/deploymentmanager:v2beta2/ResourcesListResponse": list_resources_response
"/deploymentmanager:v2beta2/TypesListResponse": list_types_response
"/dfareporting:v2.1/AccountPermissionGroupsListResponse": list_account_permission_groups_response
"/dfareporting:v2.1/AccountPermissionsListResponse": list_account_permissions_response
"/dfareporting:v2.1/AccountUserProfilesListResponse": list_account_user_profiles_response
"/dfareporting:v2.1/AccountsListResponse": list_accounts_response
"/dfareporting:v2.1/AdsListResponse": list_ads_response
"/dfareporting:v2.1/AdvertiserGroupsListResponse": list_advertiser_groups_response
"/dfareporting:v2.1/AdvertisersListResponse": list_advertisers_response
"/dfareporting:v2.1/BrowsersListResponse": list_browsers_response
"/dfareporting:v2.1/CampaignCreativeAssociationsListResponse": list_campaign_creative_associations_response
"/dfareporting:v2.1/CampaignsListResponse": list_campaigns_response
"/dfareporting:v2.1/ChangeLog/objectId": obj_id
"/dfareporting:v2.1/ChangeLogsListResponse": list_change_logs_response
"/dfareporting:v2.1/CitiesListResponse": list_cities_response
"/dfareporting:v2.1/ConnectionTypesListResponse": list_connection_types_response
"/dfareporting:v2.1/ContentCategoriesListResponse": list_content_categories_response
"/dfareporting:v2.1/CountriesListResponse": list_countries_response
"/dfareporting:v2.1/CreativeFieldValuesListResponse": list_creative_field_values_response
"/dfareporting:v2.1/CreativeFieldsListResponse": list_creative_fields_response
"/dfareporting:v2.1/CreativeGroupsListResponse": list_creative_groups_response
"/dfareporting:v2.1/CreativesListResponse": list_creatives_response
"/dfareporting:v2.1/DimensionValueRequest": dimension_value_request
"/dfareporting:v2.1/DirectorySiteContactsListResponse": list_directory_site_contacts_response
"/dfareporting:v2.1/DirectorySitesListResponse": list_directory_sites_response
"/dfareporting:v2.1/EventTagsListResponse": list_event_tags_response
"/dfareporting:v2.1/FloodlightActivitiesGenerateTagResponse": floodlight_activities_generate_tag_response
"/dfareporting:v2.1/FloodlightActivitiesListResponse": list_floodlight_activities_response
"/dfareporting:v2.1/FloodlightActivityGroupsListResponse": list_floodlight_activity_groups_response
"/dfareporting:v2.1/FloodlightConfigurationsListResponse": list_floodlight_configurations_response
"/dfareporting:v2.1/InventoryItemsListResponse": list_inventory_items_response
"/dfareporting:v2.1/LandingPagesListResponse": list_landing_pages_response
"/dfareporting:v2.1/MetrosListResponse": list_metros_response
"/dfareporting:v2.1/MobileCarriersListResponse": list_mobile_carriers_response
"/dfareporting:v2.1/ObjectFilter/objectIds/object_id": obj_id
"/dfareporting:v2.1/OperatingSystemVersionsListResponse": list_operating_system_versions_response
"/dfareporting:v2.1/OperatingSystemsListResponse": list_operating_systems_response
"/dfareporting:v2.1/OrderDocumentsListResponse": list_order_documents_response
"/dfareporting:v2.1/OrdersListResponse": list_orders_response
"/dfareporting:v2.1/PlacementGroupsListResponse": list_placement_groups_response
"/dfareporting:v2.1/PlacementStrategiesListResponse": list_placement_strategies_response
"/dfareporting:v2.1/PlacementsGenerateTagsResponse": generate_placements_tags_response
"/dfareporting:v2.1/PlacementsListResponse": list_placements_response
"/dfareporting:v2.1/PlatformTypesListResponse": list_platform_types_response
"/dfareporting:v2.1/PostalCodesListResponse": list_postal_codes_response
"/dfareporting:v2.1/ProjectsListResponse": list_projects_response
"/dfareporting:v2.1/RegionsListResponse": list_regions_response
"/dfareporting:v2.1/RemarketingListsListResponse": list_remarketing_lists_response
"/dfareporting:v2.1/SitesListResponse": list_sites_response
"/dfareporting:v2.1/SizesListResponse": list_sizes_response
"/dfareporting:v2.1/SubaccountsListResponse": list_subaccounts_response
"/dfareporting:v2.1/TargetableRemarketingListsListResponse": list_targetable_remarketing_lists_response
"/dfareporting:v2.1/UserRolePermissionGroupsListResponse": list_user_role_permission_groups_response
"/dfareporting:v2.1/UserRolePermissionsListResponse": list_user_role_permissions_response
"/dfareporting:v2.1/UserRolesListResponse": list_user_roles_response
"/dfareporting:v2.1/dfareporting.floodlightActivities.generatetag": generate_floodlight_activity_tag
"/dfareporting:v2.1/dfareporting.placements.generatetags": generate_placement_tags
"/discovery:v1/RestDescription/methods": api_methods
"/discovery:v1/RestResource/methods": api_methods
"/dns:v1/ChangesListResponse": list_changes_response
"/dns:v1/ManagedZonesListResponse": list_managed_zones_response
"/dns:v1/ResourceRecordSetsListResponse": list_resource_record_sets_response
"/doubleclickbidmanager:v1/DownloadLineItemsRequest": download_line_items_request
"/doubleclickbidmanager:v1/DownloadLineItemsResponse": download_line_items_response
"/doubleclickbidmanager:v1/ListQueriesResponse": list_queries_response
"/doubleclickbidmanager:v1/ListReportsResponse": list_reports_response
"/doubleclickbidmanager:v1/RunQueryRequest": run_query_request
"/doubleclickbidmanager:v1/UploadLineItemsRequest": upload_line_items_request
"/doubleclickbidmanager:v1/UploadLineItemsResponse": upload_line_items_response
"/doubleclickbidmanager:v1/doubleclickbidmanager.lineitems.downloadlineitems": download_line_items
"/doubleclickbidmanager:v1/doubleclickbidmanager.lineitems.uploadlineitems": upload_line_items
"/doubleclickbidmanager:v1/doubleclickbidmanager.queries.createquery": create_query
"/doubleclickbidmanager:v1/doubleclickbidmanager.queries.deletequery": deletequery
"/doubleclickbidmanager:v1/doubleclickbidmanager.queries.getquery": get_query
"/doubleclickbidmanager:v1/doubleclickbidmanager.queries.listqueries": list_queries
"/doubleclickbidmanager:v1/doubleclickbidmanager.queries.runquery": run_query
"/doubleclickbidmanager:v1/doubleclickbidmanager.reports.listreports": list_reports
"/doubleclicksearch:v2/ReportRequest": report_request
"/doubleclicksearch:v2/UpdateAvailabilityRequest": update_availability_request
"/doubleclicksearch:v2/UpdateAvailabilityResponse": update_availability_response
"/drive:v2/drive.files.emptyTrash": empty_trash
"/drive:v2/drive.permissions.getIdForEmail": get_permission_id_for_email
"/fusiontables:v2/fusiontables.table.importRows": import_rows
"/fusiontables:v2/fusiontables.table.importTable": import_table
"/games:v1/AchievementDefinitionsListResponse": list_achievement_definitions_response
"/games:v1/AchievementIncrementResponse": achievement_increment_response
"/games:v1/AchievementRevealResponse": achievement_reveal_response
"/games:v1/AchievementSetStepsAtLeastResponse": achievement_set_steps_at_least_response
"/games:v1/AchievementUnlockResponse": achievement_unlock_response
"/games:v1/AchievementUpdateMultipleRequest": achievement_update_multiple_request
"/games:v1/AchievementUpdateMultipleResponse": achievement_update_multiple_response
"/games:v1/AchievementUpdateRequest": update_achievement_request
"/games:v1/AchievementUpdateResponse": update_achievement_response
"/games:v1/CategoryListResponse": list_category_response
"/games:v1/EventDefinitionListResponse": list_event_definition_response
"/games:v1/EventRecordRequest": event_record_request
"/games:v1/EventUpdateRequest": update_event_request
"/games:v1/EventUpdateResponse": update_event_response
"/games:v1/LeaderboardListResponse": list_leaderboard_response
"/games:v1/PlayerAchievementListResponse": list_player_achievement_response
"/games:v1/PlayerEventListResponse": list_player_event_response
"/games:v1/PlayerLeaderboardScoreListResponse": list_player_leaderboard_score_response
"/games:v1/PlayerListResponse": list_player_response
"/games:v1/PlayerScoreListResponse": list_player_score_response
"/games:v1/PlayerScoreResponse": player_score_response
"/games:v1/QuestListResponse": list_quest_response
"/games:v1/RevisionCheckResponse": check_revision_response
"/games:v1/RoomCreateRequest": create_room_request
"/games:v1/RoomJoinRequest": join_room_request
"/games:v1/RoomLeaveRequest": leave_room_request
"/games:v1/SnapshotListResponse": list_snapshot_response
"/games:v1/TurnBasedMatchCreateRequest": create_turn_based_match_request
"/games:v1/TurnBasedMatchDataRequest": turn_based_match_data_request
"/games:v1/games.achievements.updateMultiple": update_multiple_achievements
"/games:v1/games.events.listDefinitions": list_event_definitions
"/games:v1/games.metagame.getMetagameConfig": get_metagame_config
"/games:v1/games.rooms.reportStatus": report_room_status
"/games:v1/games.turnBasedMatches.leaveTurn": leave_turn
"/games:v1/games.turnBasedMatches.takeTurn": take_turn
"/gamesConfiguration:v1configuration/AchievementConfigurationListResponse": list_achievement_configuration_response
"/gamesConfiguration:v1configuration/LeaderboardConfigurationListResponse": list_leaderboard_configuration_response
"/genomics:v1beta2/genomics.callsets.create": create_call_set
"/genomics:v1beta2/genomics.callsets.delete": delete_call_set
"/genomics:v1beta2/genomics.callsets.get": get_call_set
"/genomics:v1beta2/genomics.callsets.patch": patch_call_set
"/genomics:v1beta2/genomics.callsets.search": search_call_sets
"/genomics:v1beta2/genomics.callsets.update": update_call_set
"/genomics:v1beta2/genomics.readgroupsets.align": align_read_group_sets
"/genomics:v1beta2/genomics.readgroupsets.call": call_read_group_sets
"/genomics:v1beta2/genomics.readgroupsets.coveragebuckets.list": list_coverage_buckets
"/genomics:v1beta2/genomics.readgroupsets.delete": delete_read_group_set
"/genomics:v1beta2/genomics.readgroupsets.export": export_read_group_sets
"/genomics:v1beta2/genomics.readgroupsets.get": get_read_group_set
"/genomics:v1beta2/genomics.readgroupsets.import": import_read_group_sets
"/genomics:v1beta2/genomics.readgroupsets.patch": patch_read_group_set
"/genomics:v1beta2/genomics.readgroupsets.search": search_read_group_sets
"/genomics:v1beta2/genomics.readgroupsets.update": update_read_group_set
"/genomics:v1beta2/genomics.references.bases.list/end": end_position
"/genomics:v1beta2/genomics.references.bases.list/start": start_position
"/genomics:v1beta2/genomics.referencesets.get": get_reference_set
"/genomics:v1beta2/genomics.streamingReadstore.streamreads": stream_reads
"/gmail:v1/gmail.users.getProfile": get_user_profile
"/identitytoolkit:v3/IdentitytoolkitRelyingpartyCreateAuthUriRequest": create_auth_uri_request
"/identitytoolkit:v3/IdentitytoolkitRelyingpartyDeleteAccountRequest": delete_account_request
"/identitytoolkit:v3/IdentitytoolkitRelyingpartyDownloadAccountRequest": download_account_request
"/identitytoolkit:v3/IdentitytoolkitRelyingpartyGetAccountInfoRequest": get_account_info_request
"/identitytoolkit:v3/IdentitytoolkitRelyingpartyGetPublicKeysResponse": get_public_keys_response
"/identitytoolkit:v3/IdentitytoolkitRelyingpartyGetPublicKeysResponse/get_public_keys_response": get_public_keys_response
"/identitytoolkit:v3/IdentitytoolkitRelyingpartyResetPasswordRequest": reset_password_request
"/identitytoolkit:v3/IdentitytoolkitRelyingpartySetAccountInfoRequest": set_account_info_request
"/identitytoolkit:v3/IdentitytoolkitRelyingpartyUploadAccountRequest": upload_account_request
"/identitytoolkit:v3/IdentitytoolkitRelyingpartyVerifyAssertionRequest": verify_assertion_request
"/identitytoolkit:v3/IdentitytoolkitRelyingpartyVerifyPasswordRequest": verify_password_request
"/identitytoolkit:v3/identitytoolkit.relyingparty.createAuthUri": create_auth_uri
"/identitytoolkit:v3/identitytoolkit.relyingparty.deleteAccount": delete_account
"/identitytoolkit:v3/identitytoolkit.relyingparty.downloadAccount": download_account
"/identitytoolkit:v3/identitytoolkit.relyingparty.getAccountInfo": get_account_info
"/identitytoolkit:v3/identitytoolkit.relyingparty.getOobConfirmationCode": get_oob_confirmation_code
"/identitytoolkit:v3/identitytoolkit.relyingparty.getPublicKeys": get_public_keys
"/identitytoolkit:v3/identitytoolkit.relyingparty.getRecaptchaParam": get_recaptcha_param
"/identitytoolkit:v3/identitytoolkit.relyingparty.resetPassword": reset_password
"/identitytoolkit:v3/identitytoolkit.relyingparty.setAccountInfo": set_account_info
"/identitytoolkit:v3/identitytoolkit.relyingparty.uploadAccount": upload_account
"/identitytoolkit:v3/identitytoolkit.relyingparty.verifyAssertion": verify_assertion
"/identitytoolkit:v3/identitytoolkit.relyingparty.verifyPassword": verify_password
"/licensing:v1/licensing.licenseAssignments.listForProduct": list_license_assignment_for_product
"/licensing:v1/licensing.licenseAssignments.listForProductAndSku": list_license_assignment_for_product_and_sku
"/logging:v1beta3/logging.projects.logServices.indexes.list": list_log_service_indexes
"/logging:v1beta3/logging.projects.logServices.list": list_log_services
"/logging:v1beta3/logging.projects.logServices.sinks.create": create_log_service_sink
"/logging:v1beta3/logging.projects.logServices.sinks.delete": delete_log_service_sink
"/logging:v1beta3/logging.projects.logServices.sinks.get": get_log_service_sink
"/logging:v1beta3/logging.projects.logServices.sinks.list": list_log_service_sinks
"/logging:v1beta3/logging.projects.logServices.sinks.update": update_log_service_sink
"/logging:v1beta3/logging.projects.logs.delete": delete_log
"/logging:v1beta3/logging.projects.logs.list": list_logs
"/logging:v1beta3/logging.projects.logs.sinks.create": create_log_sink
"/logging:v1beta3/logging.projects.logs.sinks.delete": delete_log_sink
"/logging:v1beta3/logging.projects.logs.sinks.get": get_log_sink
"/logging:v1beta3/logging.projects.logs.sinks.list": list_log_sinks
"/logging:v1beta3/logging.projects.logs.sinks.update": update_log_sink
"/manager:v1beta2/DeploymentsListResponse": list_deployments_response
"/manager:v1beta2/TemplatesListResponse": list_templates_response
"/mapsengine:v1/AssetsListResponse": list_assets_response
"/mapsengine:v1/FeaturesBatchDeleteRequest": batch_delete_features_request
"/mapsengine:v1/FeaturesBatchInsertRequest": batch_insert_features_request
"/mapsengine:v1/FeaturesBatchPatchRequest": batch_patch_features_request
"/mapsengine:v1/FeaturesListResponse": list_features_response
"/mapsengine:v1/IconsListResponse": list_icons_response
"/mapsengine:v1/LayersListResponse": list_layers_response
"/mapsengine:v1/MapsListResponse": list_maps_response
"/mapsengine:v1/ParentsListResponse": list_parents_response
"/mapsengine:v1/PermissionsBatchDeleteRequest": batch_delete_permissions_request
"/mapsengine:v1/PermissionsBatchDeleteResponse": batch_delete_permissions_response
"/mapsengine:v1/PermissionsBatchUpdateRequest": batch_update_permissions_request
"/mapsengine:v1/PermissionsBatchUpdateResponse": batch_update_permissions_response
"/mapsengine:v1/PermissionsListResponse": list_permissions_response
"/mapsengine:v1/ProjectsListResponse": list_projects_response
"/mapsengine:v1/PublishedLayersListResponse": list_published_layers_response
"/mapsengine:v1/PublishedMapsListResponse": list_published_maps_response
"/mapsengine:v1/RasterCollectionsListResponse": list_raster_collections_response
"/mapsengine:v1/RasterCollectionsRasterBatchDeleteRequest": batch_delete_raster_collections_raster_request
"/mapsengine:v1/RasterCollectionsRastersBatchDeleteResponse": batch_delete_raster_collections_rasters_response
"/mapsengine:v1/RasterCollectionsRastersBatchInsertRequest": batch_insert_raster_collections_rasters_request
"/mapsengine:v1/RasterCollectionsRastersBatchInsertResponse": batch_insert_raster_collections_rasters_response
"/mapsengine:v1/RasterCollectionsRastersListResponse": list_raster_collections_rasters_response
"/mapsengine:v1/RastersListResponse": list_rasters_response
"/mapsengine:v1/TablesListResponse": list_tables_response
"/mirror:v1/AttachmentsListResponse": list_attachments_response
"/mirror:v1/ContactsListResponse": list_contacts_response
"/mirror:v1/LocationsListResponse": list_locations_response
"/mirror:v1/SubscriptionsListResponse": list_subscriptions_response
"/mirror:v1/TimelineListResponse": list_timeline_response
"/oauth2:v2/oauth2.userinfo.v2.me.get": get_userinfo_v2
"/pagespeedonline:v2/PagespeedApiFormatStringV2": format_string
"/pagespeedonline:v2/PagespeedApiImageV2": image
"/pagespeedonline:v2/pagespeedonline.pagespeedapi.runpagespeed": run_pagespeed
"/plus:v1/plus.people.listByActivity": list_people_by_activity
"/plusDomains:v1/plusDomains.circles.addPeople": add_people
"/plusDomains:v1/plusDomains.circles.removePeople": remove_people
"/plusDomains:v1/plusDomains.people.listByActivity": list_people_by_activity
"/plusDomains:v1/plusDomains.people.listByCircle": list_people_by_circle
"/prediction:v1.6/prediction.hostedmodels.predict": predict_hosted_model
"/prediction:v1.6/prediction.trainedmodels.analyze": analyze_trained_model
"/prediction:v1.6/prediction.trainedmodels.delete": delete_trained_model
"/prediction:v1.6/prediction.trainedmodels.get": get_trained_model
"/prediction:v1.6/prediction.trainedmodels.insert": insert_trained_model
"/prediction:v1.6/prediction.trainedmodels.list": list_trained_models
"/prediction:v1.6/prediction.trainedmodels.predict": predict_trained_model
"/prediction:v1.6/prediction.trainedmodels.update": update_trained_model
"/pubsub:v1beta2/PubsubMessage": message
"/pubsub:v1beta2/pubsub.projects.subscriptions.create": create_subscription
"/pubsub:v1beta2/pubsub.projects.subscriptions.delete": delete_subscription
"/pubsub:v1beta2/pubsub.projects.subscriptions.get": get_subscription
"/pubsub:v1beta2/pubsub.projects.subscriptions.list": list_subscriptions
"/pubsub:v1beta2/pubsub.projects.subscriptions.setIamPolicy": set_subscription_policy
"/pubsub:v1beta2/pubsub.projects.subscriptions.testIamPermissions": test_subscription_permissions
"/pubsub:v1beta2/pubsub.projects.topics.create": create_topic
"/pubsub:v1beta2/pubsub.projects.topics.delete": delete_topic
"/pubsub:v1beta2/pubsub.projects.topics.get": get_topic
"/pubsub:v1beta2/pubsub.projects.topics.list": list_topics
"/pubsub:v1beta2/pubsub.projects.topics.setIamPolicy": set_topic_policy
"/pubsub:v1beta2/pubsub.projects.topics.testIamPermissions": test_topic_permissions
"/pubsub:v1beta2/pubsub.projects.topics.subscriptions.list": list_topic_subscriptions
"/qpxExpress:v1/TripsSearchRequest": search_trips_request
"/qpxExpress:v1/TripsSearchResponse": search_trips_response
"/replicapool:v1beta2/InstanceGroupManagersAbandonInstancesRequest": abandon_instances_request
"/replicapool:v1beta2/InstanceGroupManagersDeleteInstancesRequest": delete_instances_request
"/replicapool:v1beta2/InstanceGroupManagersRecreateInstancesRequest": recreate_instances_request
"/replicapool:v1beta2/InstanceGroupManagersSetInstanceTemplateRequest": set_instance_template_request
"/replicapool:v1beta2/InstanceGroupManagersSetTargetPoolsRequest": set_target_pools_request
"/replicapool:v1beta2/replicapool.instanceGroupManagers.abandonInstances": abandon_instances
"/replicapool:v1beta2/replicapool.instanceGroupManagers.deleteInstances": delete_instances
"/replicapool:v1beta2/replicapool.instanceGroupManagers.recreateInstances": recreate_instances
"/replicapool:v1beta2/replicapool.instanceGroupManagers.resize": resize_instance
"/replicapool:v1beta2/replicapool.instanceGroupManagers.setInstanceTemplate": set_instance_template
"/replicapool:v1beta2/replicapool.instanceGroupManagers.setTargetPools": set_target_pools
"/replicapoolupdater:v1beta1/replicapoolupdater.rollingUpdates.listInstanceUpdates": list_instance_updates
"/reseller:v1/ChangePlanRequest": change_plan_request
"/reseller:v1/reseller.subscriptions.changeRenewalSettings": change_subscription_renewal_settings
"/reseller:v1/reseller.subscriptions.changeSeats": change_subscription_seats
"/resourceviews:v1beta2/ZoneViewsAddResourcesRequest": add_resources_request
"/resourceviews:v1beta2/ZoneViewsGetServiceResponse": get_service_response
"/resourceviews:v1beta2/ZoneViewsListResourcesResponse": list_resources_response
"/resourceviews:v1beta2/ZoneViewsRemoveResourcesRequest": remove_resources_request
"/resourceviews:v1beta2/ZoneViewsSetServiceRequest": set_service_request
"/siteVerification:v1/SiteVerificationWebResourceGettokenRequest": get_web_resource_token_request
"/siteVerification:v1/SiteVerificationWebResourceGettokenResponse": get_web_resource_token_response
"/siteVerification:v1/SiteVerificationWebResourceGettokenResponse/method": verification_method
"/siteVerification:v1/SiteVerificationWebResourceListResponse": list_web_resource_response
"/sqladmin:v1beta4/BackupRunsListResponse": list_backup_runs_response
"/sqladmin:v1beta4/DatabasesListResponse": list_databases_response
"/sqladmin:v1beta4/FlagsListResponse": list_flags_response
"/sqladmin:v1beta4/InstancesCloneRequest": clone_instances_request
"/sqladmin:v1beta4/InstancesExportRequest": export_instances_request
"/sqladmin:v1beta4/InstancesImportRequest": import_instances_request
"/sqladmin:v1beta4/InstancesListResponse": list_instances_response
"/sqladmin:v1beta4/InstancesRestoreBackupRequest": restore_instances_backup_request
"/sqladmin:v1beta4/OperationsListResponse": list_operations_response
"/sqladmin:v1beta4/SslCertsInsertRequest": insert_ssl_certs_request
"/sqladmin:v1beta4/SslCertsInsertResponse": insert_ssl_certs_response
"/sqladmin:v1beta4/SslCertsListResponse": list_ssl_certs_response
"/sqladmin:v1beta4/TiersListResponse": list_tiers_response
"/sqladmin:v1beta4/UsersListResponse": list_users_response
"/storage:v1/Bucket/cors": cors_configurations
"/storage:v1/Bucket/cors/cors_configuration/method": http_method
"/tagmanager:v1/tagmanager.accounts.containers.create": create_container
"/tagmanager:v1/tagmanager.accounts.containers.delete": delete_container
"/tagmanager:v1/tagmanager.accounts.containers.get": get_container
"/tagmanager:v1/tagmanager.accounts.containers.list": list_containers
"/tagmanager:v1/tagmanager.accounts.containers.macros.create": create_macro
"/tagmanager:v1/tagmanager.accounts.containers.macros.delete": delete_macro
"/tagmanager:v1/tagmanager.accounts.containers.macros.get": get_macro
"/tagmanager:v1/tagmanager.accounts.containers.macros.list": list_macros
"/tagmanager:v1/tagmanager.accounts.containers.macros.update": update_macro
"/tagmanager:v1/tagmanager.accounts.containers.rules.create": create_rule
"/tagmanager:v1/tagmanager.accounts.containers.rules.delete": delete_rule
"/tagmanager:v1/tagmanager.accounts.containers.rules.get": get_rule
"/tagmanager:v1/tagmanager.accounts.containers.rules.list": list_rules
"/tagmanager:v1/tagmanager.accounts.containers.rules.update": update_rule
"/tagmanager:v1/tagmanager.accounts.containers.tags.create": create_tag
"/tagmanager:v1/tagmanager.accounts.containers.tags.delete": delete_tag
"/tagmanager:v1/tagmanager.accounts.containers.tags.get": get_tag
"/tagmanager:v1/tagmanager.accounts.containers.tags.list": list_tags
"/tagmanager:v1/tagmanager.accounts.containers.tags.update": update_tag
"/tagmanager:v1/tagmanager.accounts.containers.triggers.create": create_trigger
"/tagmanager:v1/tagmanager.accounts.containers.triggers.delete": delete_trigger
"/tagmanager:v1/tagmanager.accounts.containers.triggers.get": get_trigger
"/tagmanager:v1/tagmanager.accounts.containers.triggers.list": list_triggers
"/tagmanager:v1/tagmanager.accounts.containers.triggers.update": update_trigger
"/tagmanager:v1/tagmanager.accounts.containers.update": update_container
"/tagmanager:v1/tagmanager.accounts.containers.variables.create": create_variable
"/tagmanager:v1/tagmanager.accounts.containers.variables.delete": delete_variable
"/tagmanager:v1/tagmanager.accounts.containers.variables.get": get_variable
"/tagmanager:v1/tagmanager.accounts.containers.variables.list": list_variables
"/tagmanager:v1/tagmanager.accounts.containers.variables.update": update_variable
"/tagmanager:v1/tagmanager.accounts.containers.versions.create": create_version
"/tagmanager:v1/tagmanager.accounts.containers.versions.delete": delete_version
"/tagmanager:v1/tagmanager.accounts.containers.versions.get": get_version
"/tagmanager:v1/tagmanager.accounts.containers.versions.list": list_versions
"/tagmanager:v1/tagmanager.accounts.containers.versions.publish": publish_version
"/tagmanager:v1/tagmanager.accounts.containers.versions.restore": restore_version
"/tagmanager:v1/tagmanager.accounts.containers.versions.undelete": undelete_version
"/tagmanager:v1/tagmanager.accounts.containers.versions.update": update_version
"/tagmanager:v1/tagmanager.accounts.get": get_account
"/tagmanager:v1/tagmanager.accounts.list": list_accounts
"/tagmanager:v1/tagmanager.accounts.permissions.create": create_permission
"/tagmanager:v1/tagmanager.accounts.permissions.delete": delete_permission
"/tagmanager:v1/tagmanager.accounts.permissions.get": get_permission
"/tagmanager:v1/tagmanager.accounts.permissions.list": list_permissions
"/tagmanager:v1/tagmanager.accounts.permissions.update": update_permission
"/tagmanager:v1/tagmanager.accounts.update": update_account
"/translate:v2/DetectionsListResponse": list_detections_response
"/translate:v2/LanguagesListResponse": list_languages_response
"/translate:v2/TranslationsListResponse": list_translations_response
"/webmasters:v3/SitemapsListResponse": list_sitemaps_response
"/webmasters:v3/SitesListResponse": list_sites_response
"/webmasters:v3/UrlCrawlErrorsCountsQueryResponse": query_url_crawl_errors_counts_response
"/webmasters:v3/UrlCrawlErrorsSamplesListResponse": list_url_crawl_errors_samples_response
"/webmasters:v3/webmasters.urlcrawlerrorscounts.query": query_errors_count
"/webmasters:v3/webmasters.urlcrawlerrorssamples.get": get_errors_sample
"/webmasters:v3/webmasters.urlcrawlerrorssamples.list": list_errors_samples
"/webmasters:v3/webmasters.urlcrawlerrorssamples.markAsFixed": mark_as_fixed
"/youtube:v3/youtube.comments.setModerationStatus": set_comment_moderation_status
"/youtube:v3/ActivityListResponse": list_activities_response
"/youtube:v3/CaptionListResponse": list_captions_response
"/youtube:v3/ChannelListResponse": list_channels_response
"/youtube:v3/ChannelSectionListResponse": list_channel_sections_response
"/youtube:v3/CommentListResponse": list_comments_response
"/youtube:v3/CommentThreadListResponse": list_comment_threads_response
"/youtube:v3/GuideCategoryListResponse": list_guide_categories_response
"/youtube:v3/I18nLanguageListResponse": list_i18n_languages_response
"/youtube:v3/I18nRegionListResponse": list_i18n_regions_response
"/youtube:v3/LiveBroadcastListResponse": list_live_broadcasts_response
"/youtube:v3/LiveStreamListResponse": list_live_streams_response
"/youtube:v3/PlaylistItemListResponse": list_playlist_items_response
"/youtube:v3/PlaylistListResponse": list_playlist_response
"/youtube:v3/SearchListResponse": search_lists_response
"/youtube:v3/SubscriptionListResponse": list_subscription_response
"/youtube:v3/ThumbnailSetResponse": set_thumbnail_response
"/youtube:v3/VideoAbuseReportReasonListResponse": list_video_abuse_report_reason_response
"/youtube:v3/VideoCategoryListResponse": list_video_category_response
"/youtube:v3/VideoGetRatingResponse": get_video_rating_response
"/youtube:v3/VideoListResponse": list_videos_response
"/youtubeAnalytics:v1/GroupItemListResponse": list_group_item_response
"/youtubeAnalytics:v1/GroupListResponse": list_groups_response

20797
api_names_out.yaml Normal file

File diff suppressed because it is too large Load Diff

93
bin/generate-api Executable file
View File

@ -0,0 +1,93 @@
#!/usr/bin/env ruby
# TODO - Repeated params
require 'thor'
require 'open-uri'
require 'google/apis/discovery_v1'
require 'google/apis/generator'
require 'multi_json'
require 'logger'
module Google
class ApiGenerator < Thor
include Thor::Actions
Google::Apis::ClientOptions.default.application_name = "generate-api"
Google::Apis::ClientOptions.default.application_version = Google::Apis::VERSION
Discovery = Google::Apis::DiscoveryV1
desc 'gen OUTDIR', 'Generate ruby API from an API description'
method_options url: :string, file: :string, id: :array, preferred_only: :boolean, verbose: :boolean, names: :string, names_out: :string
method_option :preferred_only, default: true
def gen(dir)
self.destination_root = dir
Google::Apis.logger.level = Logger::DEBUG if options[:verbose]
if options[:url]
generate_from_url(options[:url])
elsif options[:file]
generate_from_file(options[:file])
else
generate_from_discovery(preferred_only: options[:preferred_only], id: options[:id] )
end
create_file(options[:names_out]) { |*| generator.dump_api_names } if options[:names_out]
end
desc 'list', 'List public APIs'
method_options verbose: :boolean, preferred_only: :boolean
def list
Google::Apis.logger.level = Logger::DEBUG if options[:verbose]
discovery = Discovery::DiscoveryService.new
apis = discovery.list_apis
apis.items.each do |api|
say sprintf('%s - %s', api.id, api.description).strip unless options[:preferred_only] && !api.preferred?
end
end
no_commands do
def generate_from_url(url)
json = discovery.http(:get, url)
generate_api(json)
end
def generate_from_file(file)
File.open(file) do |f|
generate_api(f.read)
end
end
def generate_from_discovery(preferred_only: false, id: nil)
say 'Fetching API list'
id = Array(id)
apis = discovery.list_apis
apis.items.each do |api|
if (id.empty? && preferred_only && api.preferred?) || id.include?(api.id)
say sprintf('Loading %s, version %s from %s', api.name, api.version, api.discovery_rest_url)
generate_from_url(api.discovery_rest_url)
else
say sprintf('Ignoring disoverable API %s', api.id)
end
end
end
def generate_api(json)
files = generator.render(json)
files.each do |file, content|
create_file(file) { |*| content }
end
end
def discovery
@discovery ||= Discovery::DiscoveryService.new
end
def generator
@generator ||= Google::Apis::Generator.new(api_names: options[:names])
end
end
end
end
Google::ApiGenerator.start(ARGV)

View File

@ -0,0 +1,35 @@
# Copyright 2015 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.
require 'google/apis/adexchangebuyer_v1_3/service.rb'
require 'google/apis/adexchangebuyer_v1_3/classes.rb'
require 'google/apis/adexchangebuyer_v1_3/representations.rb'
module Google
module Apis
# Ad Exchange Buyer API
#
# Accesses your bidding-account information, submits creatives for validation,
# finds available direct deals, and retrieves performance reports.
#
# @see https://developers.google.com/ad-exchange/buyer-rest
module AdexchangebuyerV1_3
VERSION = 'V1_3'
REVISION = '20150520'
# Manage your Ad Exchange buyer account configuration
AUTH_ADEXCHANGE_BUYER = 'https://www.googleapis.com/auth/adexchange.buyer'
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,375 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AdexchangebuyerV1_3
class Account
class Representation < Google::Apis::Core::JsonRepresentation; end
class BidderLocation
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class AccountsList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class BillingInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class BillingInfoList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Budget
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Creative
class Representation < Google::Apis::Core::JsonRepresentation; end
class Correction
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class DisapprovalReason
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class FilteringReasons
class Representation < Google::Apis::Core::JsonRepresentation; end
class Reason
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
end
class CreativesList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class DirectDeal
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class DirectDealsList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PerformanceReport
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PerformanceReportList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PretargetingConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
class Dimension
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ExcludedPlacement
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Placement
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class PretargetingConfigList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class Account
class Representation < Google::Apis::Core::JsonRepresentation
collection :bidder_location, as: 'bidderLocation', class: Google::Apis::AdexchangebuyerV1_3::Account::BidderLocation, decorator: Google::Apis::AdexchangebuyerV1_3::Account::BidderLocation::Representation
property :cookie_matching_nid, as: 'cookieMatchingNid'
property :cookie_matching_url, as: 'cookieMatchingUrl'
property :id, as: 'id'
property :kind, as: 'kind'
property :maximum_active_creatives, as: 'maximumActiveCreatives'
property :maximum_total_qps, as: 'maximumTotalQps'
property :number_active_creatives, as: 'numberActiveCreatives'
end
# @private
class BidderLocation
class Representation < Google::Apis::Core::JsonRepresentation
property :maximum_qps, as: 'maximumQps'
property :region, as: 'region'
property :url, as: 'url'
end
end
end
# @private
class AccountsList
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::AdexchangebuyerV1_3::Account, decorator: Google::Apis::AdexchangebuyerV1_3::Account::Representation
property :kind, as: 'kind'
end
end
# @private
class BillingInfo
class Representation < Google::Apis::Core::JsonRepresentation
property :account_id, as: 'accountId'
property :account_name, as: 'accountName'
collection :billing_id, as: 'billingId'
property :kind, as: 'kind'
end
end
# @private
class BillingInfoList
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::AdexchangebuyerV1_3::BillingInfo, decorator: Google::Apis::AdexchangebuyerV1_3::BillingInfo::Representation
property :kind, as: 'kind'
end
end
# @private
class Budget
class Representation < Google::Apis::Core::JsonRepresentation
property :account_id, as: 'accountId'
property :billing_id, as: 'billingId'
property :budget_amount, as: 'budgetAmount'
property :currency_code, as: 'currencyCode'
property :id, as: 'id'
property :kind, as: 'kind'
end
end
# @private
class Creative
class Representation < Google::Apis::Core::JsonRepresentation
property :html_snippet, as: 'HTMLSnippet'
property :account_id, as: 'accountId'
collection :advertiser_id, as: 'advertiserId'
property :advertiser_name, as: 'advertiserName'
property :agency_id, as: 'agencyId'
collection :attribute, as: 'attribute'
property :buyer_creative_id, as: 'buyerCreativeId'
collection :click_through_url, as: 'clickThroughUrl'
collection :corrections, as: 'corrections', class: Google::Apis::AdexchangebuyerV1_3::Creative::Correction, decorator: Google::Apis::AdexchangebuyerV1_3::Creative::Correction::Representation
collection :disapproval_reasons, as: 'disapprovalReasons', class: Google::Apis::AdexchangebuyerV1_3::Creative::DisapprovalReason, decorator: Google::Apis::AdexchangebuyerV1_3::Creative::DisapprovalReason::Representation
property :filtering_reasons, as: 'filteringReasons', class: Google::Apis::AdexchangebuyerV1_3::Creative::FilteringReasons, decorator: Google::Apis::AdexchangebuyerV1_3::Creative::FilteringReasons::Representation
property :height, as: 'height'
property :kind, as: 'kind'
collection :product_categories, as: 'productCategories'
collection :restricted_categories, as: 'restrictedCategories'
collection :sensitive_categories, as: 'sensitiveCategories'
property :status, as: 'status'
collection :vendor_type, as: 'vendorType'
property :video_url, as: 'videoURL'
property :width, as: 'width'
end
# @private
class Correction
class Representation < Google::Apis::Core::JsonRepresentation
collection :details, as: 'details'
property :reason, as: 'reason'
end
end
# @private
class DisapprovalReason
class Representation < Google::Apis::Core::JsonRepresentation
collection :details, as: 'details'
property :reason, as: 'reason'
end
end
# @private
class FilteringReasons
class Representation < Google::Apis::Core::JsonRepresentation
property :date, as: 'date'
collection :reasons, as: 'reasons', class: Google::Apis::AdexchangebuyerV1_3::Creative::FilteringReasons::Reason, decorator: Google::Apis::AdexchangebuyerV1_3::Creative::FilteringReasons::Reason::Representation
end
# @private
class Reason
class Representation < Google::Apis::Core::JsonRepresentation
property :filtering_count, as: 'filteringCount'
property :filtering_status, as: 'filteringStatus'
end
end
end
end
# @private
class CreativesList
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::AdexchangebuyerV1_3::Creative, decorator: Google::Apis::AdexchangebuyerV1_3::Creative::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class DirectDeal
class Representation < Google::Apis::Core::JsonRepresentation
property :account_id, as: 'accountId'
property :advertiser, as: 'advertiser'
property :currency_code, as: 'currencyCode'
property :end_time, as: 'endTime'
property :fixed_cpm, as: 'fixedCpm'
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
property :private_exchange_min_cpm, as: 'privateExchangeMinCpm'
property :publisher_blocks_overriden, as: 'publisherBlocksOverriden'
property :seller_network, as: 'sellerNetwork'
property :start_time, as: 'startTime'
end
end
# @private
class DirectDealsList
class Representation < Google::Apis::Core::JsonRepresentation
collection :direct_deals, as: 'directDeals', class: Google::Apis::AdexchangebuyerV1_3::DirectDeal, decorator: Google::Apis::AdexchangebuyerV1_3::DirectDeal::Representation
property :kind, as: 'kind'
end
end
# @private
class PerformanceReport
class Representation < Google::Apis::Core::JsonRepresentation
property :bid_rate, as: 'bidRate'
property :bid_request_rate, as: 'bidRequestRate'
collection :callout_status_rate, as: 'calloutStatusRate'
collection :cookie_matcher_status_rate, as: 'cookieMatcherStatusRate'
collection :creative_status_rate, as: 'creativeStatusRate'
property :filtered_bid_rate, as: 'filteredBidRate'
collection :hosted_match_status_rate, as: 'hostedMatchStatusRate'
property :inventory_match_rate, as: 'inventoryMatchRate'
property :kind, as: 'kind'
property :latency_50th_percentile, as: 'latency50thPercentile'
property :latency_85th_percentile, as: 'latency85thPercentile'
property :latency_95th_percentile, as: 'latency95thPercentile'
property :no_quota_in_region, as: 'noQuotaInRegion'
property :out_of_quota, as: 'outOfQuota'
property :pixel_match_requests, as: 'pixelMatchRequests'
property :pixel_match_responses, as: 'pixelMatchResponses'
property :quota_configured_limit, as: 'quotaConfiguredLimit'
property :quota_throttled_limit, as: 'quotaThrottledLimit'
property :region, as: 'region'
property :successful_request_rate, as: 'successfulRequestRate'
property :timestamp, as: 'timestamp'
property :unsuccessful_request_rate, as: 'unsuccessfulRequestRate'
end
end
# @private
class PerformanceReportList
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
collection :performance_report, as: 'performanceReport', class: Google::Apis::AdexchangebuyerV1_3::PerformanceReport, decorator: Google::Apis::AdexchangebuyerV1_3::PerformanceReport::Representation
end
end
# @private
class PretargetingConfig
class Representation < Google::Apis::Core::JsonRepresentation
property :billing_id, as: 'billingId'
property :config_id, as: 'configId'
property :config_name, as: 'configName'
collection :creative_type, as: 'creativeType'
collection :dimensions, as: 'dimensions', class: Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Dimension, decorator: Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Dimension::Representation
collection :excluded_content_labels, as: 'excludedContentLabels'
collection :excluded_geo_criteria_ids, as: 'excludedGeoCriteriaIds'
collection :excluded_placements, as: 'excludedPlacements', class: Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::ExcludedPlacement, decorator: Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::ExcludedPlacement::Representation
collection :excluded_user_lists, as: 'excludedUserLists'
collection :excluded_verticals, as: 'excludedVerticals'
collection :geo_criteria_ids, as: 'geoCriteriaIds'
property :is_active, as: 'isActive'
property :kind, as: 'kind'
collection :languages, as: 'languages'
collection :mobile_carriers, as: 'mobileCarriers'
collection :mobile_devices, as: 'mobileDevices'
collection :mobile_operating_system_versions, as: 'mobileOperatingSystemVersions'
collection :placements, as: 'placements', class: Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Placement, decorator: Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Placement::Representation
collection :platforms, as: 'platforms'
collection :supported_creative_attributes, as: 'supportedCreativeAttributes'
collection :user_lists, as: 'userLists'
collection :vendor_types, as: 'vendorTypes'
collection :verticals, as: 'verticals'
end
# @private
class Dimension
class Representation < Google::Apis::Core::JsonRepresentation
property :height, as: 'height'
property :width, as: 'width'
end
end
# @private
class ExcludedPlacement
class Representation < Google::Apis::Core::JsonRepresentation
property :token, as: 'token'
property :type, as: 'type'
end
end
# @private
class Placement
class Representation < Google::Apis::Core::JsonRepresentation
property :token, as: 'token'
property :type, as: 'type'
end
end
end
# @private
class PretargetingConfigList
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::AdexchangebuyerV1_3::PretargetingConfig, decorator: Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Representation
property :kind, as: 'kind'
end
end
end
end
end

View File

@ -0,0 +1,893 @@
# Copyright 2015 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.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AdexchangebuyerV1_3
# Ad Exchange Buyer API
#
# Accesses your bidding-account information, submits creatives for validation,
# finds available direct deals, and retrieves performance reports.
#
# @example
# require 'google/apis/adexchangebuyer_v1_3'
#
# Adexchangebuyer = Google::Apis::AdexchangebuyerV1_3 # Alias the module
# service = Adexchangebuyer::AdExchangeBuyerService.new
#
# @see https://developers.google.com/ad-exchange/buyer-rest
class AdExchangeBuyerService < Google::Apis::Core::BaseService
# @return [String]
# 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.
attr_accessor :key
# @return [String]
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
attr_accessor :quota_user
# @return [String]
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
attr_accessor :user_ip
def initialize
super('https://www.googleapis.com/', 'adexchangebuyer/v1.3/')
end
# Gets one account by ID.
# @param [Fixnum] id
# The account id
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangebuyerV1_3::Account] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangebuyerV1_3::Account]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_account(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{id}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangebuyerV1_3::Account::Representation
command.response_class = Google::Apis::AdexchangebuyerV1_3::Account
command.params['id'] = id unless id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Retrieves the authenticated user's list of accounts.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangebuyerV1_3::AccountsList] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangebuyerV1_3::AccountsList]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_accounts(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangebuyerV1_3::AccountsList::Representation
command.response_class = Google::Apis::AdexchangebuyerV1_3::AccountsList
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Updates an existing account. This method supports patch semantics.
# @param [Fixnum] id
# The account id
# @param [Google::Apis::AdexchangebuyerV1_3::Account] account_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangebuyerV1_3::Account] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangebuyerV1_3::Account]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def patch_account(id, account_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{id}'
command = make_simple_command(:patch, path, options)
command.request_representation = Google::Apis::AdexchangebuyerV1_3::Account::Representation
command.request_object = account_object
command.response_representation = Google::Apis::AdexchangebuyerV1_3::Account::Representation
command.response_class = Google::Apis::AdexchangebuyerV1_3::Account
command.params['id'] = id unless id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Updates an existing account.
# @param [Fixnum] id
# The account id
# @param [Google::Apis::AdexchangebuyerV1_3::Account] account_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangebuyerV1_3::Account] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangebuyerV1_3::Account]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_account(id, account_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{id}'
command = make_simple_command(:put, path, options)
command.request_representation = Google::Apis::AdexchangebuyerV1_3::Account::Representation
command.request_object = account_object
command.response_representation = Google::Apis::AdexchangebuyerV1_3::Account::Representation
command.response_class = Google::Apis::AdexchangebuyerV1_3::Account
command.params['id'] = id unless id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Returns the billing information for one account specified by account ID.
# @param [Fixnum] account_id
# The account id.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangebuyerV1_3::BillingInfo] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangebuyerV1_3::BillingInfo]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_billing_info(account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'billinginfo/{accountId}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangebuyerV1_3::BillingInfo::Representation
command.response_class = Google::Apis::AdexchangebuyerV1_3::BillingInfo
command.params['accountId'] = account_id unless account_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a list of billing information for all accounts of the authenticated
# user.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangebuyerV1_3::BillingInfoList] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangebuyerV1_3::BillingInfoList]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_billing_infos(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'billinginfo'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangebuyerV1_3::BillingInfoList::Representation
command.response_class = Google::Apis::AdexchangebuyerV1_3::BillingInfoList
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Returns the budget information for the adgroup specified by the accountId and
# billingId.
# @param [String] account_id
# The account id to get the budget information for.
# @param [String] billing_id
# The billing id to get the budget information for.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangebuyerV1_3::Budget] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangebuyerV1_3::Budget]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_budget(account_id, billing_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'billinginfo/{accountId}/{billingId}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangebuyerV1_3::Budget::Representation
command.response_class = Google::Apis::AdexchangebuyerV1_3::Budget
command.params['accountId'] = account_id unless account_id.nil?
command.params['billingId'] = billing_id unless billing_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Updates the budget amount for the budget of the adgroup specified by the
# accountId and billingId, with the budget amount in the request. This method
# supports patch semantics.
# @param [String] account_id
# The account id associated with the budget being updated.
# @param [String] billing_id
# The billing id associated with the budget being updated.
# @param [Google::Apis::AdexchangebuyerV1_3::Budget] budget_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangebuyerV1_3::Budget] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangebuyerV1_3::Budget]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def patch_budget(account_id, billing_id, budget_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'billinginfo/{accountId}/{billingId}'
command = make_simple_command(:patch, path, options)
command.request_representation = Google::Apis::AdexchangebuyerV1_3::Budget::Representation
command.request_object = budget_object
command.response_representation = Google::Apis::AdexchangebuyerV1_3::Budget::Representation
command.response_class = Google::Apis::AdexchangebuyerV1_3::Budget
command.params['accountId'] = account_id unless account_id.nil?
command.params['billingId'] = billing_id unless billing_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Updates the budget amount for the budget of the adgroup specified by the
# accountId and billingId, with the budget amount in the request.
# @param [String] account_id
# The account id associated with the budget being updated.
# @param [String] billing_id
# The billing id associated with the budget being updated.
# @param [Google::Apis::AdexchangebuyerV1_3::Budget] budget_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangebuyerV1_3::Budget] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangebuyerV1_3::Budget]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_budget(account_id, billing_id, budget_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'billinginfo/{accountId}/{billingId}'
command = make_simple_command(:put, path, options)
command.request_representation = Google::Apis::AdexchangebuyerV1_3::Budget::Representation
command.request_object = budget_object
command.response_representation = Google::Apis::AdexchangebuyerV1_3::Budget::Representation
command.response_class = Google::Apis::AdexchangebuyerV1_3::Budget
command.params['accountId'] = account_id unless account_id.nil?
command.params['billingId'] = billing_id unless billing_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Gets the status for a single creative. A creative will be available 30-40
# minutes after submission.
# @param [Fixnum] account_id
# The id for the account that will serve this creative.
# @param [String] buyer_creative_id
# The buyer-specific id for this creative.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangebuyerV1_3::Creative] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangebuyerV1_3::Creative]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_creative(account_id, buyer_creative_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'creatives/{accountId}/{buyerCreativeId}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangebuyerV1_3::Creative::Representation
command.response_class = Google::Apis::AdexchangebuyerV1_3::Creative
command.params['accountId'] = account_id unless account_id.nil?
command.params['buyerCreativeId'] = buyer_creative_id unless buyer_creative_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Submit a new creative.
# @param [Google::Apis::AdexchangebuyerV1_3::Creative] creative_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangebuyerV1_3::Creative] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangebuyerV1_3::Creative]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def insert_creative(creative_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'creatives'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::AdexchangebuyerV1_3::Creative::Representation
command.request_object = creative_object
command.response_representation = Google::Apis::AdexchangebuyerV1_3::Creative::Representation
command.response_class = Google::Apis::AdexchangebuyerV1_3::Creative
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a list of the authenticated user's active creatives. A creative will
# be available 30-40 minutes after submission.
# @param [Array<Fixnum>, Fixnum] account_id
# When specified, only creatives for the given account ids are returned.
# @param [Array<String>, String] buyer_creative_id
# When specified, only creatives for the given buyer creative ids are returned.
# @param [Fixnum] max_results
# Maximum number of entries returned on one result page. If not set, the default
# is 100. Optional.
# @param [String] page_token
# A continuation token, used to page through ad clients. To retrieve the next
# page, set this parameter to the value of "nextPageToken" from the previous
# response. Optional.
# @param [String] status_filter
# When specified, only creatives having the given status are returned.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangebuyerV1_3::CreativesList] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangebuyerV1_3::CreativesList]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_creatives(account_id: nil, buyer_creative_id: nil, max_results: nil, page_token: nil, status_filter: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'creatives'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangebuyerV1_3::CreativesList::Representation
command.response_class = Google::Apis::AdexchangebuyerV1_3::CreativesList
command.query['accountId'] = account_id unless account_id.nil?
command.query['buyerCreativeId'] = buyer_creative_id unless buyer_creative_id.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['statusFilter'] = status_filter unless status_filter.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Gets one direct deal by ID.
# @param [String] id
# The direct deal id
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangebuyerV1_3::DirectDeal] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangebuyerV1_3::DirectDeal]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_direct_deal(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'directdeals/{id}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangebuyerV1_3::DirectDeal::Representation
command.response_class = Google::Apis::AdexchangebuyerV1_3::DirectDeal
command.params['id'] = id unless id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Retrieves the authenticated user's list of direct deals.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangebuyerV1_3::DirectDealsList] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangebuyerV1_3::DirectDealsList]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_direct_deals(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'directdeals'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangebuyerV1_3::DirectDealsList::Representation
command.response_class = Google::Apis::AdexchangebuyerV1_3::DirectDealsList
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Retrieves the authenticated user's list of performance metrics.
# @param [String] account_id
# The account id to get the reports.
# @param [String] end_date_time
# The end time of the report in ISO 8601 timestamp format using UTC.
# @param [Fixnum] max_results
# Maximum number of entries returned on one result page. If not set, the default
# is 100. Optional.
# @param [String] page_token
# A continuation token, used to page through performance reports. To retrieve
# the next page, set this parameter to the value of "nextPageToken" from the
# previous response. Optional.
# @param [String] start_date_time
# The start time of the report in ISO 8601 timestamp format using UTC.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangebuyerV1_3::PerformanceReportList] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangebuyerV1_3::PerformanceReportList]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_performance_reports(account_id: nil, end_date_time: nil, max_results: nil, page_token: nil, start_date_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'performancereport'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangebuyerV1_3::PerformanceReportList::Representation
command.response_class = Google::Apis::AdexchangebuyerV1_3::PerformanceReportList
command.query['accountId'] = account_id unless account_id.nil?
command.query['endDateTime'] = end_date_time unless end_date_time.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['startDateTime'] = start_date_time unless start_date_time.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Deletes an existing pretargeting config.
# @param [String] account_id
# The account id to delete the pretargeting config for.
# @param [String] config_id
# The specific id of the configuration to delete.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_pretargeting_config(account_id, config_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'pretargetingconfigs/{accountId}/{configId}'
command = make_simple_command(:delete, path, options)
command.params['accountId'] = account_id unless account_id.nil?
command.params['configId'] = config_id unless config_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Gets a specific pretargeting configuration
# @param [String] account_id
# The account id to get the pretargeting config for.
# @param [String] config_id
# The specific id of the configuration to retrieve.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangebuyerV1_3::PretargetingConfig] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangebuyerV1_3::PretargetingConfig]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_pretargeting_config(account_id, config_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'pretargetingconfigs/{accountId}/{configId}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Representation
command.response_class = Google::Apis::AdexchangebuyerV1_3::PretargetingConfig
command.params['accountId'] = account_id unless account_id.nil?
command.params['configId'] = config_id unless config_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Inserts a new pretargeting configuration.
# @param [String] account_id
# The account id to insert the pretargeting config for.
# @param [Google::Apis::AdexchangebuyerV1_3::PretargetingConfig] pretargeting_config_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangebuyerV1_3::PretargetingConfig] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangebuyerV1_3::PretargetingConfig]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def insert_pretargeting_config(account_id, pretargeting_config_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'pretargetingconfigs/{accountId}'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Representation
command.request_object = pretargeting_config_object
command.response_representation = Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Representation
command.response_class = Google::Apis::AdexchangebuyerV1_3::PretargetingConfig
command.params['accountId'] = account_id unless account_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a list of the authenticated user's pretargeting configurations.
# @param [String] account_id
# The account id to get the pretargeting configs for.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangebuyerV1_3::PretargetingConfigList] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangebuyerV1_3::PretargetingConfigList]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_pretargeting_configs(account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'pretargetingconfigs/{accountId}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangebuyerV1_3::PretargetingConfigList::Representation
command.response_class = Google::Apis::AdexchangebuyerV1_3::PretargetingConfigList
command.params['accountId'] = account_id unless account_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Updates an existing pretargeting config. This method supports patch semantics.
# @param [String] account_id
# The account id to update the pretargeting config for.
# @param [String] config_id
# The specific id of the configuration to update.
# @param [Google::Apis::AdexchangebuyerV1_3::PretargetingConfig] pretargeting_config_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangebuyerV1_3::PretargetingConfig] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangebuyerV1_3::PretargetingConfig]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def patch_pretargeting_config(account_id, config_id, pretargeting_config_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'pretargetingconfigs/{accountId}/{configId}'
command = make_simple_command(:patch, path, options)
command.request_representation = Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Representation
command.request_object = pretargeting_config_object
command.response_representation = Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Representation
command.response_class = Google::Apis::AdexchangebuyerV1_3::PretargetingConfig
command.params['accountId'] = account_id unless account_id.nil?
command.params['configId'] = config_id unless config_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Updates an existing pretargeting config.
# @param [String] account_id
# The account id to update the pretargeting config for.
# @param [String] config_id
# The specific id of the configuration to update.
# @param [Google::Apis::AdexchangebuyerV1_3::PretargetingConfig] pretargeting_config_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangebuyerV1_3::PretargetingConfig] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangebuyerV1_3::PretargetingConfig]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_pretargeting_config(account_id, config_id, pretargeting_config_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'pretargetingconfigs/{accountId}/{configId}'
command = make_simple_command(:put, path, options)
command.request_representation = Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Representation
command.request_object = pretargeting_config_object
command.response_representation = Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Representation
command.response_class = Google::Apis::AdexchangebuyerV1_3::PretargetingConfig
command.params['accountId'] = account_id unless account_id.nil?
command.params['configId'] = config_id unless config_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
protected
def apply_command_defaults(command)
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
end
end
end
end
end

View File

@ -0,0 +1,38 @@
# Copyright 2015 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.
require 'google/apis/adexchangeseller_v2_0/service.rb'
require 'google/apis/adexchangeseller_v2_0/classes.rb'
require 'google/apis/adexchangeseller_v2_0/representations.rb'
module Google
module Apis
# Ad Exchange Seller API
#
# Gives Ad Exchange seller users access to their inventory and the ability to
# generate reports
#
# @see https://developers.google.com/ad-exchange/seller-rest/
module AdexchangesellerV2_0
VERSION = 'V2_0'
REVISION = '20150420'
# View and manage your Ad Exchange data
AUTH_ADEXCHANGE_SELLER = 'https://www.googleapis.com/auth/adexchange.seller'
# View your Ad Exchange data
AUTH_ADEXCHANGE_SELLER_READONLY = 'https://www.googleapis.com/auth/adexchange.seller.readonly'
end
end
end

View File

@ -0,0 +1,792 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AdexchangesellerV2_0
#
class Account
include Google::Apis::Core::Hashable
# Unique identifier of this account.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Kind of resource this is, in this case adexchangeseller#account.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Name of this account.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@name = args[:name] unless args[:name].nil?
end
end
#
class Accounts
include Google::Apis::Core::Hashable
# ETag of this response for caching purposes.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# The accounts returned in this list response.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AdexchangesellerV2_0::Account>]
attr_accessor :items
# Kind of list this is, in this case adexchangeseller#accounts.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Continuation token used to page through accounts. To retrieve the next page of
# results, set the next request's "pageToken" value to this.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@etag = args[:etag] unless args[:etag].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
#
class AdClient
include Google::Apis::Core::Hashable
# Whether this ad client is opted in to ARC.
# Corresponds to the JSON property `arcOptIn`
# @return [Boolean]
attr_accessor :arc_opt_in
alias_method :arc_opt_in?, :arc_opt_in
# Unique identifier of this ad client.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Kind of resource this is, in this case adexchangeseller#adClient.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# This ad client's product code, which corresponds to the PRODUCT_CODE report
# dimension.
# Corresponds to the JSON property `productCode`
# @return [String]
attr_accessor :product_code
# Whether this ad client supports being reported on.
# Corresponds to the JSON property `supportsReporting`
# @return [Boolean]
attr_accessor :supports_reporting
alias_method :supports_reporting?, :supports_reporting
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@arc_opt_in = args[:arc_opt_in] unless args[:arc_opt_in].nil?
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@product_code = args[:product_code] unless args[:product_code].nil?
@supports_reporting = args[:supports_reporting] unless args[:supports_reporting].nil?
end
end
#
class AdClients
include Google::Apis::Core::Hashable
# ETag of this response for caching purposes.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# The ad clients returned in this list response.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AdexchangesellerV2_0::AdClient>]
attr_accessor :items
# Kind of list this is, in this case adexchangeseller#adClients.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Continuation token used to page through ad clients. To retrieve the next page
# of results, set the next request's "pageToken" value to this.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@etag = args[:etag] unless args[:etag].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
#
class Alert
include Google::Apis::Core::Hashable
# Unique identifier of this alert. This should be considered an opaque
# identifier; it is not safe to rely on it being in any particular format.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Kind of resource this is, in this case adexchangeseller#alert.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The localized alert message.
# Corresponds to the JSON property `message`
# @return [String]
attr_accessor :message
# Severity of this alert. Possible values: INFO, WARNING, SEVERE.
# Corresponds to the JSON property `severity`
# @return [String]
attr_accessor :severity
# Type of this alert. Possible values: SELF_HOLD, MIGRATED_TO_BILLING3,
# ADDRESS_PIN_VERIFICATION, PHONE_PIN_VERIFICATION, CORPORATE_ENTITY,
# GRAYLISTED_PUBLISHER, API_HOLD.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@message = args[:message] unless args[:message].nil?
@severity = args[:severity] unless args[:severity].nil?
@type = args[:type] unless args[:type].nil?
end
end
#
class Alerts
include Google::Apis::Core::Hashable
# The alerts returned in this list response.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AdexchangesellerV2_0::Alert>]
attr_accessor :items
# Kind of list this is, in this case adexchangeseller#alerts.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
end
end
#
class CustomChannel
include Google::Apis::Core::Hashable
# Code of this custom channel, not necessarily unique across ad clients.
# Corresponds to the JSON property `code`
# @return [String]
attr_accessor :code
# Unique identifier of this custom channel. This should be considered an opaque
# identifier; it is not safe to rely on it being in any particular format.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Kind of resource this is, in this case adexchangeseller#customChannel.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Name of this custom channel.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The targeting information of this custom channel, if activated.
# Corresponds to the JSON property `targetingInfo`
# @return [Google::Apis::AdexchangesellerV2_0::CustomChannel::TargetingInfo]
attr_accessor :targeting_info
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@code = args[:code] unless args[:code].nil?
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@name = args[:name] unless args[:name].nil?
@targeting_info = args[:targeting_info] unless args[:targeting_info].nil?
end
# The targeting information of this custom channel, if activated.
class TargetingInfo
include Google::Apis::Core::Hashable
# The name used to describe this channel externally.
# Corresponds to the JSON property `adsAppearOn`
# @return [String]
attr_accessor :ads_appear_on
# The external description of the channel.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# The locations in which ads appear. (Only valid for content and mobile content
# ads). Acceptable values for content ads are: TOP_LEFT, TOP_CENTER, TOP_RIGHT,
# MIDDLE_LEFT, MIDDLE_CENTER, MIDDLE_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER,
# BOTTOM_RIGHT, MULTIPLE_LOCATIONS. Acceptable values for mobile content ads are:
# TOP, MIDDLE, BOTTOM, MULTIPLE_LOCATIONS.
# Corresponds to the JSON property `location`
# @return [String]
attr_accessor :location
# The language of the sites ads will be displayed on.
# Corresponds to the JSON property `siteLanguage`
# @return [String]
attr_accessor :site_language
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@ads_appear_on = args[:ads_appear_on] unless args[:ads_appear_on].nil?
@description = args[:description] unless args[:description].nil?
@location = args[:location] unless args[:location].nil?
@site_language = args[:site_language] unless args[:site_language].nil?
end
end
end
#
class CustomChannels
include Google::Apis::Core::Hashable
# ETag of this response for caching purposes.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# The custom channels returned in this list response.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AdexchangesellerV2_0::CustomChannel>]
attr_accessor :items
# Kind of list this is, in this case adexchangeseller#customChannels.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Continuation token used to page through custom channels. To retrieve the next
# page of results, set the next request's "pageToken" value to this.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@etag = args[:etag] unless args[:etag].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
#
class Metadata
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AdexchangesellerV2_0::ReportingMetadataEntry>]
attr_accessor :items
# Kind of list this is, in this case adexchangeseller#metadata.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
end
end
#
class PreferredDeal
include Google::Apis::Core::Hashable
# The name of the advertiser this deal is for.
# Corresponds to the JSON property `advertiserName`
# @return [String]
attr_accessor :advertiser_name
# The name of the buyer network this deal is for.
# Corresponds to the JSON property `buyerNetworkName`
# @return [String]
attr_accessor :buyer_network_name
# The currency code that applies to the fixed_cpm value. If not set then assumed
# to be USD.
# Corresponds to the JSON property `currencyCode`
# @return [String]
attr_accessor :currency_code
# Time when this deal stops being active in seconds since the epoch (GMT). If
# not set then this deal is valid until manually disabled by the publisher.
# Corresponds to the JSON property `endTime`
# @return [String]
attr_accessor :end_time
# The fixed price for this preferred deal. In cpm micros of currency according
# to currencyCode. If set, then this preferred deal is eligible for the fixed
# price tier of buying (highest priority, pay exactly the configured fixed price)
# .
# Corresponds to the JSON property `fixedCpm`
# @return [String]
attr_accessor :fixed_cpm
# Unique identifier of this preferred deal.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Kind of resource this is, in this case adexchangeseller#preferredDeal.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Time when this deal becomes active in seconds since the epoch (GMT). If not
# set then this deal is active immediately upon creation.
# Corresponds to the JSON property `startTime`
# @return [String]
attr_accessor :start_time
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@advertiser_name = args[:advertiser_name] unless args[:advertiser_name].nil?
@buyer_network_name = args[:buyer_network_name] unless args[:buyer_network_name].nil?
@currency_code = args[:currency_code] unless args[:currency_code].nil?
@end_time = args[:end_time] unless args[:end_time].nil?
@fixed_cpm = args[:fixed_cpm] unless args[:fixed_cpm].nil?
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@start_time = args[:start_time] unless args[:start_time].nil?
end
end
#
class PreferredDeals
include Google::Apis::Core::Hashable
# The preferred deals returned in this list response.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AdexchangesellerV2_0::PreferredDeal>]
attr_accessor :items
# Kind of list this is, in this case adexchangeseller#preferredDeals.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
end
end
#
class Report
include Google::Apis::Core::Hashable
# The averages of the report. This is the same length as any other row in the
# report; cells corresponding to dimension columns are empty.
# Corresponds to the JSON property `averages`
# @return [Array<String>]
attr_accessor :averages
# The header information of the columns requested in the report. This is a list
# of headers; one for each dimension in the request, followed by one for each
# metric in the request.
# Corresponds to the JSON property `headers`
# @return [Array<Google::Apis::AdexchangesellerV2_0::Report::Header>]
attr_accessor :headers
# Kind this is, in this case adexchangeseller#report.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The output rows of the report. Each row is a list of cells; one for each
# dimension in the request, followed by one for each metric in the request. The
# dimension cells contain strings, and the metric cells contain numbers.
# Corresponds to the JSON property `rows`
# @return [Array<Array<String>>]
attr_accessor :rows
# The total number of rows matched by the report request. Fewer rows may be
# returned in the response due to being limited by the row count requested or
# the report row limit.
# Corresponds to the JSON property `totalMatchedRows`
# @return [String]
attr_accessor :total_matched_rows
# The totals of the report. This is the same length as any other row in the
# report; cells corresponding to dimension columns are empty.
# Corresponds to the JSON property `totals`
# @return [Array<String>]
attr_accessor :totals
# Any warnings associated with generation of the report.
# Corresponds to the JSON property `warnings`
# @return [Array<String>]
attr_accessor :warnings
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@averages = args[:averages] unless args[:averages].nil?
@headers = args[:headers] unless args[:headers].nil?
@kind = args[:kind] unless args[:kind].nil?
@rows = args[:rows] unless args[:rows].nil?
@total_matched_rows = args[:total_matched_rows] unless args[:total_matched_rows].nil?
@totals = args[:totals] unless args[:totals].nil?
@warnings = args[:warnings] unless args[:warnings].nil?
end
#
class Header
include Google::Apis::Core::Hashable
# The currency of this column. Only present if the header type is
# METRIC_CURRENCY.
# Corresponds to the JSON property `currency`
# @return [String]
attr_accessor :currency
# The name of the header.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The type of the header; one of DIMENSION, METRIC_TALLY, METRIC_RATIO, or
# METRIC_CURRENCY.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@currency = args[:currency] unless args[:currency].nil?
@name = args[:name] unless args[:name].nil?
@type = args[:type] unless args[:type].nil?
end
end
end
#
class ReportingMetadataEntry
include Google::Apis::Core::Hashable
# For metrics this is a list of dimension IDs which the metric is compatible
# with, for dimensions it is a list of compatibility groups the dimension
# belongs to.
# Corresponds to the JSON property `compatibleDimensions`
# @return [Array<String>]
attr_accessor :compatible_dimensions
# The names of the metrics the dimension or metric this reporting metadata entry
# describes is compatible with.
# Corresponds to the JSON property `compatibleMetrics`
# @return [Array<String>]
attr_accessor :compatible_metrics
# Unique identifier of this reporting metadata entry, corresponding to the name
# of the appropriate dimension or metric.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Kind of resource this is, in this case adexchangeseller#reportingMetadataEntry.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The names of the dimensions which the dimension or metric this reporting
# metadata entry describes requires to also be present in order for the report
# to be valid. Omitting these will not cause an error or warning, but may result
# in data which cannot be correctly interpreted.
# Corresponds to the JSON property `requiredDimensions`
# @return [Array<String>]
attr_accessor :required_dimensions
# The names of the metrics which the dimension or metric this reporting metadata
# entry describes requires to also be present in order for the report to be
# valid. Omitting these will not cause an error or warning, but may result in
# data which cannot be correctly interpreted.
# Corresponds to the JSON property `requiredMetrics`
# @return [Array<String>]
attr_accessor :required_metrics
# The codes of the projects supported by the dimension or metric this reporting
# metadata entry describes.
# Corresponds to the JSON property `supportedProducts`
# @return [Array<String>]
attr_accessor :supported_products
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@compatible_dimensions = args[:compatible_dimensions] unless args[:compatible_dimensions].nil?
@compatible_metrics = args[:compatible_metrics] unless args[:compatible_metrics].nil?
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@required_dimensions = args[:required_dimensions] unless args[:required_dimensions].nil?
@required_metrics = args[:required_metrics] unless args[:required_metrics].nil?
@supported_products = args[:supported_products] unless args[:supported_products].nil?
end
end
#
class SavedReport
include Google::Apis::Core::Hashable
# Unique identifier of this saved report.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Kind of resource this is, in this case adexchangeseller#savedReport.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# This saved report's name.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@name = args[:name] unless args[:name].nil?
end
end
#
class SavedReports
include Google::Apis::Core::Hashable
# ETag of this response for caching purposes.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# The saved reports returned in this list response.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AdexchangesellerV2_0::SavedReport>]
attr_accessor :items
# Kind of list this is, in this case adexchangeseller#savedReports.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Continuation token used to page through saved reports. To retrieve the next
# page of results, set the next request's "pageToken" value to this.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@etag = args[:etag] unless args[:etag].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
#
class UrlChannel
include Google::Apis::Core::Hashable
# Unique identifier of this URL channel. This should be considered an opaque
# identifier; it is not safe to rely on it being in any particular format.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Kind of resource this is, in this case adexchangeseller#urlChannel.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# URL Pattern of this URL channel. Does not include "http://" or "https://".
# Example: www.example.com/home
# Corresponds to the JSON property `urlPattern`
# @return [String]
attr_accessor :url_pattern
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@url_pattern = args[:url_pattern] unless args[:url_pattern].nil?
end
end
#
class UrlChannels
include Google::Apis::Core::Hashable
# ETag of this response for caching purposes.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# The URL channels returned in this list response.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AdexchangesellerV2_0::UrlChannel>]
attr_accessor :items
# Kind of list this is, in this case adexchangeseller#urlChannels.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Continuation token used to page through URL channels. To retrieve the next
# page of results, set the next request's "pageToken" value to this.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@etag = args[:etag] unless args[:etag].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
end
end
end

View File

@ -0,0 +1,309 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AdexchangesellerV2_0
class Account
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Accounts
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AdClient
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AdClients
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Alert
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Alerts
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class CustomChannel
class Representation < Google::Apis::Core::JsonRepresentation; end
class TargetingInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class CustomChannels
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Metadata
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PreferredDeal
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PreferredDeals
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Report
class Representation < Google::Apis::Core::JsonRepresentation; end
class Header
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class ReportingMetadataEntry
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class SavedReport
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class SavedReports
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UrlChannel
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UrlChannels
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class Account
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
end
end
# @private
class Accounts
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV2_0::Account, decorator: Google::Apis::AdexchangesellerV2_0::Account::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class AdClient
class Representation < Google::Apis::Core::JsonRepresentation
property :arc_opt_in, as: 'arcOptIn'
property :id, as: 'id'
property :kind, as: 'kind'
property :product_code, as: 'productCode'
property :supports_reporting, as: 'supportsReporting'
end
end
# @private
class AdClients
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV2_0::AdClient, decorator: Google::Apis::AdexchangesellerV2_0::AdClient::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class Alert
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :kind, as: 'kind'
property :message, as: 'message'
property :severity, as: 'severity'
property :type, as: 'type'
end
end
# @private
class Alerts
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV2_0::Alert, decorator: Google::Apis::AdexchangesellerV2_0::Alert::Representation
property :kind, as: 'kind'
end
end
# @private
class CustomChannel
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
property :targeting_info, as: 'targetingInfo', class: Google::Apis::AdexchangesellerV2_0::CustomChannel::TargetingInfo, decorator: Google::Apis::AdexchangesellerV2_0::CustomChannel::TargetingInfo::Representation
end
# @private
class TargetingInfo
class Representation < Google::Apis::Core::JsonRepresentation
property :ads_appear_on, as: 'adsAppearOn'
property :description, as: 'description'
property :location, as: 'location'
property :site_language, as: 'siteLanguage'
end
end
end
# @private
class CustomChannels
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV2_0::CustomChannel, decorator: Google::Apis::AdexchangesellerV2_0::CustomChannel::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class Metadata
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV2_0::ReportingMetadataEntry, decorator: Google::Apis::AdexchangesellerV2_0::ReportingMetadataEntry::Representation
property :kind, as: 'kind'
end
end
# @private
class PreferredDeal
class Representation < Google::Apis::Core::JsonRepresentation
property :advertiser_name, as: 'advertiserName'
property :buyer_network_name, as: 'buyerNetworkName'
property :currency_code, as: 'currencyCode'
property :end_time, as: 'endTime'
property :fixed_cpm, as: 'fixedCpm'
property :id, as: 'id'
property :kind, as: 'kind'
property :start_time, as: 'startTime'
end
end
# @private
class PreferredDeals
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV2_0::PreferredDeal, decorator: Google::Apis::AdexchangesellerV2_0::PreferredDeal::Representation
property :kind, as: 'kind'
end
end
# @private
class Report
class Representation < Google::Apis::Core::JsonRepresentation
collection :averages, as: 'averages'
collection :headers, as: 'headers', class: Google::Apis::AdexchangesellerV2_0::Report::Header, decorator: Google::Apis::AdexchangesellerV2_0::Report::Header::Representation
property :kind, as: 'kind'
collection :rows, as: 'rows', :class => Array do
include Representable::JSON::Collection
items
end
property :total_matched_rows, as: 'totalMatchedRows'
collection :totals, as: 'totals'
collection :warnings, as: 'warnings'
end
# @private
class Header
class Representation < Google::Apis::Core::JsonRepresentation
property :currency, as: 'currency'
property :name, as: 'name'
property :type, as: 'type'
end
end
end
# @private
class ReportingMetadataEntry
class Representation < Google::Apis::Core::JsonRepresentation
collection :compatible_dimensions, as: 'compatibleDimensions'
collection :compatible_metrics, as: 'compatibleMetrics'
property :id, as: 'id'
property :kind, as: 'kind'
collection :required_dimensions, as: 'requiredDimensions'
collection :required_metrics, as: 'requiredMetrics'
collection :supported_products, as: 'supportedProducts'
end
end
# @private
class SavedReport
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
end
end
# @private
class SavedReports
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV2_0::SavedReport, decorator: Google::Apis::AdexchangesellerV2_0::SavedReport::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class UrlChannel
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :kind, as: 'kind'
property :url_pattern, as: 'urlPattern'
end
end
# @private
class UrlChannels
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV2_0::UrlChannel, decorator: Google::Apis::AdexchangesellerV2_0::UrlChannel::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
end
end
end

View File

@ -0,0 +1,682 @@
# Copyright 2015 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.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AdexchangesellerV2_0
# Ad Exchange Seller API
#
# Gives Ad Exchange seller users access to their inventory and the ability to
# generate reports
#
# @example
# require 'google/apis/adexchangeseller_v2_0'
#
# Adexchangeseller = Google::Apis::AdexchangesellerV2_0 # Alias the module
# service = Adexchangeseller::AdExchangeSellerService.new
#
# @see https://developers.google.com/ad-exchange/seller-rest/
class AdExchangeSellerService < Google::Apis::Core::BaseService
# @return [String]
# 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.
attr_accessor :key
# @return [String]
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
attr_accessor :quota_user
# @return [String]
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
attr_accessor :user_ip
def initialize
super('https://www.googleapis.com/', 'adexchangeseller/v2.0/')
end
# Get information about the selected Ad Exchange account.
# @param [String] account_id
# Account to get information about. Tip: 'myaccount' is a valid ID.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangesellerV2_0::Account] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::Account]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_account(account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{accountId}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::Account::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::Account
command.params['accountId'] = account_id unless account_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# List all accounts available to this Ad Exchange account.
# @param [Fixnum] max_results
# The maximum number of accounts to include in the response, used for paging.
# @param [String] page_token
# A continuation token, used to page through accounts. To retrieve the next page,
# set this parameter to the value of "nextPageToken" from the previous response.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangesellerV2_0::Accounts] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::Accounts]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_accounts(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::Accounts::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::Accounts
command.query['maxResults'] = max_results unless max_results.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# List all ad clients in this Ad Exchange account.
# @param [String] account_id
# Account to which the ad client belongs.
# @param [Fixnum] max_results
# The maximum number of ad clients to include in the response, used for paging.
# @param [String] page_token
# A continuation token, used to page through ad clients. To retrieve the next
# page, set this parameter to the value of "nextPageToken" from the previous
# response.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangesellerV2_0::AdClients] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::AdClients]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_account_ad_clients(account_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{accountId}/adclients'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::AdClients::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::AdClients
command.params['accountId'] = account_id unless account_id.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# List the alerts for this Ad Exchange account.
# @param [String] account_id
# Account owning the alerts.
# @param [String] locale
# The locale to use for translating alert messages. The account locale will be
# used if this is not supplied. The AdSense default (English) will be used if
# the supplied locale is invalid or unsupported.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangesellerV2_0::Alerts] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::Alerts]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_account_alerts(account_id, locale: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{accountId}/alerts'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::Alerts::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::Alerts
command.params['accountId'] = account_id unless account_id.nil?
command.query['locale'] = locale unless locale.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Get the specified custom channel from the specified ad client.
# @param [String] account_id
# Account to which the ad client belongs.
# @param [String] ad_client_id
# Ad client which contains the custom channel.
# @param [String] custom_channel_id
# Custom channel to retrieve.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangesellerV2_0::CustomChannel] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::CustomChannel]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_account_custom_channel(account_id, ad_client_id, custom_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{accountId}/adclients/{adClientId}/customchannels/{customChannelId}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::CustomChannel::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::CustomChannel
command.params['accountId'] = account_id unless account_id.nil?
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
command.params['customChannelId'] = custom_channel_id unless custom_channel_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# List all custom channels in the specified ad client for this Ad Exchange
# account.
# @param [String] account_id
# Account to which the ad client belongs.
# @param [String] ad_client_id
# Ad client for which to list custom channels.
# @param [Fixnum] max_results
# The maximum number of custom channels to include in the response, used for
# paging.
# @param [String] page_token
# A continuation token, used to page through custom channels. To retrieve the
# next page, set this parameter to the value of "nextPageToken" from the
# previous response.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangesellerV2_0::CustomChannels] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::CustomChannels]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_account_custom_channels(account_id, ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{accountId}/adclients/{adClientId}/customchannels'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::CustomChannels::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::CustomChannels
command.params['accountId'] = account_id unless account_id.nil?
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# List the metadata for the dimensions available to this AdExchange account.
# @param [String] account_id
# Account with visibility to the dimensions.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangesellerV2_0::Metadata] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::Metadata]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_account_metadata_dimensions(account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{accountId}/metadata/dimensions'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::Metadata::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::Metadata
command.params['accountId'] = account_id unless account_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# List the metadata for the metrics available to this AdExchange account.
# @param [String] account_id
# Account with visibility to the metrics.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangesellerV2_0::Metadata] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::Metadata]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_account_metadata_metrics(account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{accountId}/metadata/metrics'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::Metadata::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::Metadata
command.params['accountId'] = account_id unless account_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Get information about the selected Ad Exchange Preferred Deal.
# @param [String] account_id
# Account owning the deal.
# @param [String] deal_id
# Preferred deal to get information about.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangesellerV2_0::PreferredDeal] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::PreferredDeal]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_account_preferred_deal(account_id, deal_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{accountId}/preferreddeals/{dealId}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::PreferredDeal::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::PreferredDeal
command.params['accountId'] = account_id unless account_id.nil?
command.params['dealId'] = deal_id unless deal_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# List the preferred deals for this Ad Exchange account.
# @param [String] account_id
# Account owning the deals.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangesellerV2_0::PreferredDeals] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::PreferredDeals]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_account_preferred_deals(account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{accountId}/preferreddeals'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::PreferredDeals::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::PreferredDeals
command.params['accountId'] = account_id unless account_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Generate an Ad Exchange report based on the report request sent in the query
# parameters. Returns the result as JSON; to retrieve output in CSV format
# specify "alt=csv" as a query parameter.
# @param [String] account_id
# Account which owns the generated report.
# @param [Array<String>, String] dimension
# Dimensions to base the report on.
# @param [String] end_date
# End of the date range to report on in "YYYY-MM-DD" format, inclusive.
# @param [Array<String>, String] filter
# Filters to be run on the report.
# @param [String] locale
# Optional locale to use for translating report output to a local language.
# Defaults to "en_US" if not specified.
# @param [Fixnum] max_results
# The maximum number of rows of report data to return.
# @param [Array<String>, String] metric
# Numeric columns to include in the report.
# @param [Array<String>, String] sort
# The name of a dimension or metric to sort the resulting report on, optionally
# prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is
# specified, the column is sorted ascending.
# @param [String] start_date
# Start of the date range to report on in "YYYY-MM-DD" format, inclusive.
# @param [Fixnum] start_index
# Index of the first row of report data to return.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [IO, String] download_dest
# IO stream or filename to receive content download
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangesellerV2_0::Report] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::Report]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def generate_account_report(account_id, dimension: nil, end_date: nil, filter: nil, locale: nil, max_results: nil, metric: nil, sort: nil, start_date: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
path = 'accounts/{accountId}/reports'
if download_dest.nil?
command = make_simple_command(:get, path, options)
else
command = make_download_command(:get, path, options)
command.download_dest = download_dest
end
command.response_representation = Google::Apis::AdexchangesellerV2_0::Report::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::Report
command.params['accountId'] = account_id unless account_id.nil?
command.query['dimension'] = dimension unless dimension.nil?
command.query['endDate'] = end_date unless end_date.nil?
command.query['filter'] = filter unless filter.nil?
command.query['locale'] = locale unless locale.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['metric'] = metric unless metric.nil?
command.query['sort'] = sort unless sort.nil?
command.query['startDate'] = start_date unless start_date.nil?
command.query['startIndex'] = start_index unless start_index.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Generate an Ad Exchange report based on the saved report ID sent in the query
# parameters.
# @param [String] account_id
# Account owning the saved report.
# @param [String] saved_report_id
# The saved report to retrieve.
# @param [String] locale
# Optional locale to use for translating report output to a local language.
# Defaults to "en_US" if not specified.
# @param [Fixnum] max_results
# The maximum number of rows of report data to return.
# @param [Fixnum] start_index
# Index of the first row of report data to return.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangesellerV2_0::Report] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::Report]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def generate_account_saved_report(account_id, saved_report_id, locale: nil, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{accountId}/reports/{savedReportId}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::Report::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::Report
command.params['accountId'] = account_id unless account_id.nil?
command.params['savedReportId'] = saved_report_id unless saved_report_id.nil?
command.query['locale'] = locale unless locale.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['startIndex'] = start_index unless start_index.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# List all saved reports in this Ad Exchange account.
# @param [String] account_id
# Account owning the saved reports.
# @param [Fixnum] max_results
# The maximum number of saved reports to include in the response, used for
# paging.
# @param [String] page_token
# A continuation token, used to page through saved reports. To retrieve the next
# page, set this parameter to the value of "nextPageToken" from the previous
# response.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangesellerV2_0::SavedReports] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::SavedReports]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_account_saved_reports(account_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{accountId}/reports/saved'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::SavedReports::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::SavedReports
command.params['accountId'] = account_id unless account_id.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# List all URL channels in the specified ad client for this Ad Exchange account.
# @param [String] account_id
# Account to which the ad client belongs.
# @param [String] ad_client_id
# Ad client for which to list URL channels.
# @param [Fixnum] max_results
# The maximum number of URL channels to include in the response, used for paging.
# @param [String] page_token
# A continuation token, used to page through URL channels. To retrieve the next
# page, set this parameter to the value of "nextPageToken" from the previous
# response.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdexchangesellerV2_0::UrlChannels] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::UrlChannels]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_account_url_channels(account_id, ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{accountId}/adclients/{adClientId}/urlchannels'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::UrlChannels::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::UrlChannels
command.params['accountId'] = account_id unless account_id.nil?
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
protected
def apply_command_defaults(command)
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
end
end
end
end
end

View File

@ -0,0 +1,89 @@
# Copyright 2015 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.
require 'google/apis/admin_directory_v1/service.rb'
require 'google/apis/admin_directory_v1/classes.rb'
require 'google/apis/admin_directory_v1/representations.rb'
module Google
module Apis
# Admin Directory API
#
# The Admin SDK Directory API lets you view and manage enterprise resources such
# as users and groups, administrative notifications, security features, and more.
#
# @see https://developers.google.com/admin-sdk/directory/
module AdminDirectoryV1
VERSION = 'DirectoryV1'
REVISION = '20150326'
# View and manage your Chrome OS devices' metadata
AUTH_ADMIN_DIRECTORY_DEVICE_CHROMEOS = 'https://www.googleapis.com/auth/admin.directory.device.chromeos'
# View your Chrome OS devices' metadata
AUTH_ADMIN_DIRECTORY_DEVICE_CHROMEOS_READONLY = 'https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly'
# View and manage your mobile devices' metadata
AUTH_ADMIN_DIRECTORY_DEVICE_MOBILE = 'https://www.googleapis.com/auth/admin.directory.device.mobile'
# Manage your mobile devices by performing administrative tasks
AUTH_ADMIN_DIRECTORY_DEVICE_MOBILE_ACTION = 'https://www.googleapis.com/auth/admin.directory.device.mobile.action'
# View your mobile devices' metadata
AUTH_ADMIN_DIRECTORY_DEVICE_MOBILE_READONLY = 'https://www.googleapis.com/auth/admin.directory.device.mobile.readonly'
# View and manage the provisioning of groups on your domain
AUTH_ADMIN_DIRECTORY_GROUP = 'https://www.googleapis.com/auth/admin.directory.group'
# View and manage group subscriptions on your domain
AUTH_ADMIN_DIRECTORY_GROUP_MEMBER = 'https://www.googleapis.com/auth/admin.directory.group.member'
# View group subscriptions on your domain
AUTH_ADMIN_DIRECTORY_GROUP_MEMBER_READONLY = 'https://www.googleapis.com/auth/admin.directory.group.member.readonly'
# View groups on your domain
AUTH_ADMIN_DIRECTORY_GROUP_READONLY = 'https://www.googleapis.com/auth/admin.directory.group.readonly'
# View and manage notifications received on your domain
AUTH_ADMIN_DIRECTORY_NOTIFICATIONS = 'https://www.googleapis.com/auth/admin.directory.notifications'
# View and manage organization units on your domain
AUTH_ADMIN_DIRECTORY_ORGUNIT = 'https://www.googleapis.com/auth/admin.directory.orgunit'
# View organization units on your domain
AUTH_ADMIN_DIRECTORY_ORGUNIT_READONLY = 'https://www.googleapis.com/auth/admin.directory.orgunit.readonly'
# View and manage the provisioning of users on your domain
AUTH_ADMIN_DIRECTORY_USER = 'https://www.googleapis.com/auth/admin.directory.user'
# View and manage user aliases on your domain
AUTH_ADMIN_DIRECTORY_USER_ALIAS = 'https://www.googleapis.com/auth/admin.directory.user.alias'
# View user aliases on your domain
AUTH_ADMIN_DIRECTORY_USER_ALIAS_READONLY = 'https://www.googleapis.com/auth/admin.directory.user.alias.readonly'
# View users on your domain
AUTH_ADMIN_DIRECTORY_USER_READONLY = 'https://www.googleapis.com/auth/admin.directory.user.readonly'
# Manage data access permissions for users on your domain
AUTH_ADMIN_DIRECTORY_USER_SECURITY = 'https://www.googleapis.com/auth/admin.directory.user.security'
# View and manage the provisioning of user schemas on your domain
AUTH_ADMIN_DIRECTORY_USERSCHEMA = 'https://www.googleapis.com/auth/admin.directory.userschema'
# View user schemas on your domain
AUTH_ADMIN_DIRECTORY_USERSCHEMA_READONLY = 'https://www.googleapis.com/auth/admin.directory.userschema.readonly'
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,780 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AdminDirectoryV1
class Alias
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Aliases
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Asp
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Asps
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Channel
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ChromeOsDevice
class Representation < Google::Apis::Core::JsonRepresentation; end
class ActiveTimeRange
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class RecentUser
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class ChromeOsDevices
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Group
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Groups
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Member
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Members
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class MobileDevice
class Representation < Google::Apis::Core::JsonRepresentation; end
class Application
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class MobileDeviceAction
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class MobileDevices
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Notification
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Notifications
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class OrgUnit
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class OrgUnits
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Schema
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class SchemaFieldSpec
class Representation < Google::Apis::Core::JsonRepresentation; end
class NumericIndexingSpec
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class Schemas
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Token
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Tokens
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class User
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserAbout
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserAddress
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserEmail
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserExternalId
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserIm
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserMakeAdmin
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserName
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserOrganization
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserPhone
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserPhoto
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserRelation
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserUndelete
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserWebsite
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Users
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class VerificationCode
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class VerificationCodes
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class Alias
class Representation < Google::Apis::Core::JsonRepresentation
property :alias, as: 'alias'
property :etag, as: 'etag'
property :id, as: 'id'
property :kind, as: 'kind'
property :primary_email, as: 'primaryEmail'
end
end
# @private
class Aliases
class Representation < Google::Apis::Core::JsonRepresentation
collection :aliases, as: 'aliases', class: Google::Apis::AdminDirectoryV1::Alias, decorator: Google::Apis::AdminDirectoryV1::Alias::Representation
property :etag, as: 'etag'
property :kind, as: 'kind'
end
end
# @private
class Asp
class Representation < Google::Apis::Core::JsonRepresentation
property :code_id, as: 'codeId'
property :creation_time, as: 'creationTime'
property :etag, as: 'etag'
property :kind, as: 'kind'
property :last_time_used, as: 'lastTimeUsed'
property :name, as: 'name'
property :user_key, as: 'userKey'
end
end
# @private
class Asps
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdminDirectoryV1::Asp, decorator: Google::Apis::AdminDirectoryV1::Asp::Representation
property :kind, as: 'kind'
end
end
# @private
class Channel
class Representation < Google::Apis::Core::JsonRepresentation
property :address, as: 'address'
property :expiration, as: 'expiration'
property :id, as: 'id'
property :kind, as: 'kind'
hash :params, as: 'params'
property :payload, as: 'payload'
property :resource_id, as: 'resourceId'
property :resource_uri, as: 'resourceUri'
property :token, as: 'token'
property :type, as: 'type'
end
end
# @private
class ChromeOsDevice
class Representation < Google::Apis::Core::JsonRepresentation
collection :active_time_ranges, as: 'activeTimeRanges', class: Google::Apis::AdminDirectoryV1::ChromeOsDevice::ActiveTimeRange, decorator: Google::Apis::AdminDirectoryV1::ChromeOsDevice::ActiveTimeRange::Representation
property :annotated_asset_id, as: 'annotatedAssetId'
property :annotated_location, as: 'annotatedLocation'
property :annotated_user, as: 'annotatedUser'
property :boot_mode, as: 'bootMode'
property :device_id, as: 'deviceId'
property :etag, as: 'etag'
property :ethernet_mac_address, as: 'ethernetMacAddress'
property :firmware_version, as: 'firmwareVersion'
property :kind, as: 'kind'
property :last_enrollment_time, as: 'lastEnrollmentTime', type: DateTime
property :last_sync, as: 'lastSync', type: DateTime
property :mac_address, as: 'macAddress'
property :meid, as: 'meid'
property :model, as: 'model'
property :notes, as: 'notes'
property :order_number, as: 'orderNumber'
property :org_unit_path, as: 'orgUnitPath'
property :os_version, as: 'osVersion'
property :platform_version, as: 'platformVersion'
collection :recent_users, as: 'recentUsers', class: Google::Apis::AdminDirectoryV1::ChromeOsDevice::RecentUser, decorator: Google::Apis::AdminDirectoryV1::ChromeOsDevice::RecentUser::Representation
property :serial_number, as: 'serialNumber'
property :status, as: 'status'
property :support_end_date, as: 'supportEndDate', type: DateTime
property :will_auto_renew, as: 'willAutoRenew'
end
# @private
class ActiveTimeRange
class Representation < Google::Apis::Core::JsonRepresentation
property :active_time, as: 'activeTime'
property :date, as: 'date', type: Date
end
end
# @private
class RecentUser
class Representation < Google::Apis::Core::JsonRepresentation
property :email, as: 'email'
property :type, as: 'type'
end
end
end
# @private
class ChromeOsDevices
class Representation < Google::Apis::Core::JsonRepresentation
collection :chromeosdevices, as: 'chromeosdevices', class: Google::Apis::AdminDirectoryV1::ChromeOsDevice, decorator: Google::Apis::AdminDirectoryV1::ChromeOsDevice::Representation
property :etag, as: 'etag'
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class Group
class Representation < Google::Apis::Core::JsonRepresentation
property :admin_created, as: 'adminCreated'
collection :aliases, as: 'aliases'
property :description, as: 'description'
property :direct_members_count, as: 'directMembersCount'
property :email, as: 'email'
property :etag, as: 'etag'
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
collection :non_editable_aliases, as: 'nonEditableAliases'
end
end
# @private
class Groups
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :groups, as: 'groups', class: Google::Apis::AdminDirectoryV1::Group, decorator: Google::Apis::AdminDirectoryV1::Group::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class Member
class Representation < Google::Apis::Core::JsonRepresentation
property :email, as: 'email'
property :etag, as: 'etag'
property :id, as: 'id'
property :kind, as: 'kind'
property :role, as: 'role'
property :type, as: 'type'
end
end
# @private
class Members
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :kind, as: 'kind'
collection :members, as: 'members', class: Google::Apis::AdminDirectoryV1::Member, decorator: Google::Apis::AdminDirectoryV1::Member::Representation
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class MobileDevice
class Representation < Google::Apis::Core::JsonRepresentation
collection :applications, as: 'applications', class: Google::Apis::AdminDirectoryV1::MobileDevice::Application, decorator: Google::Apis::AdminDirectoryV1::MobileDevice::Application::Representation
property :baseband_version, as: 'basebandVersion'
property :build_number, as: 'buildNumber'
property :default_language, as: 'defaultLanguage'
property :device_compromised_status, as: 'deviceCompromisedStatus'
property :device_id, as: 'deviceId'
collection :email, as: 'email'
property :etag, as: 'etag'
property :first_sync, as: 'firstSync', type: DateTime
property :hardware_id, as: 'hardwareId'
property :imei, as: 'imei'
property :kernel_version, as: 'kernelVersion'
property :kind, as: 'kind'
property :last_sync, as: 'lastSync', type: DateTime
property :managed_account_is_on_owner_profile, as: 'managedAccountIsOnOwnerProfile'
property :meid, as: 'meid'
property :model, as: 'model'
collection :name, as: 'name'
property :network_operator, as: 'networkOperator'
property :os, as: 'os'
property :resource_id, as: 'resourceId'
property :serial_number, as: 'serialNumber'
property :status, as: 'status'
property :type, as: 'type'
property :user_agent, as: 'userAgent'
property :wifi_mac_address, as: 'wifiMacAddress'
end
# @private
class Application
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
property :package_name, as: 'packageName'
collection :permission, as: 'permission'
property :version_code, as: 'versionCode'
property :version_name, as: 'versionName'
end
end
end
# @private
class MobileDeviceAction
class Representation < Google::Apis::Core::JsonRepresentation
property :action, as: 'action'
end
end
# @private
class MobileDevices
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :kind, as: 'kind'
collection :mobiledevices, as: 'mobiledevices', class: Google::Apis::AdminDirectoryV1::MobileDevice, decorator: Google::Apis::AdminDirectoryV1::MobileDevice::Representation
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class Notification
class Representation < Google::Apis::Core::JsonRepresentation
property :body, as: 'body'
property :etag, as: 'etag'
property :from_address, as: 'fromAddress'
property :is_unread, as: 'isUnread'
property :kind, as: 'kind'
property :notification_id, as: 'notificationId'
property :send_time, as: 'sendTime', type: DateTime
property :subject, as: 'subject'
end
end
# @private
class Notifications
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdminDirectoryV1::Notification, decorator: Google::Apis::AdminDirectoryV1::Notification::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :unread_notifications_count, as: 'unreadNotificationsCount'
end
end
# @private
class OrgUnit
class Representation < Google::Apis::Core::JsonRepresentation
property :block_inheritance, as: 'blockInheritance'
property :description, as: 'description'
property :etag, as: 'etag'
property :kind, as: 'kind'
property :name, as: 'name'
property :org_unit_id, as: 'orgUnitId'
property :org_unit_path, as: 'orgUnitPath'
property :parent_org_unit_id, as: 'parentOrgUnitId'
property :parent_org_unit_path, as: 'parentOrgUnitPath'
end
end
# @private
class OrgUnits
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :kind, as: 'kind'
collection :organization_units, as: 'organizationUnits', class: Google::Apis::AdminDirectoryV1::OrgUnit, decorator: Google::Apis::AdminDirectoryV1::OrgUnit::Representation
end
end
# @private
class Schema
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :fields, as: 'fields', class: Google::Apis::AdminDirectoryV1::SchemaFieldSpec, decorator: Google::Apis::AdminDirectoryV1::SchemaFieldSpec::Representation
property :kind, as: 'kind'
property :schema_id, as: 'schemaId'
property :schema_name, as: 'schemaName'
end
end
# @private
class SchemaFieldSpec
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :field_id, as: 'fieldId'
property :field_name, as: 'fieldName'
property :field_type, as: 'fieldType'
property :indexed, as: 'indexed'
property :kind, as: 'kind'
property :multi_valued, as: 'multiValued'
property :numeric_indexing_spec, as: 'numericIndexingSpec', class: Google::Apis::AdminDirectoryV1::SchemaFieldSpec::NumericIndexingSpec, decorator: Google::Apis::AdminDirectoryV1::SchemaFieldSpec::NumericIndexingSpec::Representation
property :read_access_type, as: 'readAccessType'
end
# @private
class NumericIndexingSpec
class Representation < Google::Apis::Core::JsonRepresentation
property :max_value, as: 'maxValue'
property :min_value, as: 'minValue'
end
end
end
# @private
class Schemas
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :kind, as: 'kind'
collection :schemas, as: 'schemas', class: Google::Apis::AdminDirectoryV1::Schema, decorator: Google::Apis::AdminDirectoryV1::Schema::Representation
end
end
# @private
class Token
class Representation < Google::Apis::Core::JsonRepresentation
property :anonymous, as: 'anonymous'
property :client_id, as: 'clientId'
property :display_text, as: 'displayText'
property :etag, as: 'etag'
property :kind, as: 'kind'
property :native_app, as: 'nativeApp'
collection :scopes, as: 'scopes'
property :user_key, as: 'userKey'
end
end
# @private
class Tokens
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdminDirectoryV1::Token, decorator: Google::Apis::AdminDirectoryV1::Token::Representation
property :kind, as: 'kind'
end
end
# @private
class User
class Representation < Google::Apis::Core::JsonRepresentation
property :addresses, as: 'addresses'
property :agreed_to_terms, as: 'agreedToTerms'
collection :aliases, as: 'aliases'
property :change_password_at_next_login, as: 'changePasswordAtNextLogin'
property :creation_time, as: 'creationTime', type: DateTime
hash :custom_schemas, as: 'customSchemas'
property :customer_id, as: 'customerId'
property :deletion_time, as: 'deletionTime', type: DateTime
property :emails, as: 'emails'
property :etag, as: 'etag'
property :external_ids, as: 'externalIds'
property :hash_function, as: 'hashFunction'
property :id, as: 'id'
property :ims, as: 'ims'
property :include_in_global_address_list, as: 'includeInGlobalAddressList'
property :ip_whitelisted, as: 'ipWhitelisted'
property :is_admin, as: 'isAdmin'
property :is_delegated_admin, as: 'isDelegatedAdmin'
property :is_mailbox_setup, as: 'isMailboxSetup'
property :kind, as: 'kind'
property :last_login_time, as: 'lastLoginTime', type: DateTime
property :name, as: 'name', class: Google::Apis::AdminDirectoryV1::UserName, decorator: Google::Apis::AdminDirectoryV1::UserName::Representation
collection :non_editable_aliases, as: 'nonEditableAliases'
property :notes, as: 'notes'
property :org_unit_path, as: 'orgUnitPath'
property :organizations, as: 'organizations'
property :password, as: 'password'
property :phones, as: 'phones'
property :primary_email, as: 'primaryEmail'
property :relations, as: 'relations'
property :suspended, as: 'suspended'
property :suspension_reason, as: 'suspensionReason'
property :thumbnail_photo_etag, as: 'thumbnailPhotoEtag'
property :thumbnail_photo_url, as: 'thumbnailPhotoUrl'
property :websites, as: 'websites'
end
end
# @private
class UserAbout
class Representation < Google::Apis::Core::JsonRepresentation
property :content_type, as: 'contentType'
property :value, as: 'value'
end
end
# @private
class UserAddress
class Representation < Google::Apis::Core::JsonRepresentation
property :country, as: 'country'
property :country_code, as: 'countryCode'
property :custom_type, as: 'customType'
property :extended_address, as: 'extendedAddress'
property :formatted, as: 'formatted'
property :locality, as: 'locality'
property :po_box, as: 'poBox'
property :postal_code, as: 'postalCode'
property :primary, as: 'primary'
property :region, as: 'region'
property :source_is_structured, as: 'sourceIsStructured'
property :street_address, as: 'streetAddress'
property :type, as: 'type'
end
end
# @private
class UserEmail
class Representation < Google::Apis::Core::JsonRepresentation
property :address, as: 'address'
property :custom_type, as: 'customType'
property :primary, as: 'primary'
property :type, as: 'type'
end
end
# @private
class UserExternalId
class Representation < Google::Apis::Core::JsonRepresentation
property :custom_type, as: 'customType'
property :type, as: 'type'
property :value, as: 'value'
end
end
# @private
class UserIm
class Representation < Google::Apis::Core::JsonRepresentation
property :custom_protocol, as: 'customProtocol'
property :custom_type, as: 'customType'
property :im, as: 'im'
property :primary, as: 'primary'
property :protocol, as: 'protocol'
property :type, as: 'type'
end
end
# @private
class UserMakeAdmin
class Representation < Google::Apis::Core::JsonRepresentation
property :status, as: 'status'
end
end
# @private
class UserName
class Representation < Google::Apis::Core::JsonRepresentation
property :family_name, as: 'familyName'
property :full_name, as: 'fullName'
property :given_name, as: 'givenName'
end
end
# @private
class UserOrganization
class Representation < Google::Apis::Core::JsonRepresentation
property :cost_center, as: 'costCenter'
property :custom_type, as: 'customType'
property :department, as: 'department'
property :description, as: 'description'
property :domain, as: 'domain'
property :location, as: 'location'
property :name, as: 'name'
property :primary, as: 'primary'
property :symbol, as: 'symbol'
property :title, as: 'title'
property :type, as: 'type'
end
end
# @private
class UserPhone
class Representation < Google::Apis::Core::JsonRepresentation
property :custom_type, as: 'customType'
property :primary, as: 'primary'
property :type, as: 'type'
property :value, as: 'value'
end
end
# @private
class UserPhoto
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :height, as: 'height'
property :id, as: 'id'
property :kind, as: 'kind'
property :mime_type, as: 'mimeType'
property :photo_data, :base64 => true, as: 'photoData'
property :primary_email, as: 'primaryEmail'
property :width, as: 'width'
end
end
# @private
class UserRelation
class Representation < Google::Apis::Core::JsonRepresentation
property :custom_type, as: 'customType'
property :type, as: 'type'
property :value, as: 'value'
end
end
# @private
class UserUndelete
class Representation < Google::Apis::Core::JsonRepresentation
property :org_unit_path, as: 'orgUnitPath'
end
end
# @private
class UserWebsite
class Representation < Google::Apis::Core::JsonRepresentation
property :custom_type, as: 'customType'
property :primary, as: 'primary'
property :type, as: 'type'
property :value, as: 'value'
end
end
# @private
class Users
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :trigger_event, as: 'trigger_event'
collection :users, as: 'users', class: Google::Apis::AdminDirectoryV1::User, decorator: Google::Apis::AdminDirectoryV1::User::Representation
end
end
# @private
class VerificationCode
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :kind, as: 'kind'
property :user_id, as: 'userId'
property :verification_code, as: 'verificationCode'
end
end
# @private
class VerificationCodes
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdminDirectoryV1::VerificationCode, decorator: Google::Apis::AdminDirectoryV1::VerificationCode::Representation
property :kind, as: 'kind'
end
end
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,38 @@
# Copyright 2015 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.
require 'google/apis/admin_reports_v1/service.rb'
require 'google/apis/admin_reports_v1/classes.rb'
require 'google/apis/admin_reports_v1/representations.rb'
module Google
module Apis
# Admin Reports API
#
# Allows the administrators of Google Apps customers to fetch reports about the
# usage, collaboration, security and risk for their users.
#
# @see https://developers.google.com/admin-sdk/reports/
module AdminReportsV1
VERSION = 'ReportsV1'
REVISION = '20150429'
# View audit reports of Google Apps for your domain
AUTH_ADMIN_REPORTS_AUDIT_READONLY = 'https://www.googleapis.com/auth/admin.reports.audit.readonly'
# View usage reports of Google Apps for your domain
AUTH_ADMIN_REPORTS_USAGE_READONLY = 'https://www.googleapis.com/auth/admin.reports.usage.readonly'
end
end
end

View File

@ -0,0 +1,582 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AdminReportsV1
# JSON template for a collection of activites.
class Activities
include Google::Apis::Core::Hashable
# ETag of the resource.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# Each record in read response.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AdminReportsV1::Activity>]
attr_accessor :items
# Kind of list response this is.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Token for retrieving the next page
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@etag = args[:etag] unless args[:etag].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
# JSON template for the activity resource.
class Activity
include Google::Apis::Core::Hashable
# User doing the action.
# Corresponds to the JSON property `actor`
# @return [Google::Apis::AdminReportsV1::Activity::Actor]
attr_accessor :actor
# ETag of the entry.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# Activity events.
# Corresponds to the JSON property `events`
# @return [Array<Google::Apis::AdminReportsV1::Activity::Event>]
attr_accessor :events
# Unique identifier for each activity record.
# Corresponds to the JSON property `id`
# @return [Google::Apis::AdminReportsV1::Activity::Id]
attr_accessor :id
# IP Address of the user doing the action.
# Corresponds to the JSON property `ipAddress`
# @return [String]
attr_accessor :ip_address
# Kind of resource this is.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Domain of source customer.
# Corresponds to the JSON property `ownerDomain`
# @return [String]
attr_accessor :owner_domain
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@actor = args[:actor] unless args[:actor].nil?
@etag = args[:etag] unless args[:etag].nil?
@events = args[:events] unless args[:events].nil?
@id = args[:id] unless args[:id].nil?
@ip_address = args[:ip_address] unless args[:ip_address].nil?
@kind = args[:kind] unless args[:kind].nil?
@owner_domain = args[:owner_domain] unless args[:owner_domain].nil?
end
# User doing the action.
class Actor
include Google::Apis::Core::Hashable
# User or OAuth 2LO request.
# Corresponds to the JSON property `callerType`
# @return [String]
attr_accessor :caller_type
# Email address of the user.
# Corresponds to the JSON property `email`
# @return [String]
attr_accessor :email
# For OAuth 2LO API requests, consumer_key of the requestor.
# Corresponds to the JSON property `key`
# @return [String]
attr_accessor :key
# Obfuscated user id of the user.
# Corresponds to the JSON property `profileId`
# @return [String]
attr_accessor :profile_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@caller_type = args[:caller_type] unless args[:caller_type].nil?
@email = args[:email] unless args[:email].nil?
@key = args[:key] unless args[:key].nil?
@profile_id = args[:profile_id] unless args[:profile_id].nil?
end
end
#
class Event
include Google::Apis::Core::Hashable
# Name of event.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Parameter value pairs for various applications.
# Corresponds to the JSON property `parameters`
# @return [Array<Google::Apis::AdminReportsV1::Activity::Event::Parameter>]
attr_accessor :parameters
# Type of event.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] unless args[:name].nil?
@parameters = args[:parameters] unless args[:parameters].nil?
@type = args[:type] unless args[:type].nil?
end
#
class Parameter
include Google::Apis::Core::Hashable
# Boolean value of the parameter.
# Corresponds to the JSON property `boolValue`
# @return [Boolean]
attr_accessor :bool_value
alias_method :bool_value?, :bool_value
# Integral value of the parameter.
# Corresponds to the JSON property `intValue`
# @return [String]
attr_accessor :int_value
# Multi-int value of the parameter.
# Corresponds to the JSON property `multiIntValue`
# @return [Array<String>]
attr_accessor :multi_int_value
# Multi-string value of the parameter.
# Corresponds to the JSON property `multiValue`
# @return [Array<String>]
attr_accessor :multi_value
# The name of the parameter.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# String value of the parameter.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@bool_value = args[:bool_value] unless args[:bool_value].nil?
@int_value = args[:int_value] unless args[:int_value].nil?
@multi_int_value = args[:multi_int_value] unless args[:multi_int_value].nil?
@multi_value = args[:multi_value] unless args[:multi_value].nil?
@name = args[:name] unless args[:name].nil?
@value = args[:value] unless args[:value].nil?
end
end
end
# Unique identifier for each activity record.
class Id
include Google::Apis::Core::Hashable
# Application name to which the event belongs.
# Corresponds to the JSON property `applicationName`
# @return [String]
attr_accessor :application_name
# Obfuscated customer ID of the source customer.
# Corresponds to the JSON property `customerId`
# @return [String]
attr_accessor :customer_id
# Time of occurrence of the activity.
# Corresponds to the JSON property `time`
# @return [DateTime]
attr_accessor :time
# Unique qualifier if multiple events have the same time.
# Corresponds to the JSON property `uniqueQualifier`
# @return [String]
attr_accessor :unique_qualifier
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@application_name = args[:application_name] unless args[:application_name].nil?
@customer_id = args[:customer_id] unless args[:customer_id].nil?
@time = args[:time] unless args[:time].nil?
@unique_qualifier = args[:unique_qualifier] unless args[:unique_qualifier].nil?
end
end
end
# An notification channel used to watch for resource changes.
class Channel
include Google::Apis::Core::Hashable
# The address where notifications are delivered for this channel.
# Corresponds to the JSON property `address`
# @return [String]
attr_accessor :address
# Date and time of notification channel expiration, expressed as a Unix
# timestamp, in milliseconds. Optional.
# Corresponds to the JSON property `expiration`
# @return [String]
attr_accessor :expiration
# A UUID or similar unique string that identifies this channel.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Identifies this as a notification channel used to watch for changes to a
# resource. Value: the fixed string "api#channel".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Additional parameters controlling delivery channel behavior. Optional.
# Corresponds to the JSON property `params`
# @return [Hash<String,String>]
attr_accessor :params
# A Boolean value to indicate whether payload is wanted. Optional.
# Corresponds to the JSON property `payload`
# @return [Boolean]
attr_accessor :payload
alias_method :payload?, :payload
# An opaque ID that identifies the resource being watched on this channel.
# Stable across different API versions.
# Corresponds to the JSON property `resourceId`
# @return [String]
attr_accessor :resource_id
# A version-specific identifier for the watched resource.
# Corresponds to the JSON property `resourceUri`
# @return [String]
attr_accessor :resource_uri
# An arbitrary string delivered to the target address with each notification
# delivered over this channel. Optional.
# Corresponds to the JSON property `token`
# @return [String]
attr_accessor :token
# The type of delivery mechanism used for this channel.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@address = args[:address] unless args[:address].nil?
@expiration = args[:expiration] unless args[:expiration].nil?
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@params = args[:params] unless args[:params].nil?
@payload = args[:payload] unless args[:payload].nil?
@resource_id = args[:resource_id] unless args[:resource_id].nil?
@resource_uri = args[:resource_uri] unless args[:resource_uri].nil?
@token = args[:token] unless args[:token].nil?
@type = args[:type] unless args[:type].nil?
end
end
# JSON template for a usage report.
class UsageReport
include Google::Apis::Core::Hashable
# The date to which the record belongs.
# Corresponds to the JSON property `date`
# @return [String]
attr_accessor :date
# Information about the type of the item.
# Corresponds to the JSON property `entity`
# @return [Google::Apis::AdminReportsV1::UsageReport::Entity]
attr_accessor :entity
# ETag of the resource.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# The kind of object.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Parameter value pairs for various applications.
# Corresponds to the JSON property `parameters`
# @return [Array<Google::Apis::AdminReportsV1::UsageReport::Parameter>]
attr_accessor :parameters
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@date = args[:date] unless args[:date].nil?
@entity = args[:entity] unless args[:entity].nil?
@etag = args[:etag] unless args[:etag].nil?
@kind = args[:kind] unless args[:kind].nil?
@parameters = args[:parameters] unless args[:parameters].nil?
end
# Information about the type of the item.
class Entity
include Google::Apis::Core::Hashable
# Obfuscated customer id for the record.
# Corresponds to the JSON property `customerId`
# @return [String]
attr_accessor :customer_id
# Obfuscated user id for the record.
# Corresponds to the JSON property `profileId`
# @return [String]
attr_accessor :profile_id
# The type of item, can be a customer or user.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
# user's email.
# Corresponds to the JSON property `userEmail`
# @return [String]
attr_accessor :user_email
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@customer_id = args[:customer_id] unless args[:customer_id].nil?
@profile_id = args[:profile_id] unless args[:profile_id].nil?
@type = args[:type] unless args[:type].nil?
@user_email = args[:user_email] unless args[:user_email].nil?
end
end
#
class Parameter
include Google::Apis::Core::Hashable
# Boolean value of the parameter.
# Corresponds to the JSON property `boolValue`
# @return [Boolean]
attr_accessor :bool_value
alias_method :bool_value?, :bool_value
# RFC 3339 formatted value of the parameter.
# Corresponds to the JSON property `datetimeValue`
# @return [DateTime]
attr_accessor :datetime_value
# Integral value of the parameter.
# Corresponds to the JSON property `intValue`
# @return [String]
attr_accessor :int_value
# Nested message value of the parameter.
# Corresponds to the JSON property `msgValue`
# @return [Array<Hash<String,Object>>]
attr_accessor :msg_value
# The name of the parameter.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# String value of the parameter.
# Corresponds to the JSON property `stringValue`
# @return [String]
attr_accessor :string_value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@bool_value = args[:bool_value] unless args[:bool_value].nil?
@datetime_value = args[:datetime_value] unless args[:datetime_value].nil?
@int_value = args[:int_value] unless args[:int_value].nil?
@msg_value = args[:msg_value] unless args[:msg_value].nil?
@name = args[:name] unless args[:name].nil?
@string_value = args[:string_value] unless args[:string_value].nil?
end
end
end
# JSON template for a collection of usage reports.
class UsageReports
include Google::Apis::Core::Hashable
# ETag of the resource.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# The kind of object.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Token for retrieving the next page
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# Various application parameter records.
# Corresponds to the JSON property `usageReports`
# @return [Array<Google::Apis::AdminReportsV1::UsageReport>]
attr_accessor :usage_reports
# Warnings if any.
# Corresponds to the JSON property `warnings`
# @return [Array<Google::Apis::AdminReportsV1::UsageReports::Warning>]
attr_accessor :warnings
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@etag = args[:etag] unless args[:etag].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
@usage_reports = args[:usage_reports] unless args[:usage_reports].nil?
@warnings = args[:warnings] unless args[:warnings].nil?
end
#
class Warning
include Google::Apis::Core::Hashable
# Machine readable code / warning type.
# Corresponds to the JSON property `code`
# @return [String]
attr_accessor :code
# Key-Value pairs to give detailed information on the warning.
# Corresponds to the JSON property `data`
# @return [Array<Google::Apis::AdminReportsV1::UsageReports::Warning::Datum>]
attr_accessor :data
# Human readable message for the warning.
# Corresponds to the JSON property `message`
# @return [String]
attr_accessor :message
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@code = args[:code] unless args[:code].nil?
@data = args[:data] unless args[:data].nil?
@message = args[:message] unless args[:message].nil?
end
#
class Datum
include Google::Apis::Core::Hashable
# Key associated with a key-value pair to give detailed information on the
# warning.
# Corresponds to the JSON property `key`
# @return [String]
attr_accessor :key
# Value associated with a key-value pair to give detailed information on the
# warning.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@key = args[:key] unless args[:key].nil?
@value = args[:value] unless args[:value].nil?
end
end
end
end
end
end
end

View File

@ -0,0 +1,231 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AdminReportsV1
class Activities
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Activity
class Representation < Google::Apis::Core::JsonRepresentation; end
class Actor
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Event
class Representation < Google::Apis::Core::JsonRepresentation; end
class Parameter
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class Id
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class Channel
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UsageReport
class Representation < Google::Apis::Core::JsonRepresentation; end
class Entity
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Parameter
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class UsageReports
class Representation < Google::Apis::Core::JsonRepresentation; end
class Warning
class Representation < Google::Apis::Core::JsonRepresentation; end
class Datum
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
end
# @private
class Activities
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdminReportsV1::Activity, decorator: Google::Apis::AdminReportsV1::Activity::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class Activity
class Representation < Google::Apis::Core::JsonRepresentation
property :actor, as: 'actor', class: Google::Apis::AdminReportsV1::Activity::Actor, decorator: Google::Apis::AdminReportsV1::Activity::Actor::Representation
property :etag, as: 'etag'
collection :events, as: 'events', class: Google::Apis::AdminReportsV1::Activity::Event, decorator: Google::Apis::AdminReportsV1::Activity::Event::Representation
property :id, as: 'id', class: Google::Apis::AdminReportsV1::Activity::Id, decorator: Google::Apis::AdminReportsV1::Activity::Id::Representation
property :ip_address, as: 'ipAddress'
property :kind, as: 'kind'
property :owner_domain, as: 'ownerDomain'
end
# @private
class Actor
class Representation < Google::Apis::Core::JsonRepresentation
property :caller_type, as: 'callerType'
property :email, as: 'email'
property :key, as: 'key'
property :profile_id, as: 'profileId'
end
end
# @private
class Event
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
collection :parameters, as: 'parameters', class: Google::Apis::AdminReportsV1::Activity::Event::Parameter, decorator: Google::Apis::AdminReportsV1::Activity::Event::Parameter::Representation
property :type, as: 'type'
end
# @private
class Parameter
class Representation < Google::Apis::Core::JsonRepresentation
property :bool_value, as: 'boolValue'
property :int_value, as: 'intValue'
collection :multi_int_value, as: 'multiIntValue'
collection :multi_value, as: 'multiValue'
property :name, as: 'name'
property :value, as: 'value'
end
end
end
# @private
class Id
class Representation < Google::Apis::Core::JsonRepresentation
property :application_name, as: 'applicationName'
property :customer_id, as: 'customerId'
property :time, as: 'time', type: DateTime
property :unique_qualifier, as: 'uniqueQualifier'
end
end
end
# @private
class Channel
class Representation < Google::Apis::Core::JsonRepresentation
property :address, as: 'address'
property :expiration, as: 'expiration'
property :id, as: 'id'
property :kind, as: 'kind'
hash :params, as: 'params'
property :payload, as: 'payload'
property :resource_id, as: 'resourceId'
property :resource_uri, as: 'resourceUri'
property :token, as: 'token'
property :type, as: 'type'
end
end
# @private
class UsageReport
class Representation < Google::Apis::Core::JsonRepresentation
property :date, as: 'date'
property :entity, as: 'entity', class: Google::Apis::AdminReportsV1::UsageReport::Entity, decorator: Google::Apis::AdminReportsV1::UsageReport::Entity::Representation
property :etag, as: 'etag'
property :kind, as: 'kind'
collection :parameters, as: 'parameters', class: Google::Apis::AdminReportsV1::UsageReport::Parameter, decorator: Google::Apis::AdminReportsV1::UsageReport::Parameter::Representation
end
# @private
class Entity
class Representation < Google::Apis::Core::JsonRepresentation
property :customer_id, as: 'customerId'
property :profile_id, as: 'profileId'
property :type, as: 'type'
property :user_email, as: 'userEmail'
end
end
# @private
class Parameter
class Representation < Google::Apis::Core::JsonRepresentation
property :bool_value, as: 'boolValue'
property :datetime_value, as: 'datetimeValue', type: DateTime
property :int_value, as: 'intValue'
collection :msg_value, as: 'msgValue'
property :name, as: 'name'
property :string_value, as: 'stringValue'
end
end
end
# @private
class UsageReports
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
collection :usage_reports, as: 'usageReports', class: Google::Apis::AdminReportsV1::UsageReport, decorator: Google::Apis::AdminReportsV1::UsageReport::Representation
collection :warnings, as: 'warnings', class: Google::Apis::AdminReportsV1::UsageReports::Warning, decorator: Google::Apis::AdminReportsV1::UsageReports::Warning::Representation
end
# @private
class Warning
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
collection :data, as: 'data', class: Google::Apis::AdminReportsV1::UsageReports::Warning::Datum, decorator: Google::Apis::AdminReportsV1::UsageReports::Warning::Datum::Representation
property :message, as: 'message'
end
# @private
class Datum
class Representation < Google::Apis::Core::JsonRepresentation
property :key, as: 'key'
property :value, as: 'value'
end
end
end
end
end
end
end

View File

@ -0,0 +1,341 @@
# Copyright 2015 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.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AdminReportsV1
# Admin Reports API
#
# Allows the administrators of Google Apps customers to fetch reports about the
# usage, collaboration, security and risk for their users.
#
# @example
# require 'google/apis/admin_reports_v1'
#
# Admin = Google::Apis::AdminReportsV1 # Alias the module
# service = Admin::ReportsService.new
#
# @see https://developers.google.com/admin-sdk/reports/
class ReportsService < Google::Apis::Core::BaseService
# @return [String]
# 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.
attr_accessor :key
# @return [String]
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
attr_accessor :quota_user
# @return [String]
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
attr_accessor :user_ip
def initialize
super('https://www.googleapis.com/', 'admin/reports/v1/')
end
# Retrieves a list of activities for a specific customer and application.
# @param [String] user_key
# Represents the profile id or the user email for which the data should be
# filtered. When 'all' is specified as the userKey, it returns usageReports for
# all users.
# @param [String] application_name
# Application name for which the events are to be retrieved.
# @param [String] actor_ip_address
# IP Address of host where the event was performed. Supports both IPv4 and IPv6
# addresses.
# @param [String] customer_id
# Represents the customer for which the data is to be fetched.
# @param [String] end_time
# Return events which occured at or before this time.
# @param [String] event_name
# Name of the event being queried.
# @param [String] filters
# Event parameters in the form [parameter1 name][operator][parameter1 value],[
# parameter2 name][operator][parameter2 value],...
# @param [Fixnum] max_results
# Number of activity records to be shown in each page.
# @param [String] page_token
# Token to specify next page.
# @param [String] start_time
# Return events which occured at or after this time.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdminReportsV1::Activities] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdminReportsV1::Activities]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_activities(user_key, application_name, actor_ip_address: nil, customer_id: nil, end_time: nil, event_name: nil, filters: nil, max_results: nil, page_token: nil, start_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'activity/users/{userKey}/applications/{applicationName}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdminReportsV1::Activities::Representation
command.response_class = Google::Apis::AdminReportsV1::Activities
command.params['userKey'] = user_key unless user_key.nil?
command.params['applicationName'] = application_name unless application_name.nil?
command.query['actorIpAddress'] = actor_ip_address unless actor_ip_address.nil?
command.query['customerId'] = customer_id unless customer_id.nil?
command.query['endTime'] = end_time unless end_time.nil?
command.query['eventName'] = event_name unless event_name.nil?
command.query['filters'] = filters unless filters.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['startTime'] = start_time unless start_time.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Push changes to activities
# @param [String] user_key
# Represents the profile id or the user email for which the data should be
# filtered. When 'all' is specified as the userKey, it returns usageReports for
# all users.
# @param [String] application_name
# Application name for which the events are to be retrieved.
# @param [Google::Apis::AdminReportsV1::Channel] channel_object
# @param [String] actor_ip_address
# IP Address of host where the event was performed. Supports both IPv4 and IPv6
# addresses.
# @param [String] customer_id
# Represents the customer for which the data is to be fetched.
# @param [String] end_time
# Return events which occured at or before this time.
# @param [String] event_name
# Name of the event being queried.
# @param [String] filters
# Event parameters in the form [parameter1 name][operator][parameter1 value],[
# parameter2 name][operator][parameter2 value],...
# @param [Fixnum] max_results
# Number of activity records to be shown in each page.
# @param [String] page_token
# Token to specify next page.
# @param [String] start_time
# Return events which occured at or after this time.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdminReportsV1::Channel] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdminReportsV1::Channel]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def watch_activity(user_key, application_name, channel_object = nil, actor_ip_address: nil, customer_id: nil, end_time: nil, event_name: nil, filters: nil, max_results: nil, page_token: nil, start_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'activity/users/{userKey}/applications/{applicationName}/watch'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::AdminReportsV1::Channel::Representation
command.request_object = channel_object
command.response_representation = Google::Apis::AdminReportsV1::Channel::Representation
command.response_class = Google::Apis::AdminReportsV1::Channel
command.params['userKey'] = user_key unless user_key.nil?
command.params['applicationName'] = application_name unless application_name.nil?
command.query['actorIpAddress'] = actor_ip_address unless actor_ip_address.nil?
command.query['customerId'] = customer_id unless customer_id.nil?
command.query['endTime'] = end_time unless end_time.nil?
command.query['eventName'] = event_name unless event_name.nil?
command.query['filters'] = filters unless filters.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['startTime'] = start_time unless start_time.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Stop watching resources through this channel
# @param [Google::Apis::AdminReportsV1::Channel] channel_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '/admin/reports_v1/channels/stop'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::AdminReportsV1::Channel::Representation
command.request_object = channel_object
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a report which is a collection of properties / statistics for a
# specific customer.
# @param [String] date
# Represents the date in yyyy-mm-dd format for which the data is to be fetched.
# @param [String] customer_id
# Represents the customer for which the data is to be fetched.
# @param [String] page_token
# Token to specify next page.
# @param [String] parameters
# Represents the application name, parameter name pairs to fetch in csv as
# app_name1:param_name1, app_name2:param_name2.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdminReportsV1::UsageReports] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdminReportsV1::UsageReports]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_customer_usage_report(date, customer_id: nil, page_token: nil, parameters: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'usage/dates/{date}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdminReportsV1::UsageReports::Representation
command.response_class = Google::Apis::AdminReportsV1::UsageReports
command.params['date'] = date unless date.nil?
command.query['customerId'] = customer_id unless customer_id.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['parameters'] = parameters unless parameters.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a report which is a collection of properties / statistics for a set
# of users.
# @param [String] user_key
# Represents the profile id or the user email for which the data should be
# filtered.
# @param [String] date
# Represents the date in yyyy-mm-dd format for which the data is to be fetched.
# @param [String] customer_id
# Represents the customer for which the data is to be fetched.
# @param [String] filters
# Represents the set of filters including parameter operator value.
# @param [Fixnum] max_results
# Maximum number of results to return. Maximum allowed is 1000
# @param [String] page_token
# Token to specify next page.
# @param [String] parameters
# Represents the application name, parameter name pairs to fetch in csv as
# app_name1:param_name1, app_name2:param_name2.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AdminReportsV1::UsageReports] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdminReportsV1::UsageReports]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_user_usage_report(user_key, date, customer_id: nil, filters: nil, max_results: nil, page_token: nil, parameters: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'usage/users/{userKey}/dates/{date}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdminReportsV1::UsageReports::Representation
command.response_class = Google::Apis::AdminReportsV1::UsageReports
command.params['userKey'] = user_key unless user_key.nil?
command.params['date'] = date unless date.nil?
command.query['customerId'] = customer_id unless customer_id.nil?
command.query['filters'] = filters unless filters.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['parameters'] = parameters unless parameters.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
protected
def apply_command_defaults(command)
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
end
end
end
end
end

View File

@ -0,0 +1,38 @@
# Copyright 2015 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.
require 'google/apis/adsense_v1_4/service.rb'
require 'google/apis/adsense_v1_4/classes.rb'
require 'google/apis/adsense_v1_4/representations.rb'
module Google
module Apis
# AdSense Management API
#
# Gives AdSense publishers access to their inventory and the ability to generate
# reports
#
# @see https://developers.google.com/adsense/management/
module AdsenseV1_4
VERSION = 'V1_4'
REVISION = '20150519'
# View and manage your AdSense data
AUTH_ADSENSE = 'https://www.googleapis.com/auth/adsense'
# View your AdSense data
AUTH_ADSENSE_READONLY = 'https://www.googleapis.com/auth/adsense.readonly'
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,493 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AdsenseV1_4
class Account
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Accounts
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AdClient
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AdClients
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AdCode
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AdStyle
class Representation < Google::Apis::Core::JsonRepresentation; end
class Colors
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Font
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class AdUnit
class Representation < Google::Apis::Core::JsonRepresentation; end
class ContentAdsSettings
class Representation < Google::Apis::Core::JsonRepresentation; end
class BackupOption
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class FeedAdsSettings
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class MobileContentAdsSettings
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class AdUnits
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class GenerateReportResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
class Header
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class Alert
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Alerts
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class CustomChannel
class Representation < Google::Apis::Core::JsonRepresentation; end
class TargetingInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class CustomChannels
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Metadata
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Payment
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Payments
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ReportingMetadataEntry
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class SavedAdStyle
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class SavedAdStyles
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class SavedReport
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class SavedReports
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UrlChannel
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UrlChannels
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class Account
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
property :premium, as: 'premium'
collection :sub_accounts, as: 'subAccounts', class: Google::Apis::AdsenseV1_4::Account, decorator: Google::Apis::AdsenseV1_4::Account::Representation
property :timezone, as: 'timezone'
end
end
# @private
class Accounts
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdsenseV1_4::Account, decorator: Google::Apis::AdsenseV1_4::Account::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class AdClient
class Representation < Google::Apis::Core::JsonRepresentation
property :arc_opt_in, as: 'arcOptIn'
property :arc_review_mode, as: 'arcReviewMode'
property :id, as: 'id'
property :kind, as: 'kind'
property :product_code, as: 'productCode'
property :supports_reporting, as: 'supportsReporting'
end
end
# @private
class AdClients
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdsenseV1_4::AdClient, decorator: Google::Apis::AdsenseV1_4::AdClient::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class AdCode
class Representation < Google::Apis::Core::JsonRepresentation
property :ad_code, as: 'adCode'
property :kind, as: 'kind'
end
end
# @private
class AdStyle
class Representation < Google::Apis::Core::JsonRepresentation
property :colors, as: 'colors', class: Google::Apis::AdsenseV1_4::AdStyle::Colors, decorator: Google::Apis::AdsenseV1_4::AdStyle::Colors::Representation
property :corners, as: 'corners'
property :font, as: 'font', class: Google::Apis::AdsenseV1_4::AdStyle::Font, decorator: Google::Apis::AdsenseV1_4::AdStyle::Font::Representation
property :kind, as: 'kind'
end
# @private
class Colors
class Representation < Google::Apis::Core::JsonRepresentation
property :background, as: 'background'
property :border, as: 'border'
property :text, as: 'text'
property :title, as: 'title'
property :url, as: 'url'
end
end
# @private
class Font
class Representation < Google::Apis::Core::JsonRepresentation
property :family, as: 'family'
property :size, as: 'size'
end
end
end
# @private
class AdUnit
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
property :content_ads_settings, as: 'contentAdsSettings', class: Google::Apis::AdsenseV1_4::AdUnit::ContentAdsSettings, decorator: Google::Apis::AdsenseV1_4::AdUnit::ContentAdsSettings::Representation
property :custom_style, as: 'customStyle', class: Google::Apis::AdsenseV1_4::AdStyle, decorator: Google::Apis::AdsenseV1_4::AdStyle::Representation
property :feed_ads_settings, as: 'feedAdsSettings', class: Google::Apis::AdsenseV1_4::AdUnit::FeedAdsSettings, decorator: Google::Apis::AdsenseV1_4::AdUnit::FeedAdsSettings::Representation
property :id, as: 'id'
property :kind, as: 'kind'
property :mobile_content_ads_settings, as: 'mobileContentAdsSettings', class: Google::Apis::AdsenseV1_4::AdUnit::MobileContentAdsSettings, decorator: Google::Apis::AdsenseV1_4::AdUnit::MobileContentAdsSettings::Representation
property :name, as: 'name'
property :saved_style_id, as: 'savedStyleId'
property :status, as: 'status'
end
# @private
class ContentAdsSettings
class Representation < Google::Apis::Core::JsonRepresentation
property :backup_option, as: 'backupOption', class: Google::Apis::AdsenseV1_4::AdUnit::ContentAdsSettings::BackupOption, decorator: Google::Apis::AdsenseV1_4::AdUnit::ContentAdsSettings::BackupOption::Representation
property :size, as: 'size'
property :type, as: 'type'
end
# @private
class BackupOption
class Representation < Google::Apis::Core::JsonRepresentation
property :color, as: 'color'
property :type, as: 'type'
property :url, as: 'url'
end
end
end
# @private
class FeedAdsSettings
class Representation < Google::Apis::Core::JsonRepresentation
property :ad_position, as: 'adPosition'
property :frequency, as: 'frequency'
property :minimum_word_count, as: 'minimumWordCount'
property :type, as: 'type'
end
end
# @private
class MobileContentAdsSettings
class Representation < Google::Apis::Core::JsonRepresentation
property :markup_language, as: 'markupLanguage'
property :scripting_language, as: 'scriptingLanguage'
property :size, as: 'size'
property :type, as: 'type'
end
end
end
# @private
class AdUnits
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdsenseV1_4::AdUnit, decorator: Google::Apis::AdsenseV1_4::AdUnit::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class GenerateReportResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :averages, as: 'averages'
property :end_date, as: 'endDate'
collection :headers, as: 'headers', class: Google::Apis::AdsenseV1_4::GenerateReportResponse::Header, decorator: Google::Apis::AdsenseV1_4::GenerateReportResponse::Header::Representation
property :kind, as: 'kind'
collection :rows, as: 'rows', :class => Array do
include Representable::JSON::Collection
items
end
property :start_date, as: 'startDate'
property :total_matched_rows, as: 'totalMatchedRows'
collection :totals, as: 'totals'
collection :warnings, as: 'warnings'
end
# @private
class Header
class Representation < Google::Apis::Core::JsonRepresentation
property :currency, as: 'currency'
property :name, as: 'name'
property :type, as: 'type'
end
end
end
# @private
class Alert
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :is_dismissible, as: 'isDismissible'
property :kind, as: 'kind'
property :message, as: 'message'
property :severity, as: 'severity'
property :type, as: 'type'
end
end
# @private
class Alerts
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::AdsenseV1_4::Alert, decorator: Google::Apis::AdsenseV1_4::Alert::Representation
property :kind, as: 'kind'
end
end
# @private
class CustomChannel
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
property :targeting_info, as: 'targetingInfo', class: Google::Apis::AdsenseV1_4::CustomChannel::TargetingInfo, decorator: Google::Apis::AdsenseV1_4::CustomChannel::TargetingInfo::Representation
end
# @private
class TargetingInfo
class Representation < Google::Apis::Core::JsonRepresentation
property :ads_appear_on, as: 'adsAppearOn'
property :description, as: 'description'
property :location, as: 'location'
property :site_language, as: 'siteLanguage'
end
end
end
# @private
class CustomChannels
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdsenseV1_4::CustomChannel, decorator: Google::Apis::AdsenseV1_4::CustomChannel::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class Metadata
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::AdsenseV1_4::ReportingMetadataEntry, decorator: Google::Apis::AdsenseV1_4::ReportingMetadataEntry::Representation
property :kind, as: 'kind'
end
end
# @private
class Payment
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :kind, as: 'kind'
property :payment_amount, as: 'paymentAmount'
property :payment_amount_currency_code, as: 'paymentAmountCurrencyCode'
property :payment_date, as: 'paymentDate'
end
end
# @private
class Payments
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::AdsenseV1_4::Payment, decorator: Google::Apis::AdsenseV1_4::Payment::Representation
property :kind, as: 'kind'
end
end
# @private
class ReportingMetadataEntry
class Representation < Google::Apis::Core::JsonRepresentation
collection :compatible_dimensions, as: 'compatibleDimensions'
collection :compatible_metrics, as: 'compatibleMetrics'
property :id, as: 'id'
property :kind, as: 'kind'
collection :required_dimensions, as: 'requiredDimensions'
collection :required_metrics, as: 'requiredMetrics'
collection :supported_products, as: 'supportedProducts'
end
end
# @private
class SavedAdStyle
class Representation < Google::Apis::Core::JsonRepresentation
property :ad_style, as: 'adStyle', class: Google::Apis::AdsenseV1_4::AdStyle, decorator: Google::Apis::AdsenseV1_4::AdStyle::Representation
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
end
end
# @private
class SavedAdStyles
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdsenseV1_4::SavedAdStyle, decorator: Google::Apis::AdsenseV1_4::SavedAdStyle::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class SavedReport
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
end
end
# @private
class SavedReports
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdsenseV1_4::SavedReport, decorator: Google::Apis::AdsenseV1_4::SavedReport::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class UrlChannel
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :kind, as: 'kind'
property :url_pattern, as: 'urlPattern'
end
end
# @private
class UrlChannels
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdsenseV1_4::UrlChannel, decorator: Google::Apis::AdsenseV1_4::UrlChannel::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,35 @@
# Copyright 2015 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.
require 'google/apis/adsensehost_v4_1/service.rb'
require 'google/apis/adsensehost_v4_1/classes.rb'
require 'google/apis/adsensehost_v4_1/representations.rb'
module Google
module Apis
# AdSense Host API
#
# Gives AdSense Hosts access to report generation, ad code generation, and
# publisher management capabilities.
#
# @see https://developers.google.com/adsense/host/
module AdsensehostV4_1
VERSION = 'V4_1'
REVISION = '20150326'
# View and manage your AdSense host data and associated accounts
AUTH_ADSENSEHOST = 'https://www.googleapis.com/auth/adsensehost'
end
end
end

View File

@ -0,0 +1,834 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AdsensehostV4_1
#
class Account
include Google::Apis::Core::Hashable
# Unique identifier of this account.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Kind of resource this is, in this case adsensehost#account.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Name of this account.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Approval status of this account. One of: PENDING, APPROVED, DISABLED.
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@name = args[:name] unless args[:name].nil?
@status = args[:status] unless args[:status].nil?
end
end
#
class Accounts
include Google::Apis::Core::Hashable
# ETag of this response for caching purposes.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# The accounts returned in this list response.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AdsensehostV4_1::Account>]
attr_accessor :items
# Kind of list this is, in this case adsensehost#accounts.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@etag = args[:etag] unless args[:etag].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
end
end
#
class AdClient
include Google::Apis::Core::Hashable
# Whether this ad client is opted in to ARC.
# Corresponds to the JSON property `arcOptIn`
# @return [Boolean]
attr_accessor :arc_opt_in
alias_method :arc_opt_in?, :arc_opt_in
# Unique identifier of this ad client.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Kind of resource this is, in this case adsensehost#adClient.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# This ad client's product code, which corresponds to the PRODUCT_CODE report
# dimension.
# Corresponds to the JSON property `productCode`
# @return [String]
attr_accessor :product_code
# Whether this ad client supports being reported on.
# Corresponds to the JSON property `supportsReporting`
# @return [Boolean]
attr_accessor :supports_reporting
alias_method :supports_reporting?, :supports_reporting
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@arc_opt_in = args[:arc_opt_in] unless args[:arc_opt_in].nil?
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@product_code = args[:product_code] unless args[:product_code].nil?
@supports_reporting = args[:supports_reporting] unless args[:supports_reporting].nil?
end
end
#
class AdClients
include Google::Apis::Core::Hashable
# ETag of this response for caching purposes.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# The ad clients returned in this list response.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AdsensehostV4_1::AdClient>]
attr_accessor :items
# Kind of list this is, in this case adsensehost#adClients.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Continuation token used to page through ad clients. To retrieve the next page
# of results, set the next request's "pageToken" value to this.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@etag = args[:etag] unless args[:etag].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
#
class AdCode
include Google::Apis::Core::Hashable
# The ad code snippet.
# Corresponds to the JSON property `adCode`
# @return [String]
attr_accessor :ad_code
# Kind this is, in this case adsensehost#adCode.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@ad_code = args[:ad_code] unless args[:ad_code].nil?
@kind = args[:kind] unless args[:kind].nil?
end
end
#
class AdStyle
include Google::Apis::Core::Hashable
# The colors included in the style. These are represented as six hexadecimal
# characters, similar to HTML color codes, but without the leading hash.
# Corresponds to the JSON property `colors`
# @return [Google::Apis::AdsensehostV4_1::AdStyle::Colors]
attr_accessor :colors
# The style of the corners in the ad. Possible values are SQUARE,
# SLIGHTLY_ROUNDED and VERY_ROUNDED.
# Corresponds to the JSON property `corners`
# @return [String]
attr_accessor :corners
# The font which is included in the style.
# Corresponds to the JSON property `font`
# @return [Google::Apis::AdsensehostV4_1::AdStyle::Font]
attr_accessor :font
# Kind this is, in this case adsensehost#adStyle.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@colors = args[:colors] unless args[:colors].nil?
@corners = args[:corners] unless args[:corners].nil?
@font = args[:font] unless args[:font].nil?
@kind = args[:kind] unless args[:kind].nil?
end
# The colors included in the style. These are represented as six hexadecimal
# characters, similar to HTML color codes, but without the leading hash.
class Colors
include Google::Apis::Core::Hashable
# The color of the ad background.
# Corresponds to the JSON property `background`
# @return [String]
attr_accessor :background
# The color of the ad border.
# Corresponds to the JSON property `border`
# @return [String]
attr_accessor :border
# The color of the ad text.
# Corresponds to the JSON property `text`
# @return [String]
attr_accessor :text
# The color of the ad title.
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
# The color of the ad url.
# Corresponds to the JSON property `url`
# @return [String]
attr_accessor :url
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@background = args[:background] unless args[:background].nil?
@border = args[:border] unless args[:border].nil?
@text = args[:text] unless args[:text].nil?
@title = args[:title] unless args[:title].nil?
@url = args[:url] unless args[:url].nil?
end
end
# The font which is included in the style.
class Font
include Google::Apis::Core::Hashable
# The family of the font. Possible values are: ACCOUNT_DEFAULT_FAMILY,
# ADSENSE_DEFAULT_FAMILY, ARIAL, TIMES and VERDANA.
# Corresponds to the JSON property `family`
# @return [String]
attr_accessor :family
# The size of the font. Possible values are: ACCOUNT_DEFAULT_SIZE,
# ADSENSE_DEFAULT_SIZE, SMALL, MEDIUM and LARGE.
# Corresponds to the JSON property `size`
# @return [String]
attr_accessor :size
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@family = args[:family] unless args[:family].nil?
@size = args[:size] unless args[:size].nil?
end
end
end
#
class AdUnit
include Google::Apis::Core::Hashable
# Identity code of this ad unit, not necessarily unique across ad clients.
# Corresponds to the JSON property `code`
# @return [String]
attr_accessor :code
# Settings specific to content ads (AFC) and highend mobile content ads (AFMC).
# Corresponds to the JSON property `contentAdsSettings`
# @return [Google::Apis::AdsensehostV4_1::AdUnit::ContentAdsSettings]
attr_accessor :content_ads_settings
# Custom style information specific to this ad unit.
# Corresponds to the JSON property `customStyle`
# @return [Google::Apis::AdsensehostV4_1::AdStyle]
attr_accessor :custom_style
# Unique identifier of this ad unit. This should be considered an opaque
# identifier; it is not safe to rely on it being in any particular format.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Kind of resource this is, in this case adsensehost#adUnit.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Settings specific to WAP mobile content ads (AFMC).
# Corresponds to the JSON property `mobileContentAdsSettings`
# @return [Google::Apis::AdsensehostV4_1::AdUnit::MobileContentAdsSettings]
attr_accessor :mobile_content_ads_settings
# Name of this ad unit.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Status of this ad unit. Possible values are:
# NEW: Indicates that the ad unit was created within the last seven days and
# does not yet have any activity associated with it.
# ACTIVE: Indicates that there has been activity on this ad unit in the last
# seven days.
# INACTIVE: Indicates that there has been no activity on this ad unit in the
# last seven days.
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@code = args[:code] unless args[:code].nil?
@content_ads_settings = args[:content_ads_settings] unless args[:content_ads_settings].nil?
@custom_style = args[:custom_style] unless args[:custom_style].nil?
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@mobile_content_ads_settings = args[:mobile_content_ads_settings] unless args[:mobile_content_ads_settings].nil?
@name = args[:name] unless args[:name].nil?
@status = args[:status] unless args[:status].nil?
end
# Settings specific to content ads (AFC) and highend mobile content ads (AFMC).
class ContentAdsSettings
include Google::Apis::Core::Hashable
# The backup option to be used in instances where no ad is available.
# Corresponds to the JSON property `backupOption`
# @return [Google::Apis::AdsensehostV4_1::AdUnit::ContentAdsSettings::BackupOption]
attr_accessor :backup_option
# Size of this ad unit. Size values are in the form SIZE_`width`_`height`.
# Corresponds to the JSON property `size`
# @return [String]
attr_accessor :size
# Type of this ad unit. Possible values are TEXT, TEXT_IMAGE, IMAGE and LINK.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@backup_option = args[:backup_option] unless args[:backup_option].nil?
@size = args[:size] unless args[:size].nil?
@type = args[:type] unless args[:type].nil?
end
# The backup option to be used in instances where no ad is available.
class BackupOption
include Google::Apis::Core::Hashable
# Color to use when type is set to COLOR. These are represented as six
# hexadecimal characters, similar to HTML color codes, but without the leading
# hash.
# Corresponds to the JSON property `color`
# @return [String]
attr_accessor :color
# Type of the backup option. Possible values are BLANK, COLOR and URL.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
# URL to use when type is set to URL.
# Corresponds to the JSON property `url`
# @return [String]
attr_accessor :url
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@color = args[:color] unless args[:color].nil?
@type = args[:type] unless args[:type].nil?
@url = args[:url] unless args[:url].nil?
end
end
end
# Settings specific to WAP mobile content ads (AFMC).
class MobileContentAdsSettings
include Google::Apis::Core::Hashable
# The markup language to use for this ad unit.
# Corresponds to the JSON property `markupLanguage`
# @return [String]
attr_accessor :markup_language
# The scripting language to use for this ad unit.
# Corresponds to the JSON property `scriptingLanguage`
# @return [String]
attr_accessor :scripting_language
# Size of this ad unit.
# Corresponds to the JSON property `size`
# @return [String]
attr_accessor :size
# Type of this ad unit.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@markup_language = args[:markup_language] unless args[:markup_language].nil?
@scripting_language = args[:scripting_language] unless args[:scripting_language].nil?
@size = args[:size] unless args[:size].nil?
@type = args[:type] unless args[:type].nil?
end
end
end
#
class AdUnits
include Google::Apis::Core::Hashable
# ETag of this response for caching purposes.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# The ad units returned in this list response.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AdsensehostV4_1::AdUnit>]
attr_accessor :items
# Kind of list this is, in this case adsensehost#adUnits.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Continuation token used to page through ad units. To retrieve the next page of
# results, set the next request's "pageToken" value to this.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@etag = args[:etag] unless args[:etag].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
#
class AssociationSession
include Google::Apis::Core::Hashable
# Hosted account id of the associated publisher after association. Present if
# status is ACCEPTED.
# Corresponds to the JSON property `accountId`
# @return [String]
attr_accessor :account_id
# Unique identifier of this association session.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Kind of resource this is, in this case adsensehost#associationSession.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The products to associate with the user. Options: AFC, AFF, AFS, AFMC
# Corresponds to the JSON property `productCodes`
# @return [Array<String>]
attr_accessor :product_codes
# Redirect URL of this association session. Used to redirect users into the
# AdSense association flow.
# Corresponds to the JSON property `redirectUrl`
# @return [String]
attr_accessor :redirect_url
# Status of the completed association, available once the association callback
# token has been verified. One of ACCEPTED, REJECTED, or ERROR.
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
# The preferred locale of the user themselves when going through the AdSense
# association flow.
# Corresponds to the JSON property `userLocale`
# @return [String]
attr_accessor :user_locale
# The locale of the user's hosted website.
# Corresponds to the JSON property `websiteLocale`
# @return [String]
attr_accessor :website_locale
# The URL of the user's hosted website.
# Corresponds to the JSON property `websiteUrl`
# @return [String]
attr_accessor :website_url
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@account_id = args[:account_id] unless args[:account_id].nil?
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@product_codes = args[:product_codes] unless args[:product_codes].nil?
@redirect_url = args[:redirect_url] unless args[:redirect_url].nil?
@status = args[:status] unless args[:status].nil?
@user_locale = args[:user_locale] unless args[:user_locale].nil?
@website_locale = args[:website_locale] unless args[:website_locale].nil?
@website_url = args[:website_url] unless args[:website_url].nil?
end
end
#
class CustomChannel
include Google::Apis::Core::Hashable
# Code of this custom channel, not necessarily unique across ad clients.
# Corresponds to the JSON property `code`
# @return [String]
attr_accessor :code
# Unique identifier of this custom channel. This should be considered an opaque
# identifier; it is not safe to rely on it being in any particular format.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Kind of resource this is, in this case adsensehost#customChannel.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Name of this custom channel.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@code = args[:code] unless args[:code].nil?
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@name = args[:name] unless args[:name].nil?
end
end
#
class CustomChannels
include Google::Apis::Core::Hashable
# ETag of this response for caching purposes.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# The custom channels returned in this list response.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AdsensehostV4_1::CustomChannel>]
attr_accessor :items
# Kind of list this is, in this case adsensehost#customChannels.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Continuation token used to page through custom channels. To retrieve the next
# page of results, set the next request's "pageToken" value to this.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@etag = args[:etag] unless args[:etag].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
#
class Report
include Google::Apis::Core::Hashable
# The averages of the report. This is the same length as any other row in the
# report; cells corresponding to dimension columns are empty.
# Corresponds to the JSON property `averages`
# @return [Array<String>]
attr_accessor :averages
# The header information of the columns requested in the report. This is a list
# of headers; one for each dimension in the request, followed by one for each
# metric in the request.
# Corresponds to the JSON property `headers`
# @return [Array<Google::Apis::AdsensehostV4_1::Report::Header>]
attr_accessor :headers
# Kind this is, in this case adsensehost#report.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The output rows of the report. Each row is a list of cells; one for each
# dimension in the request, followed by one for each metric in the request. The
# dimension cells contain strings, and the metric cells contain numbers.
# Corresponds to the JSON property `rows`
# @return [Array<Array<String>>]
attr_accessor :rows
# The total number of rows matched by the report request. Fewer rows may be
# returned in the response due to being limited by the row count requested or
# the report row limit.
# Corresponds to the JSON property `totalMatchedRows`
# @return [String]
attr_accessor :total_matched_rows
# The totals of the report. This is the same length as any other row in the
# report; cells corresponding to dimension columns are empty.
# Corresponds to the JSON property `totals`
# @return [Array<String>]
attr_accessor :totals
# Any warnings associated with generation of the report.
# Corresponds to the JSON property `warnings`
# @return [Array<String>]
attr_accessor :warnings
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@averages = args[:averages] unless args[:averages].nil?
@headers = args[:headers] unless args[:headers].nil?
@kind = args[:kind] unless args[:kind].nil?
@rows = args[:rows] unless args[:rows].nil?
@total_matched_rows = args[:total_matched_rows] unless args[:total_matched_rows].nil?
@totals = args[:totals] unless args[:totals].nil?
@warnings = args[:warnings] unless args[:warnings].nil?
end
#
class Header
include Google::Apis::Core::Hashable
# The currency of this column. Only present if the header type is
# METRIC_CURRENCY.
# Corresponds to the JSON property `currency`
# @return [String]
attr_accessor :currency
# The name of the header.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The type of the header; one of DIMENSION, METRIC_TALLY, METRIC_RATIO, or
# METRIC_CURRENCY.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@currency = args[:currency] unless args[:currency].nil?
@name = args[:name] unless args[:name].nil?
@type = args[:type] unless args[:type].nil?
end
end
end
#
class UrlChannel
include Google::Apis::Core::Hashable
# Unique identifier of this URL channel. This should be considered an opaque
# identifier; it is not safe to rely on it being in any particular format.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Kind of resource this is, in this case adsensehost#urlChannel.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# URL Pattern of this URL channel. Does not include "http://" or "https://".
# Example: www.example.com/home
# Corresponds to the JSON property `urlPattern`
# @return [String]
attr_accessor :url_pattern
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@url_pattern = args[:url_pattern] unless args[:url_pattern].nil?
end
end
#
class UrlChannels
include Google::Apis::Core::Hashable
# ETag of this response for caching purposes.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# The URL channels returned in this list response.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AdsensehostV4_1::UrlChannel>]
attr_accessor :items
# Kind of list this is, in this case adsensehost#urlChannels.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Continuation token used to page through URL channels. To retrieve the next
# page of results, set the next request's "pageToken" value to this.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@etag = args[:etag] unless args[:etag].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
end
end
end

View File

@ -0,0 +1,327 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AdsensehostV4_1
class Account
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Accounts
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AdClient
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AdClients
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AdCode
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AdStyle
class Representation < Google::Apis::Core::JsonRepresentation; end
class Colors
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Font
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class AdUnit
class Representation < Google::Apis::Core::JsonRepresentation; end
class ContentAdsSettings
class Representation < Google::Apis::Core::JsonRepresentation; end
class BackupOption
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class MobileContentAdsSettings
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class AdUnits
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AssociationSession
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class CustomChannel
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class CustomChannels
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Report
class Representation < Google::Apis::Core::JsonRepresentation; end
class Header
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class UrlChannel
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UrlChannels
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class Account
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
property :status, as: 'status'
end
end
# @private
class Accounts
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdsensehostV4_1::Account, decorator: Google::Apis::AdsensehostV4_1::Account::Representation
property :kind, as: 'kind'
end
end
# @private
class AdClient
class Representation < Google::Apis::Core::JsonRepresentation
property :arc_opt_in, as: 'arcOptIn'
property :id, as: 'id'
property :kind, as: 'kind'
property :product_code, as: 'productCode'
property :supports_reporting, as: 'supportsReporting'
end
end
# @private
class AdClients
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdsensehostV4_1::AdClient, decorator: Google::Apis::AdsensehostV4_1::AdClient::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class AdCode
class Representation < Google::Apis::Core::JsonRepresentation
property :ad_code, as: 'adCode'
property :kind, as: 'kind'
end
end
# @private
class AdStyle
class Representation < Google::Apis::Core::JsonRepresentation
property :colors, as: 'colors', class: Google::Apis::AdsensehostV4_1::AdStyle::Colors, decorator: Google::Apis::AdsensehostV4_1::AdStyle::Colors::Representation
property :corners, as: 'corners'
property :font, as: 'font', class: Google::Apis::AdsensehostV4_1::AdStyle::Font, decorator: Google::Apis::AdsensehostV4_1::AdStyle::Font::Representation
property :kind, as: 'kind'
end
# @private
class Colors
class Representation < Google::Apis::Core::JsonRepresentation
property :background, as: 'background'
property :border, as: 'border'
property :text, as: 'text'
property :title, as: 'title'
property :url, as: 'url'
end
end
# @private
class Font
class Representation < Google::Apis::Core::JsonRepresentation
property :family, as: 'family'
property :size, as: 'size'
end
end
end
# @private
class AdUnit
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
property :content_ads_settings, as: 'contentAdsSettings', class: Google::Apis::AdsensehostV4_1::AdUnit::ContentAdsSettings, decorator: Google::Apis::AdsensehostV4_1::AdUnit::ContentAdsSettings::Representation
property :custom_style, as: 'customStyle', class: Google::Apis::AdsensehostV4_1::AdStyle, decorator: Google::Apis::AdsensehostV4_1::AdStyle::Representation
property :id, as: 'id'
property :kind, as: 'kind'
property :mobile_content_ads_settings, as: 'mobileContentAdsSettings', class: Google::Apis::AdsensehostV4_1::AdUnit::MobileContentAdsSettings, decorator: Google::Apis::AdsensehostV4_1::AdUnit::MobileContentAdsSettings::Representation
property :name, as: 'name'
property :status, as: 'status'
end
# @private
class ContentAdsSettings
class Representation < Google::Apis::Core::JsonRepresentation
property :backup_option, as: 'backupOption', class: Google::Apis::AdsensehostV4_1::AdUnit::ContentAdsSettings::BackupOption, decorator: Google::Apis::AdsensehostV4_1::AdUnit::ContentAdsSettings::BackupOption::Representation
property :size, as: 'size'
property :type, as: 'type'
end
# @private
class BackupOption
class Representation < Google::Apis::Core::JsonRepresentation
property :color, as: 'color'
property :type, as: 'type'
property :url, as: 'url'
end
end
end
# @private
class MobileContentAdsSettings
class Representation < Google::Apis::Core::JsonRepresentation
property :markup_language, as: 'markupLanguage'
property :scripting_language, as: 'scriptingLanguage'
property :size, as: 'size'
property :type, as: 'type'
end
end
end
# @private
class AdUnits
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdsensehostV4_1::AdUnit, decorator: Google::Apis::AdsensehostV4_1::AdUnit::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class AssociationSession
class Representation < Google::Apis::Core::JsonRepresentation
property :account_id, as: 'accountId'
property :id, as: 'id'
property :kind, as: 'kind'
collection :product_codes, as: 'productCodes'
property :redirect_url, as: 'redirectUrl'
property :status, as: 'status'
property :user_locale, as: 'userLocale'
property :website_locale, as: 'websiteLocale'
property :website_url, as: 'websiteUrl'
end
end
# @private
class CustomChannel
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
end
end
# @private
class CustomChannels
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdsensehostV4_1::CustomChannel, decorator: Google::Apis::AdsensehostV4_1::CustomChannel::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class Report
class Representation < Google::Apis::Core::JsonRepresentation
collection :averages, as: 'averages'
collection :headers, as: 'headers', class: Google::Apis::AdsensehostV4_1::Report::Header, decorator: Google::Apis::AdsensehostV4_1::Report::Header::Representation
property :kind, as: 'kind'
collection :rows, as: 'rows', :class => Array do
include Representable::JSON::Collection
items
end
property :total_matched_rows, as: 'totalMatchedRows'
collection :totals, as: 'totals'
collection :warnings, as: 'warnings'
end
# @private
class Header
class Representation < Google::Apis::Core::JsonRepresentation
property :currency, as: 'currency'
property :name, as: 'name'
property :type, as: 'type'
end
end
end
# @private
class UrlChannel
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :kind, as: 'kind'
property :url_pattern, as: 'urlPattern'
end
end
# @private
class UrlChannels
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdsensehostV4_1::UrlChannel, decorator: Google::Apis::AdsensehostV4_1::UrlChannel::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,49 @@
# Copyright 2015 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.
require 'google/apis/analytics_v3/service.rb'
require 'google/apis/analytics_v3/classes.rb'
require 'google/apis/analytics_v3/representations.rb'
module Google
module Apis
# Google Analytics API
#
# View and manage your Google Analytics data
#
# @see https://developers.google.com/analytics/
module AnalyticsV3
VERSION = 'V3'
REVISION = '20150417'
# View and manage your Google Analytics data
AUTH_ANALYTICS = 'https://www.googleapis.com/auth/analytics'
# Edit Google Analytics management entities
AUTH_ANALYTICS_EDIT = 'https://www.googleapis.com/auth/analytics.edit'
# Manage Google Analytics Account users by email address
AUTH_ANALYTICS_MANAGE_USERS = 'https://www.googleapis.com/auth/analytics.manage.users'
# View Google Analytics user permissions
AUTH_ANALYTICS_MANAGE_USERS_READONLY = 'https://www.googleapis.com/auth/analytics.manage.users.readonly'
# Create a new Google Analytics account along with its default property and view
AUTH_ANALYTICS_PROVISION = 'https://www.googleapis.com/auth/analytics.provision'
# View your Google Analytics data
AUTH_ANALYTICS_READONLY = 'https://www.googleapis.com/auth/analytics.readonly'
end
end
end

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,34 @@
# Copyright 2015 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.
require 'google/apis/androidenterprise_v1/service.rb'
require 'google/apis/androidenterprise_v1/classes.rb'
require 'google/apis/androidenterprise_v1/representations.rb'
module Google
module Apis
# Google Play EMM API
#
# Allows MDMs/EMMs and enterprises to manage the deployment of apps to Android
# for Work users.
#
module AndroidenterpriseV1
VERSION = 'V1'
REVISION = '20150303'
# Manage corporate Android devices
AUTH_ANDROIDENTERPRISE = 'https://www.googleapis.com/auth/androidenterprise'
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,431 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AndroidenterpriseV1
class AppRestrictionsSchema
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AppRestrictionsSchemaRestriction
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AppRestrictionsSchemaRestrictionRestrictionValue
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AppVersion
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ApprovalUrlInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Collection
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListCollectionViewersResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListCollectionsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Device
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class DeviceState
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListDevicesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Enterprise
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class EnterpriseAccount
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListEnterprisesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Entitlement
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListEntitlementsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class GroupLicense
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListGroupLicenseUsersResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListGroupLicensesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Install
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListInstallsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Permission
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Product
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ProductPermission
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ProductPermissions
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ApproveProductRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class GenerateProductApprovalUrlResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class User
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserToken
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListUsersResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class AppRestrictionsSchema
class Representation < Google::Apis::Core::JsonRepresentation
collection :restrictions, as: 'restrictions', class: Google::Apis::AndroidenterpriseV1::AppRestrictionsSchemaRestriction, decorator: Google::Apis::AndroidenterpriseV1::AppRestrictionsSchemaRestriction::Representation
end
end
# @private
class AppRestrictionsSchemaRestriction
class Representation < Google::Apis::Core::JsonRepresentation
property :default_value, as: 'defaultValue', class: Google::Apis::AndroidenterpriseV1::AppRestrictionsSchemaRestrictionRestrictionValue, decorator: Google::Apis::AndroidenterpriseV1::AppRestrictionsSchemaRestrictionRestrictionValue::Representation
property :description, as: 'description'
collection :entry, as: 'entry'
collection :entry_value, as: 'entryValue'
property :key, as: 'key'
property :restriction_type, as: 'restrictionType'
property :title, as: 'title'
end
end
# @private
class AppRestrictionsSchemaRestrictionRestrictionValue
class Representation < Google::Apis::Core::JsonRepresentation
property :type, as: 'type'
property :value_bool, as: 'valueBool'
property :value_integer, as: 'valueInteger'
collection :value_multiselect, as: 'valueMultiselect'
property :value_string, as: 'valueString'
end
end
# @private
class AppVersion
class Representation < Google::Apis::Core::JsonRepresentation
property :version_code, as: 'versionCode'
property :version_string, as: 'versionString'
end
end
# @private
class ApprovalUrlInfo
class Representation < Google::Apis::Core::JsonRepresentation
property :approval_url, as: 'approvalUrl'
property :kind, as: 'kind'
end
end
# @private
class Collection
class Representation < Google::Apis::Core::JsonRepresentation
property :collection_id, as: 'collectionId'
property :kind, as: 'kind'
property :name, as: 'name'
collection :product_id, as: 'productId'
property :visibility, as: 'visibility'
end
end
# @private
class ListCollectionViewersResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
collection :user, as: 'user', class: Google::Apis::AndroidenterpriseV1::User, decorator: Google::Apis::AndroidenterpriseV1::User::Representation
end
end
# @private
class ListCollectionsResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :collection, as: 'collection', class: Google::Apis::AndroidenterpriseV1::Collection, decorator: Google::Apis::AndroidenterpriseV1::Collection::Representation
property :kind, as: 'kind'
end
end
# @private
class Device
class Representation < Google::Apis::Core::JsonRepresentation
property :android_id, as: 'androidId'
property :kind, as: 'kind'
property :management_type, as: 'managementType'
end
end
# @private
class DeviceState
class Representation < Google::Apis::Core::JsonRepresentation
property :account_state, as: 'accountState'
property :kind, as: 'kind'
end
end
# @private
class ListDevicesResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :device, as: 'device', class: Google::Apis::AndroidenterpriseV1::Device, decorator: Google::Apis::AndroidenterpriseV1::Device::Representation
property :kind, as: 'kind'
end
end
# @private
class Enterprise
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
property :primary_domain, as: 'primaryDomain'
end
end
# @private
class EnterpriseAccount
class Representation < Google::Apis::Core::JsonRepresentation
property :account_email, as: 'accountEmail'
property :kind, as: 'kind'
end
end
# @private
class ListEnterprisesResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :enterprise, as: 'enterprise', class: Google::Apis::AndroidenterpriseV1::Enterprise, decorator: Google::Apis::AndroidenterpriseV1::Enterprise::Representation
property :kind, as: 'kind'
end
end
# @private
class Entitlement
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
property :product_id, as: 'productId'
property :reason, as: 'reason'
end
end
# @private
class ListEntitlementsResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :entitlement, as: 'entitlement', class: Google::Apis::AndroidenterpriseV1::Entitlement, decorator: Google::Apis::AndroidenterpriseV1::Entitlement::Representation
property :kind, as: 'kind'
end
end
# @private
class GroupLicense
class Representation < Google::Apis::Core::JsonRepresentation
property :acquisition_kind, as: 'acquisitionKind'
property :approval, as: 'approval'
property :kind, as: 'kind'
property :num_provisioned, as: 'numProvisioned'
property :num_purchased, as: 'numPurchased'
property :product_id, as: 'productId'
end
end
# @private
class ListGroupLicenseUsersResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
collection :user, as: 'user', class: Google::Apis::AndroidenterpriseV1::User, decorator: Google::Apis::AndroidenterpriseV1::User::Representation
end
end
# @private
class ListGroupLicensesResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :group_license, as: 'groupLicense', class: Google::Apis::AndroidenterpriseV1::GroupLicense, decorator: Google::Apis::AndroidenterpriseV1::GroupLicense::Representation
property :kind, as: 'kind'
end
end
# @private
class Install
class Representation < Google::Apis::Core::JsonRepresentation
property :install_state, as: 'installState'
property :kind, as: 'kind'
property :product_id, as: 'productId'
property :version_code, as: 'versionCode'
end
end
# @private
class ListInstallsResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :install, as: 'install', class: Google::Apis::AndroidenterpriseV1::Install, decorator: Google::Apis::AndroidenterpriseV1::Install::Representation
property :kind, as: 'kind'
end
end
# @private
class Permission
class Representation < Google::Apis::Core::JsonRepresentation
property :description, as: 'description'
property :kind, as: 'kind'
property :name, as: 'name'
property :permission_id, as: 'permissionId'
end
end
# @private
class Product
class Representation < Google::Apis::Core::JsonRepresentation
collection :app_version, as: 'appVersion', class: Google::Apis::AndroidenterpriseV1::AppVersion, decorator: Google::Apis::AndroidenterpriseV1::AppVersion::Representation
property :author_name, as: 'authorName'
property :details_url, as: 'detailsUrl'
property :distribution_channel, as: 'distributionChannel'
property :icon_url, as: 'iconUrl'
property :kind, as: 'kind'
property :product_id, as: 'productId'
property :requires_container_app, as: 'requiresContainerApp'
property :title, as: 'title'
property :work_details_url, as: 'workDetailsUrl'
end
end
# @private
class ProductPermission
class Representation < Google::Apis::Core::JsonRepresentation
property :permission_id, as: 'permissionId'
property :state, as: 'state'
end
end
# @private
class ProductPermissions
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
collection :permission, as: 'permission', class: Google::Apis::AndroidenterpriseV1::ProductPermission, decorator: Google::Apis::AndroidenterpriseV1::ProductPermission::Representation
property :product_id, as: 'productId'
end
end
# @private
class ApproveProductRequest
class Representation < Google::Apis::Core::JsonRepresentation
property :approval_url_info, as: 'approvalUrlInfo', class: Google::Apis::AndroidenterpriseV1::ApprovalUrlInfo, decorator: Google::Apis::AndroidenterpriseV1::ApprovalUrlInfo::Representation
end
end
# @private
class GenerateProductApprovalUrlResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :url, as: 'url'
end
end
# @private
class User
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :kind, as: 'kind'
property :primary_email, as: 'primaryEmail'
end
end
# @private
class UserToken
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
property :token, as: 'token'
property :user_id, as: 'userId'
end
end
# @private
class ListUsersResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
collection :user, as: 'user', class: Google::Apis::AndroidenterpriseV1::User, decorator: Google::Apis::AndroidenterpriseV1::User::Representation
end
end
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,34 @@
# Copyright 2015 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.
require 'google/apis/androidpublisher_v2/service.rb'
require 'google/apis/androidpublisher_v2/classes.rb'
require 'google/apis/androidpublisher_v2/representations.rb'
module Google
module Apis
# Google Play Developer API
#
# Lets Android application developers access their Google Play accounts.
#
# @see https://developers.google.com/android-publisher
module AndroidpublisherV2
VERSION = 'V2'
REVISION = '20150316'
# View and manage your Google Play Developer account
AUTH_ANDROIDPUBLISHER = 'https://www.googleapis.com/auth/androidpublisher'
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,630 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AndroidpublisherV2
class Apk
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ApkBinary
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ApkListing
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListApkListingsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ApksAddExternallyHostedRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ApksAddExternallyHostedResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListApksResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AppDetails
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AppEdit
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Entitlement
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListEntitlementsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ExpansionFile
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UploadExpansionFilesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ExternallyHostedApk
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ExternallyHostedApkUsesPermission
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Image
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ImagesDeleteAllResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListImagesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UploadImagesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class InAppProduct
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class InAppProductListing
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class InAppProductsBatchRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class InAppProductsBatchRequestEntry
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class InAppProductsBatchResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class InAppProductsBatchResponseEntry
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class InsertInAppProductsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class InsertInAppProductsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListInAppProductsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UpdateInAppProductsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UpdateInAppProductsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Listing
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListListingsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class MonthDay
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PageInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Price
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ProductPurchase
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Season
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class SubscriptionDeferralInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class SubscriptionPurchase
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class DeferSubscriptionPurchasesRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class DeferSubscriptionPurchasesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Testers
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class TokenPagination
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Track
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListTracksResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class Apk
class Representation < Google::Apis::Core::JsonRepresentation
property :binary, as: 'binary', class: Google::Apis::AndroidpublisherV2::ApkBinary, decorator: Google::Apis::AndroidpublisherV2::ApkBinary::Representation
property :version_code, as: 'versionCode'
end
end
# @private
class ApkBinary
class Representation < Google::Apis::Core::JsonRepresentation
property :sha1, as: 'sha1'
end
end
# @private
class ApkListing
class Representation < Google::Apis::Core::JsonRepresentation
property :language, as: 'language'
property :recent_changes, as: 'recentChanges'
end
end
# @private
class ListApkListingsResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
collection :listings, as: 'listings', class: Google::Apis::AndroidpublisherV2::ApkListing, decorator: Google::Apis::AndroidpublisherV2::ApkListing::Representation
end
end
# @private
class ApksAddExternallyHostedRequest
class Representation < Google::Apis::Core::JsonRepresentation
property :externally_hosted_apk, as: 'externallyHostedApk', class: Google::Apis::AndroidpublisherV2::ExternallyHostedApk, decorator: Google::Apis::AndroidpublisherV2::ExternallyHostedApk::Representation
end
end
# @private
class ApksAddExternallyHostedResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :externally_hosted_apk, as: 'externallyHostedApk', class: Google::Apis::AndroidpublisherV2::ExternallyHostedApk, decorator: Google::Apis::AndroidpublisherV2::ExternallyHostedApk::Representation
end
end
# @private
class ListApksResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :apks, as: 'apks', class: Google::Apis::AndroidpublisherV2::Apk, decorator: Google::Apis::AndroidpublisherV2::Apk::Representation
property :kind, as: 'kind'
end
end
# @private
class AppDetails
class Representation < Google::Apis::Core::JsonRepresentation
property :contact_email, as: 'contactEmail'
property :contact_phone, as: 'contactPhone'
property :contact_website, as: 'contactWebsite'
property :default_language, as: 'defaultLanguage'
end
end
# @private
class AppEdit
class Representation < Google::Apis::Core::JsonRepresentation
property :expiry_time_seconds, as: 'expiryTimeSeconds'
property :id, as: 'id'
end
end
# @private
class Entitlement
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
property :product_id, as: 'productId'
property :product_type, as: 'productType'
property :token, as: 'token'
end
end
# @private
class ListEntitlementsResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :page_info, as: 'pageInfo', class: Google::Apis::AndroidpublisherV2::PageInfo, decorator: Google::Apis::AndroidpublisherV2::PageInfo::Representation
collection :resources, as: 'resources', class: Google::Apis::AndroidpublisherV2::Entitlement, decorator: Google::Apis::AndroidpublisherV2::Entitlement::Representation
property :token_pagination, as: 'tokenPagination', class: Google::Apis::AndroidpublisherV2::TokenPagination, decorator: Google::Apis::AndroidpublisherV2::TokenPagination::Representation
end
end
# @private
class ExpansionFile
class Representation < Google::Apis::Core::JsonRepresentation
property :file_size, as: 'fileSize'
property :references_version, as: 'referencesVersion'
end
end
# @private
class UploadExpansionFilesResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :expansion_file, as: 'expansionFile', class: Google::Apis::AndroidpublisherV2::ExpansionFile, decorator: Google::Apis::AndroidpublisherV2::ExpansionFile::Representation
end
end
# @private
class ExternallyHostedApk
class Representation < Google::Apis::Core::JsonRepresentation
property :application_label, as: 'applicationLabel'
collection :certificate_base64s, as: 'certificateBase64s'
property :externally_hosted_url, as: 'externallyHostedUrl'
property :file_sha1_base64, as: 'fileSha1Base64'
property :file_sha256_base64, as: 'fileSha256Base64'
property :file_size, as: 'fileSize'
property :icon_base64, as: 'iconBase64'
property :maximum_sdk, as: 'maximumSdk'
property :minimum_sdk, as: 'minimumSdk'
collection :native_codes, as: 'nativeCodes'
property :package_name, as: 'packageName'
collection :uses_features, as: 'usesFeatures'
collection :uses_permissions, as: 'usesPermissions', class: Google::Apis::AndroidpublisherV2::ExternallyHostedApkUsesPermission, decorator: Google::Apis::AndroidpublisherV2::ExternallyHostedApkUsesPermission::Representation
property :version_code, as: 'versionCode'
property :version_name, as: 'versionName'
end
end
# @private
class ExternallyHostedApkUsesPermission
class Representation < Google::Apis::Core::JsonRepresentation
property :max_sdk_version, as: 'maxSdkVersion'
property :name, as: 'name'
end
end
# @private
class Image
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :sha1, as: 'sha1'
property :url, as: 'url'
end
end
# @private
class ImagesDeleteAllResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :deleted, as: 'deleted', class: Google::Apis::AndroidpublisherV2::Image, decorator: Google::Apis::AndroidpublisherV2::Image::Representation
end
end
# @private
class ListImagesResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :images, as: 'images', class: Google::Apis::AndroidpublisherV2::Image, decorator: Google::Apis::AndroidpublisherV2::Image::Representation
end
end
# @private
class UploadImagesResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :image, as: 'image', class: Google::Apis::AndroidpublisherV2::Image, decorator: Google::Apis::AndroidpublisherV2::Image::Representation
end
end
# @private
class InAppProduct
class Representation < Google::Apis::Core::JsonRepresentation
property :default_language, as: 'defaultLanguage'
property :default_price, as: 'defaultPrice', class: Google::Apis::AndroidpublisherV2::Price, decorator: Google::Apis::AndroidpublisherV2::Price::Representation
hash :listings, as: 'listings', class: Google::Apis::AndroidpublisherV2::InAppProductListing, decorator: Google::Apis::AndroidpublisherV2::InAppProductListing::Representation
property :package_name, as: 'packageName'
hash :prices, as: 'prices', class: Google::Apis::AndroidpublisherV2::Price, decorator: Google::Apis::AndroidpublisherV2::Price::Representation
property :purchase_type, as: 'purchaseType'
property :season, as: 'season', class: Google::Apis::AndroidpublisherV2::Season, decorator: Google::Apis::AndroidpublisherV2::Season::Representation
property :sku, as: 'sku'
property :status, as: 'status'
property :subscription_period, as: 'subscriptionPeriod'
property :trial_period, as: 'trialPeriod'
end
end
# @private
class InAppProductListing
class Representation < Google::Apis::Core::JsonRepresentation
property :description, as: 'description'
property :title, as: 'title'
end
end
# @private
class InAppProductsBatchRequest
class Representation < Google::Apis::Core::JsonRepresentation
collection :entrys, as: 'entrys', class: Google::Apis::AndroidpublisherV2::InAppProductsBatchRequestEntry, decorator: Google::Apis::AndroidpublisherV2::InAppProductsBatchRequestEntry::Representation
end
end
# @private
class InAppProductsBatchRequestEntry
class Representation < Google::Apis::Core::JsonRepresentation
property :batch_id, as: 'batchId'
property :inappproductsinsertrequest, as: 'inappproductsinsertrequest', class: Google::Apis::AndroidpublisherV2::InsertInAppProductsRequest, decorator: Google::Apis::AndroidpublisherV2::InsertInAppProductsRequest::Representation
property :inappproductsupdaterequest, as: 'inappproductsupdaterequest', class: Google::Apis::AndroidpublisherV2::UpdateInAppProductsRequest, decorator: Google::Apis::AndroidpublisherV2::UpdateInAppProductsRequest::Representation
property :method_name, as: 'methodName'
end
end
# @private
class InAppProductsBatchResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :entrys, as: 'entrys', class: Google::Apis::AndroidpublisherV2::InAppProductsBatchResponseEntry, decorator: Google::Apis::AndroidpublisherV2::InAppProductsBatchResponseEntry::Representation
property :kind, as: 'kind'
end
end
# @private
class InAppProductsBatchResponseEntry
class Representation < Google::Apis::Core::JsonRepresentation
property :batch_id, as: 'batchId'
property :inappproductsinsertresponse, as: 'inappproductsinsertresponse', class: Google::Apis::AndroidpublisherV2::InsertInAppProductsResponse, decorator: Google::Apis::AndroidpublisherV2::InsertInAppProductsResponse::Representation
property :inappproductsupdateresponse, as: 'inappproductsupdateresponse', class: Google::Apis::AndroidpublisherV2::UpdateInAppProductsResponse, decorator: Google::Apis::AndroidpublisherV2::UpdateInAppProductsResponse::Representation
end
end
# @private
class InsertInAppProductsRequest
class Representation < Google::Apis::Core::JsonRepresentation
property :inappproduct, as: 'inappproduct', class: Google::Apis::AndroidpublisherV2::InAppProduct, decorator: Google::Apis::AndroidpublisherV2::InAppProduct::Representation
end
end
# @private
class InsertInAppProductsResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :inappproduct, as: 'inappproduct', class: Google::Apis::AndroidpublisherV2::InAppProduct, decorator: Google::Apis::AndroidpublisherV2::InAppProduct::Representation
end
end
# @private
class ListInAppProductsResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :inappproduct, as: 'inappproduct', class: Google::Apis::AndroidpublisherV2::InAppProduct, decorator: Google::Apis::AndroidpublisherV2::InAppProduct::Representation
property :kind, as: 'kind'
property :page_info, as: 'pageInfo', class: Google::Apis::AndroidpublisherV2::PageInfo, decorator: Google::Apis::AndroidpublisherV2::PageInfo::Representation
property :token_pagination, as: 'tokenPagination', class: Google::Apis::AndroidpublisherV2::TokenPagination, decorator: Google::Apis::AndroidpublisherV2::TokenPagination::Representation
end
end
# @private
class UpdateInAppProductsRequest
class Representation < Google::Apis::Core::JsonRepresentation
property :inappproduct, as: 'inappproduct', class: Google::Apis::AndroidpublisherV2::InAppProduct, decorator: Google::Apis::AndroidpublisherV2::InAppProduct::Representation
end
end
# @private
class UpdateInAppProductsResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :inappproduct, as: 'inappproduct', class: Google::Apis::AndroidpublisherV2::InAppProduct, decorator: Google::Apis::AndroidpublisherV2::InAppProduct::Representation
end
end
# @private
class Listing
class Representation < Google::Apis::Core::JsonRepresentation
property :full_description, as: 'fullDescription'
property :language, as: 'language'
property :short_description, as: 'shortDescription'
property :title, as: 'title'
property :video, as: 'video'
end
end
# @private
class ListListingsResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
collection :listings, as: 'listings', class: Google::Apis::AndroidpublisherV2::Listing, decorator: Google::Apis::AndroidpublisherV2::Listing::Representation
end
end
# @private
class MonthDay
class Representation < Google::Apis::Core::JsonRepresentation
property :day, as: 'day'
property :month, as: 'month'
end
end
# @private
class PageInfo
class Representation < Google::Apis::Core::JsonRepresentation
property :result_per_page, as: 'resultPerPage'
property :start_index, as: 'startIndex'
property :total_results, as: 'totalResults'
end
end
# @private
class Price
class Representation < Google::Apis::Core::JsonRepresentation
property :currency, as: 'currency'
property :price_micros, as: 'priceMicros'
end
end
# @private
class ProductPurchase
class Representation < Google::Apis::Core::JsonRepresentation
property :consumption_state, as: 'consumptionState'
property :developer_payload, as: 'developerPayload'
property :kind, as: 'kind'
property :purchase_state, as: 'purchaseState'
property :purchase_time_millis, as: 'purchaseTimeMillis'
end
end
# @private
class Season
class Representation < Google::Apis::Core::JsonRepresentation
property :end, as: 'end', class: Google::Apis::AndroidpublisherV2::MonthDay, decorator: Google::Apis::AndroidpublisherV2::MonthDay::Representation
property :start, as: 'start', class: Google::Apis::AndroidpublisherV2::MonthDay, decorator: Google::Apis::AndroidpublisherV2::MonthDay::Representation
end
end
# @private
class SubscriptionDeferralInfo
class Representation < Google::Apis::Core::JsonRepresentation
property :desired_expiry_time_millis, as: 'desiredExpiryTimeMillis'
property :expected_expiry_time_millis, as: 'expectedExpiryTimeMillis'
end
end
# @private
class SubscriptionPurchase
class Representation < Google::Apis::Core::JsonRepresentation
property :auto_renewing, as: 'autoRenewing'
property :expiry_time_millis, as: 'expiryTimeMillis'
property :kind, as: 'kind'
property :start_time_millis, as: 'startTimeMillis'
end
end
# @private
class DeferSubscriptionPurchasesRequest
class Representation < Google::Apis::Core::JsonRepresentation
property :deferral_info, as: 'deferralInfo', class: Google::Apis::AndroidpublisherV2::SubscriptionDeferralInfo, decorator: Google::Apis::AndroidpublisherV2::SubscriptionDeferralInfo::Representation
end
end
# @private
class DeferSubscriptionPurchasesResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :new_expiry_time_millis, as: 'newExpiryTimeMillis'
end
end
# @private
class Testers
class Representation < Google::Apis::Core::JsonRepresentation
collection :google_groups, as: 'googleGroups'
collection :google_plus_communities, as: 'googlePlusCommunities'
end
end
# @private
class TokenPagination
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
property :previous_page_token, as: 'previousPageToken'
end
end
# @private
class Track
class Representation < Google::Apis::Core::JsonRepresentation
property :track, as: 'track'
property :user_fraction, as: 'userFraction'
collection :version_codes, as: 'versionCodes'
end
end
# @private
class ListTracksResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
collection :tracks, as: 'tracks', class: Google::Apis::AndroidpublisherV2::Track, decorator: Google::Apis::AndroidpublisherV2::Track::Representation
end
end
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,46 @@
# Copyright 2015 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.
require 'google/apis/appsactivity_v1/service.rb'
require 'google/apis/appsactivity_v1/classes.rb'
require 'google/apis/appsactivity_v1/representations.rb'
module Google
module Apis
# Google Apps Activity API
#
# Provides a historical view of activity.
#
# @see https://developers.google.com/google-apps/activity/
module AppsactivityV1
VERSION = 'V1'
REVISION = '20150326'
# View the activity history of your Google Apps
AUTH_ACTIVITY = 'https://www.googleapis.com/auth/activity'
# View and manage the files in your Google Drive
AUTH_DRIVE = 'https://www.googleapis.com/auth/drive'
# View and manage metadata of files in your Google Drive
AUTH_DRIVE_METADATA = 'https://www.googleapis.com/auth/drive.metadata'
# View metadata for files in your Google Drive
AUTH_DRIVE_METADATA_READONLY = 'https://www.googleapis.com/auth/drive.metadata.readonly'
# View the files in your Google Drive
AUTH_DRIVE_READONLY = 'https://www.googleapis.com/auth/drive.readonly'
end
end
end

View File

@ -0,0 +1,392 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AppsactivityV1
# An Activity resource is a combined view of multiple events. An activity has a
# list of individual events and a combined view of the common fields among all
# events.
class Activity
include Google::Apis::Core::Hashable
# Represents the changes associated with an action taken by a user.
# Corresponds to the JSON property `combinedEvent`
# @return [Google::Apis::AppsactivityV1::Event]
attr_accessor :combined_event
# A list of all the Events that make up the Activity.
# Corresponds to the JSON property `singleEvents`
# @return [Array<Google::Apis::AppsactivityV1::Event>]
attr_accessor :single_events
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@combined_event = args[:combined_event] unless args[:combined_event].nil?
@single_events = args[:single_events] unless args[:single_events].nil?
end
end
# Represents the changes associated with an action taken by a user.
class Event
include Google::Apis::Core::Hashable
# Additional event types. Some events may have multiple types when multiple
# actions are part of a single event. For example, creating a document, renaming
# it, and sharing it may be part of a single file-creation event.
# Corresponds to the JSON property `additionalEventTypes`
# @return [Array<String>]
attr_accessor :additional_event_types
# The time at which the event occurred formatted as Unix time in milliseconds.
# Corresponds to the JSON property `eventTimeMillis`
# @return [String]
attr_accessor :event_time_millis
# Whether this event is caused by a user being deleted.
# Corresponds to the JSON property `fromUserDeletion`
# @return [Boolean]
attr_accessor :from_user_deletion
alias_method :from_user_deletion?, :from_user_deletion
# Contains information about changes in an object's parents as a result of a
# move type event.
# Corresponds to the JSON property `move`
# @return [Google::Apis::AppsactivityV1::Move]
attr_accessor :move
# Extra information for permissionChange type events, such as the user or group
# the new permission applies to.
# Corresponds to the JSON property `permissionChanges`
# @return [Array<Google::Apis::AppsactivityV1::PermissionChange>]
attr_accessor :permission_changes
# The main type of event that occurred.
# Corresponds to the JSON property `primaryEventType`
# @return [String]
attr_accessor :primary_event_type
# Contains information about a renametype event.
# Corresponds to the JSON property `rename`
# @return [Google::Apis::AppsactivityV1::Rename]
attr_accessor :rename
# Information about the object modified by the event.
# Corresponds to the JSON property `target`
# @return [Google::Apis::AppsactivityV1::Target]
attr_accessor :target
# A representation of a user.
# Corresponds to the JSON property `user`
# @return [Google::Apis::AppsactivityV1::User]
attr_accessor :user
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@additional_event_types = args[:additional_event_types] unless args[:additional_event_types].nil?
@event_time_millis = args[:event_time_millis] unless args[:event_time_millis].nil?
@from_user_deletion = args[:from_user_deletion] unless args[:from_user_deletion].nil?
@move = args[:move] unless args[:move].nil?
@permission_changes = args[:permission_changes] unless args[:permission_changes].nil?
@primary_event_type = args[:primary_event_type] unless args[:primary_event_type].nil?
@rename = args[:rename] unless args[:rename].nil?
@target = args[:target] unless args[:target].nil?
@user = args[:user] unless args[:user].nil?
end
end
# The response from the list request. Contains a list of activities and a token
# to retrieve the next page of results.
class ListActivitiesResponse
include Google::Apis::Core::Hashable
# List of activities.
# Corresponds to the JSON property `activities`
# @return [Array<Google::Apis::AppsactivityV1::Activity>]
attr_accessor :activities
# Token for the next page of results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@activities = args[:activities] unless args[:activities].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
# Contains information about changes in an object's parents as a result of a
# move type event.
class Move
include Google::Apis::Core::Hashable
# The added parent(s).
# Corresponds to the JSON property `addedParents`
# @return [Array<Google::Apis::AppsactivityV1::Parent>]
attr_accessor :added_parents
# The removed parent(s).
# Corresponds to the JSON property `removedParents`
# @return [Array<Google::Apis::AppsactivityV1::Parent>]
attr_accessor :removed_parents
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@added_parents = args[:added_parents] unless args[:added_parents].nil?
@removed_parents = args[:removed_parents] unless args[:removed_parents].nil?
end
end
# Contains information about a parent object. For example, a folder in Drive is
# a parent for all files within it.
class Parent
include Google::Apis::Core::Hashable
# The parent's ID.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Whether this is the root folder.
# Corresponds to the JSON property `isRoot`
# @return [Boolean]
attr_accessor :is_root
alias_method :is_root?, :is_root
# The parent's title.
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] unless args[:id].nil?
@is_root = args[:is_root] unless args[:is_root].nil?
@title = args[:title] unless args[:title].nil?
end
end
# Contains information about the permissions and type of access allowed with
# regards to a Google Drive object. This is a subset of the fields contained in
# a corresponding Drive Permissions object.
class Permission
include Google::Apis::Core::Hashable
# The name of the user or group the permission applies to.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The ID for this permission. Corresponds to the Drive API's permission ID
# returned as part of the Drive Permissions resource.
# Corresponds to the JSON property `permissionId`
# @return [String]
attr_accessor :permission_id
# Indicates the Google Drive permissions role. The role determines a user's
# ability to read, write, or comment on the file.
# Corresponds to the JSON property `role`
# @return [String]
attr_accessor :role
# Indicates how widely permissions are granted.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
# A representation of a user.
# Corresponds to the JSON property `user`
# @return [Google::Apis::AppsactivityV1::User]
attr_accessor :user
# Whether the permission requires a link to the file.
# Corresponds to the JSON property `withLink`
# @return [Boolean]
attr_accessor :with_link
alias_method :with_link?, :with_link
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] unless args[:name].nil?
@permission_id = args[:permission_id] unless args[:permission_id].nil?
@role = args[:role] unless args[:role].nil?
@type = args[:type] unless args[:type].nil?
@user = args[:user] unless args[:user].nil?
@with_link = args[:with_link] unless args[:with_link].nil?
end
end
# Contains information about a Drive object's permissions that changed as a
# result of a permissionChange type event.
class PermissionChange
include Google::Apis::Core::Hashable
# Lists all Permission objects added.
# Corresponds to the JSON property `addedPermissions`
# @return [Array<Google::Apis::AppsactivityV1::Permission>]
attr_accessor :added_permissions
# Lists all Permission objects removed.
# Corresponds to the JSON property `removedPermissions`
# @return [Array<Google::Apis::AppsactivityV1::Permission>]
attr_accessor :removed_permissions
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@added_permissions = args[:added_permissions] unless args[:added_permissions].nil?
@removed_permissions = args[:removed_permissions] unless args[:removed_permissions].nil?
end
end
# Photo information for a user.
class Photo
include Google::Apis::Core::Hashable
# The URL of the photo.
# Corresponds to the JSON property `url`
# @return [String]
attr_accessor :url
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@url = args[:url] unless args[:url].nil?
end
end
# Contains information about a renametype event.
class Rename
include Google::Apis::Core::Hashable
# The new title.
# Corresponds to the JSON property `newTitle`
# @return [String]
attr_accessor :new_title
# The old title.
# Corresponds to the JSON property `oldTitle`
# @return [String]
attr_accessor :old_title
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@new_title = args[:new_title] unless args[:new_title].nil?
@old_title = args[:old_title] unless args[:old_title].nil?
end
end
# Information about the object modified by the event.
class Target
include Google::Apis::Core::Hashable
# The ID of the target. For example, in Google Drive, this is the file or folder
# ID.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# The MIME type of the target.
# Corresponds to the JSON property `mimeType`
# @return [String]
attr_accessor :mime_type
# The name of the target. For example, in Google Drive, this is the title of the
# file.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] unless args[:id].nil?
@mime_type = args[:mime_type] unless args[:mime_type].nil?
@name = args[:name] unless args[:name].nil?
end
end
# A representation of a user.
class User
include Google::Apis::Core::Hashable
# The displayable name of the user.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Photo information for a user.
# Corresponds to the JSON property `photo`
# @return [Google::Apis::AppsactivityV1::Photo]
attr_accessor :photo
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] unless args[:name].nil?
@photo = args[:photo] unless args[:photo].nil?
end
end
end
end
end

View File

@ -0,0 +1,184 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AppsactivityV1
class Activity
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Event
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListActivitiesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Move
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Parent
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Permission
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PermissionChange
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Photo
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Rename
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Target
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class User
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class Activity
class Representation < Google::Apis::Core::JsonRepresentation
property :combined_event, as: 'combinedEvent', class: Google::Apis::AppsactivityV1::Event, decorator: Google::Apis::AppsactivityV1::Event::Representation
collection :single_events, as: 'singleEvents', class: Google::Apis::AppsactivityV1::Event, decorator: Google::Apis::AppsactivityV1::Event::Representation
end
end
# @private
class Event
class Representation < Google::Apis::Core::JsonRepresentation
collection :additional_event_types, as: 'additionalEventTypes'
property :event_time_millis, as: 'eventTimeMillis'
property :from_user_deletion, as: 'fromUserDeletion'
property :move, as: 'move', class: Google::Apis::AppsactivityV1::Move, decorator: Google::Apis::AppsactivityV1::Move::Representation
collection :permission_changes, as: 'permissionChanges', class: Google::Apis::AppsactivityV1::PermissionChange, decorator: Google::Apis::AppsactivityV1::PermissionChange::Representation
property :primary_event_type, as: 'primaryEventType'
property :rename, as: 'rename', class: Google::Apis::AppsactivityV1::Rename, decorator: Google::Apis::AppsactivityV1::Rename::Representation
property :target, as: 'target', class: Google::Apis::AppsactivityV1::Target, decorator: Google::Apis::AppsactivityV1::Target::Representation
property :user, as: 'user', class: Google::Apis::AppsactivityV1::User, decorator: Google::Apis::AppsactivityV1::User::Representation
end
end
# @private
class ListActivitiesResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :activities, as: 'activities', class: Google::Apis::AppsactivityV1::Activity, decorator: Google::Apis::AppsactivityV1::Activity::Representation
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class Move
class Representation < Google::Apis::Core::JsonRepresentation
collection :added_parents, as: 'addedParents', class: Google::Apis::AppsactivityV1::Parent, decorator: Google::Apis::AppsactivityV1::Parent::Representation
collection :removed_parents, as: 'removedParents', class: Google::Apis::AppsactivityV1::Parent, decorator: Google::Apis::AppsactivityV1::Parent::Representation
end
end
# @private
class Parent
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :is_root, as: 'isRoot'
property :title, as: 'title'
end
end
# @private
class Permission
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :permission_id, as: 'permissionId'
property :role, as: 'role'
property :type, as: 'type'
property :user, as: 'user', class: Google::Apis::AppsactivityV1::User, decorator: Google::Apis::AppsactivityV1::User::Representation
property :with_link, as: 'withLink'
end
end
# @private
class PermissionChange
class Representation < Google::Apis::Core::JsonRepresentation
collection :added_permissions, as: 'addedPermissions', class: Google::Apis::AppsactivityV1::Permission, decorator: Google::Apis::AppsactivityV1::Permission::Representation
collection :removed_permissions, as: 'removedPermissions', class: Google::Apis::AppsactivityV1::Permission, decorator: Google::Apis::AppsactivityV1::Permission::Representation
end
end
# @private
class Photo
class Representation < Google::Apis::Core::JsonRepresentation
property :url, as: 'url'
end
end
# @private
class Rename
class Representation < Google::Apis::Core::JsonRepresentation
property :new_title, as: 'newTitle'
property :old_title, as: 'oldTitle'
end
end
# @private
class Target
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :mime_type, as: 'mimeType'
property :name, as: 'name'
end
end
# @private
class User
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :photo, as: 'photo', class: Google::Apis::AppsactivityV1::Photo, decorator: Google::Apis::AppsactivityV1::Photo::Representation
end
end
end
end
end

View File

@ -0,0 +1,129 @@
# Copyright 2015 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.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AppsactivityV1
# Google Apps Activity API
#
# Provides a historical view of activity.
#
# @example
# require 'google/apis/appsactivity_v1'
#
# Appsactivity = Google::Apis::AppsactivityV1 # Alias the module
# service = Appsactivity::AppsactivityService.new
#
# @see https://developers.google.com/google-apps/activity/
class AppsactivityService < Google::Apis::Core::BaseService
# @return [String]
# 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.
attr_accessor :key
# @return [String]
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
attr_accessor :quota_user
# @return [String]
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
attr_accessor :user_ip
def initialize
super('https://www.googleapis.com/', 'appsactivity/v1/')
end
# Returns a list of activities visible to the current logged in user. Visible
# activities are determined by the visiblity settings of the object that was
# acted on, e.g. Drive files a user can see. An activity is a record of past
# events. Multiple events may be merged if they are similar. A request is scoped
# to activities from a given Google service using the source parameter.
# @param [String] drive_ancestor_id
# Identifies the Drive folder containing the items for which to return
# activities.
# @param [String] drive_file_id
# Identifies the Drive item to return activities for.
# @param [String] grouping_strategy
# Indicates the strategy to use when grouping singleEvents items in the
# associated combinedEvent object.
# @param [Fixnum] page_size
# The maximum number of events to return on a page. The response includes a
# continuation token if there are more events.
# @param [String] page_token
# A token to retrieve a specific page of results.
# @param [String] source
# The Google service from which to return activities. Possible values of source
# are:
# - drive.google.com
# @param [String] user_id
# Indicates the user to return activity for. Use the special value me to
# indicate the currently authenticated user.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AppsactivityV1::ListActivitiesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AppsactivityV1::ListActivitiesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_activities(drive_ancestor_id: nil, drive_file_id: nil, grouping_strategy: nil, page_size: nil, page_token: nil, source: nil, user_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'activities'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AppsactivityV1::ListActivitiesResponse::Representation
command.response_class = Google::Apis::AppsactivityV1::ListActivitiesResponse
command.query['drive.ancestorId'] = drive_ancestor_id unless drive_ancestor_id.nil?
command.query['drive.fileId'] = drive_file_id unless drive_file_id.nil?
command.query['groupingStrategy'] = grouping_strategy unless grouping_strategy.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['source'] = source unless source.nil?
command.query['userId'] = user_id unless user_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
protected
def apply_command_defaults(command)
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
end
end
end
end
end

View File

@ -0,0 +1,34 @@
# Copyright 2015 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.
require 'google/apis/appstate_v1/service.rb'
require 'google/apis/appstate_v1/classes.rb'
require 'google/apis/appstate_v1/representations.rb'
module Google
module Apis
# Google App State API
#
# The Google App State API.
#
# @see https://developers.google.com/games/services/web/api/states
module AppstateV1
VERSION = 'V1'
REVISION = '20150527'
# View and manage your data for this application
AUTH_APPSTATE = 'https://www.googleapis.com/auth/appstate'
end
end
end

View File

@ -0,0 +1,154 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AppstateV1
# This is a JSON template for an app state resource.
class GetResponse
include Google::Apis::Core::Hashable
# The current app state version.
# Corresponds to the JSON property `currentStateVersion`
# @return [String]
attr_accessor :current_state_version
# The requested data.
# Corresponds to the JSON property `data`
# @return [String]
attr_accessor :data
# Uniquely identifies the type of this resource. Value is always the fixed
# string appstate#getResponse.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The key for the data.
# Corresponds to the JSON property `stateKey`
# @return [Fixnum]
attr_accessor :state_key
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@current_state_version = args[:current_state_version] unless args[:current_state_version].nil?
@data = args[:data] unless args[:data].nil?
@kind = args[:kind] unless args[:kind].nil?
@state_key = args[:state_key] unless args[:state_key].nil?
end
end
# This is a JSON template to convert a list-response for app state.
class ListResponse
include Google::Apis::Core::Hashable
# The app state data.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AppstateV1::GetResponse>]
attr_accessor :items
# Uniquely identifies the type of this resource. Value is always the fixed
# string appstate#listResponse.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The maximum number of keys allowed for this user.
# Corresponds to the JSON property `maximumKeyCount`
# @return [Fixnum]
attr_accessor :maximum_key_count
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@maximum_key_count = args[:maximum_key_count] unless args[:maximum_key_count].nil?
end
end
# This is a JSON template for a requests which update app state
class UpdateRequest
include Google::Apis::Core::Hashable
# The new app state data that your application is trying to update with.
# Corresponds to the JSON property `data`
# @return [String]
attr_accessor :data
# Uniquely identifies the type of this resource. Value is always the fixed
# string appstate#updateRequest.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@data = args[:data] unless args[:data].nil?
@kind = args[:kind] unless args[:kind].nil?
end
end
# This is a JSON template for an app state write result.
class WriteResult
include Google::Apis::Core::Hashable
# The version of the data for this key on the server.
# Corresponds to the JSON property `currentStateVersion`
# @return [String]
attr_accessor :current_state_version
# Uniquely identifies the type of this resource. Value is always the fixed
# string appstate#writeResult.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The written key.
# Corresponds to the JSON property `stateKey`
# @return [Fixnum]
attr_accessor :state_key
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@current_state_version = args[:current_state_version] unless args[:current_state_version].nil?
@kind = args[:kind] unless args[:kind].nil?
@state_key = args[:state_key] unless args[:state_key].nil?
end
end
end
end
end

View File

@ -0,0 +1,79 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AppstateV1
class GetResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UpdateRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class WriteResult
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class GetResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :current_state_version, as: 'currentStateVersion'
property :data, as: 'data'
property :kind, as: 'kind'
property :state_key, as: 'stateKey'
end
end
# @private
class ListResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::AppstateV1::GetResponse, decorator: Google::Apis::AppstateV1::GetResponse::Representation
property :kind, as: 'kind'
property :maximum_key_count, as: 'maximumKeyCount'
end
end
# @private
class UpdateRequest
class Representation < Google::Apis::Core::JsonRepresentation
property :data, as: 'data'
property :kind, as: 'kind'
end
end
# @private
class WriteResult
class Representation < Google::Apis::Core::JsonRepresentation
property :current_state_version, as: 'currentStateVersion'
property :kind, as: 'kind'
property :state_key, as: 'stateKey'
end
end
end
end
end

View File

@ -0,0 +1,265 @@
# Copyright 2015 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.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AppstateV1
# Google App State API
#
# The Google App State API.
#
# @example
# require 'google/apis/appstate_v1'
#
# Appstate = Google::Apis::AppstateV1 # Alias the module
# service = Appstate::AppStateService.new
#
# @see https://developers.google.com/games/services/web/api/states
class AppStateService < Google::Apis::Core::BaseService
# @return [String]
# 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.
attr_accessor :key
# @return [String]
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
attr_accessor :quota_user
# @return [String]
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
attr_accessor :user_ip
def initialize
super('https://www.googleapis.com/', 'appstate/v1/')
end
# Clears (sets to empty) the data for the passed key if and only if the passed
# version matches the currently stored version. This method results in a
# conflict error on version mismatch.
# @param [Fixnum] state_key
# The key for the data to be retrieved.
# @param [String] current_data_version
# The version of the data to be cleared. Version strings are returned by the
# server.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AppstateV1::WriteResult] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AppstateV1::WriteResult]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def clear_state(state_key, current_data_version: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'states/{stateKey}/clear'
command = make_simple_command(:post, path, options)
command.response_representation = Google::Apis::AppstateV1::WriteResult::Representation
command.response_class = Google::Apis::AppstateV1::WriteResult
command.params['stateKey'] = state_key unless state_key.nil?
command.query['currentDataVersion'] = current_data_version unless current_data_version.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Deletes a key and the data associated with it. The key is removed and no
# longer counts against the key quota. Note that since this method is not safe
# in the face of concurrent modifications, it should only be used for
# development and testing purposes. Invoking this method in shipping code can
# result in data loss and data corruption.
# @param [Fixnum] state_key
# The key for the data to be retrieved.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_state(state_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'states/{stateKey}'
command = make_simple_command(:delete, path, options)
command.params['stateKey'] = state_key unless state_key.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Retrieves the data corresponding to the passed key. If the key does not exist
# on the server, an HTTP 404 will be returned.
# @param [Fixnum] state_key
# The key for the data to be retrieved.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AppstateV1::GetResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AppstateV1::GetResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_state(state_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'states/{stateKey}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AppstateV1::GetResponse::Representation
command.response_class = Google::Apis::AppstateV1::GetResponse
command.params['stateKey'] = state_key unless state_key.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Lists all the states keys, and optionally the state data.
# @param [Boolean] include_data
# Whether to include the full data in addition to the version number
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AppstateV1::ListResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AppstateV1::ListResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_states(include_data: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'states'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AppstateV1::ListResponse::Representation
command.response_class = Google::Apis::AppstateV1::ListResponse
command.query['includeData'] = include_data unless include_data.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Update the data associated with the input key if and only if the passed
# version matches the currently stored version. This method is safe in the face
# of concurrent writes. Maximum per-key size is 128KB.
# @param [Fixnum] state_key
# The key for the data to be retrieved.
# @param [Google::Apis::AppstateV1::UpdateRequest] update_request_object
# @param [String] current_state_version
# The version of the app state your application is attempting to update. If this
# does not match the current version, this method will return a conflict error.
# If there is no data stored on the server for this key, the update will succeed
# irrespective of the value of this parameter.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AppstateV1::WriteResult] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AppstateV1::WriteResult]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update(state_key, update_request_object = nil, current_state_version: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'states/{stateKey}'
command = make_simple_command(:put, path, options)
command.request_representation = Google::Apis::AppstateV1::UpdateRequest::Representation
command.request_object = update_request_object
command.response_representation = Google::Apis::AppstateV1::WriteResult::Representation
command.response_class = Google::Apis::AppstateV1::WriteResult
command.params['stateKey'] = state_key unless state_key.nil?
command.query['currentStateVersion'] = current_state_version unless current_state_version.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
protected
def apply_command_defaults(command)
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
end
end
end
end
end

View File

@ -0,0 +1,38 @@
# Copyright 2015 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.
require 'google/apis/autoscaler_v1beta2/service.rb'
require 'google/apis/autoscaler_v1beta2/classes.rb'
require 'google/apis/autoscaler_v1beta2/representations.rb'
module Google
module Apis
# Google Compute Engine Autoscaler API
#
# The Google Compute Engine Autoscaler API provides autoscaling for groups of
# Cloud VMs.
#
# @see http://developers.google.com/compute/docs/autoscaler
module AutoscalerV1beta2
VERSION = 'V1beta2'
REVISION = '20150213'
# View and manage your Google Compute Engine resources
AUTH_COMPUTE = 'https://www.googleapis.com/auth/compute'
# View your Google Compute Engine resources
AUTH_COMPUTE_READONLY = 'https://www.googleapis.com/auth/compute.readonly'
end
end
end

View File

@ -0,0 +1,747 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AutoscalerV1beta2
# Cloud Autoscaler resource.
class Autoscaler
include Google::Apis::Core::Hashable
# Cloud Autoscaler policy.
# Corresponds to the JSON property `autoscalingPolicy`
# @return [Google::Apis::AutoscalerV1beta2::AutoscalingPolicy]
attr_accessor :autoscaling_policy
# [Output Only] Creation timestamp in RFC3339 text format.
# Corresponds to the JSON property `creationTimestamp`
# @return [String]
attr_accessor :creation_timestamp
# An optional textual description of the resource provided by the client.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# [Output Only] Unique identifier for the resource; defined by the server.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Type of resource.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Name of the Autoscaler resource. Must be unique per project and zone.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# [Output Only] A self-link to the Autoscaler configuration resource.
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
# URL to the entity which will be autoscaled. Currently the only supported value
# is ReplicaPool?s URL. Note: it is illegal to specify multiple Autoscalers for
# the same target.
# Corresponds to the JSON property `target`
# @return [String]
attr_accessor :target
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@autoscaling_policy = args[:autoscaling_policy] unless args[:autoscaling_policy].nil?
@creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil?
@description = args[:description] unless args[:description].nil?
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@name = args[:name] unless args[:name].nil?
@self_link = args[:self_link] unless args[:self_link].nil?
@target = args[:target] unless args[:target].nil?
end
end
#
class ListAutoscalerResponse
include Google::Apis::Core::Hashable
# Autoscaler resources.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AutoscalerV1beta2::Autoscaler>]
attr_accessor :items
# Type of resource.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# [Output only] A token used to continue a truncated list request.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
# Cloud Autoscaler policy.
class AutoscalingPolicy
include Google::Apis::Core::Hashable
# The number of seconds that the Autoscaler should wait between two succeeding
# changes to the number of virtual machines. You should define an interval that
# is at least as long as the initialization time of a virtual machine and the
# time it may take for replica pool to create the virtual machine. The default
# is 60 seconds.
# Corresponds to the JSON property `coolDownPeriodSec`
# @return [Fixnum]
attr_accessor :cool_down_period_sec
# CPU utilization policy.
# Corresponds to the JSON property `cpuUtilization`
# @return [Google::Apis::AutoscalerV1beta2::AutoscalingPolicyCpuUtilization]
attr_accessor :cpu_utilization
# Configuration parameters of autoscaling based on custom metric.
# Corresponds to the JSON property `customMetricUtilizations`
# @return [Array<Google::Apis::AutoscalerV1beta2::AutoscalingPolicyCustomMetricUtilization>]
attr_accessor :custom_metric_utilizations
# Load balancing utilization policy.
# Corresponds to the JSON property `loadBalancingUtilization`
# @return [Google::Apis::AutoscalerV1beta2::AutoscalingPolicyLoadBalancingUtilization]
attr_accessor :load_balancing_utilization
# The maximum number of replicas that the Autoscaler can scale up to.
# Corresponds to the JSON property `maxNumReplicas`
# @return [Fixnum]
attr_accessor :max_num_replicas
# The minimum number of replicas that the Autoscaler can scale down to.
# Corresponds to the JSON property `minNumReplicas`
# @return [Fixnum]
attr_accessor :min_num_replicas
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@cool_down_period_sec = args[:cool_down_period_sec] unless args[:cool_down_period_sec].nil?
@cpu_utilization = args[:cpu_utilization] unless args[:cpu_utilization].nil?
@custom_metric_utilizations = args[:custom_metric_utilizations] unless args[:custom_metric_utilizations].nil?
@load_balancing_utilization = args[:load_balancing_utilization] unless args[:load_balancing_utilization].nil?
@max_num_replicas = args[:max_num_replicas] unless args[:max_num_replicas].nil?
@min_num_replicas = args[:min_num_replicas] unless args[:min_num_replicas].nil?
end
end
# CPU utilization policy.
class AutoscalingPolicyCpuUtilization
include Google::Apis::Core::Hashable
# The target utilization that the Autoscaler should maintain. It is represented
# as a fraction of used cores. For example: 6 cores used in 8-core VM are
# represented here as 0.75. Must be a float value between (0, 1]. If not defined,
# the default is 0.8.
# Corresponds to the JSON property `utilizationTarget`
# @return [Float]
attr_accessor :utilization_target
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@utilization_target = args[:utilization_target] unless args[:utilization_target].nil?
end
end
# Custom utilization metric policy.
class AutoscalingPolicyCustomMetricUtilization
include Google::Apis::Core::Hashable
# Identifier of the metric. It should be a Cloud Monitoring metric. The metric
# can not have negative values. The metric should be an utilization metric (
# increasing number of VMs handling requests x times should reduce average value
# of the metric roughly x times). For example you could use: compute.googleapis.
# com/instance/network/received_bytes_count.
# Corresponds to the JSON property `metric`
# @return [String]
attr_accessor :metric
# Target value of the metric which Autoscaler should maintain. Must be a
# positive value.
# Corresponds to the JSON property `utilizationTarget`
# @return [Float]
attr_accessor :utilization_target
# Defines type in which utilization_target is expressed.
# Corresponds to the JSON property `utilizationTargetType`
# @return [String]
attr_accessor :utilization_target_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@metric = args[:metric] unless args[:metric].nil?
@utilization_target = args[:utilization_target] unless args[:utilization_target].nil?
@utilization_target_type = args[:utilization_target_type] unless args[:utilization_target_type].nil?
end
end
# Load balancing utilization policy.
class AutoscalingPolicyLoadBalancingUtilization
include Google::Apis::Core::Hashable
# Fraction of backend capacity utilization (set in HTTP load balancing
# configuration) that Autoscaler should maintain. Must be a positive float value.
# If not defined, the default is 0.8. For example if your maxRatePerInstance
# capacity (in HTTP Load Balancing configuration) is set at 10 and you would
# like to keep number of instances such that each instance receives 7 QPS on
# average, set this to 0.7.
# Corresponds to the JSON property `utilizationTarget`
# @return [Float]
attr_accessor :utilization_target
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@utilization_target = args[:utilization_target] unless args[:utilization_target].nil?
end
end
#
class DeprecationStatus
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `deleted`
# @return [String]
attr_accessor :deleted
#
# Corresponds to the JSON property `deprecated`
# @return [String]
attr_accessor :deprecated
#
# Corresponds to the JSON property `obsolete`
# @return [String]
attr_accessor :obsolete
#
# Corresponds to the JSON property `replacement`
# @return [String]
attr_accessor :replacement
#
# Corresponds to the JSON property `state`
# @return [String]
attr_accessor :state
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@deleted = args[:deleted] unless args[:deleted].nil?
@deprecated = args[:deprecated] unless args[:deprecated].nil?
@obsolete = args[:obsolete] unless args[:obsolete].nil?
@replacement = args[:replacement] unless args[:replacement].nil?
@state = args[:state] unless args[:state].nil?
end
end
#
class Operation
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `clientOperationId`
# @return [String]
attr_accessor :client_operation_id
#
# Corresponds to the JSON property `creationTimestamp`
# @return [String]
attr_accessor :creation_timestamp
#
# Corresponds to the JSON property `endTime`
# @return [String]
attr_accessor :end_time
#
# Corresponds to the JSON property `error`
# @return [Google::Apis::AutoscalerV1beta2::Operation::Error]
attr_accessor :error
#
# Corresponds to the JSON property `httpErrorMessage`
# @return [String]
attr_accessor :http_error_message
#
# Corresponds to the JSON property `httpErrorStatusCode`
# @return [Fixnum]
attr_accessor :http_error_status_code
#
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
#
# Corresponds to the JSON property `insertTime`
# @return [String]
attr_accessor :insert_time
# [Output Only] Type of the resource. Always compute#Operation for Operation
# resources.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
#
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
#
# Corresponds to the JSON property `operationType`
# @return [String]
attr_accessor :operation_type
#
# Corresponds to the JSON property `progress`
# @return [Fixnum]
attr_accessor :progress
#
# Corresponds to the JSON property `region`
# @return [String]
attr_accessor :region
#
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
#
# Corresponds to the JSON property `startTime`
# @return [String]
attr_accessor :start_time
#
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
#
# Corresponds to the JSON property `statusMessage`
# @return [String]
attr_accessor :status_message
#
# Corresponds to the JSON property `targetId`
# @return [String]
attr_accessor :target_id
#
# Corresponds to the JSON property `targetLink`
# @return [String]
attr_accessor :target_link
#
# Corresponds to the JSON property `user`
# @return [String]
attr_accessor :user
#
# Corresponds to the JSON property `warnings`
# @return [Array<Google::Apis::AutoscalerV1beta2::Operation::Warning>]
attr_accessor :warnings
#
# Corresponds to the JSON property `zone`
# @return [String]
attr_accessor :zone
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@client_operation_id = args[:client_operation_id] unless args[:client_operation_id].nil?
@creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil?
@end_time = args[:end_time] unless args[:end_time].nil?
@error = args[:error] unless args[:error].nil?
@http_error_message = args[:http_error_message] unless args[:http_error_message].nil?
@http_error_status_code = args[:http_error_status_code] unless args[:http_error_status_code].nil?
@id = args[:id] unless args[:id].nil?
@insert_time = args[:insert_time] unless args[:insert_time].nil?
@kind = args[:kind] unless args[:kind].nil?
@name = args[:name] unless args[:name].nil?
@operation_type = args[:operation_type] unless args[:operation_type].nil?
@progress = args[:progress] unless args[:progress].nil?
@region = args[:region] unless args[:region].nil?
@self_link = args[:self_link] unless args[:self_link].nil?
@start_time = args[:start_time] unless args[:start_time].nil?
@status = args[:status] unless args[:status].nil?
@status_message = args[:status_message] unless args[:status_message].nil?
@target_id = args[:target_id] unless args[:target_id].nil?
@target_link = args[:target_link] unless args[:target_link].nil?
@user = args[:user] unless args[:user].nil?
@warnings = args[:warnings] unless args[:warnings].nil?
@zone = args[:zone] unless args[:zone].nil?
end
#
class Error
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `errors`
# @return [Array<Google::Apis::AutoscalerV1beta2::Operation::Error::Error>]
attr_accessor :errors
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@errors = args[:errors] unless args[:errors].nil?
end
#
class Error
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `code`
# @return [String]
attr_accessor :code
#
# Corresponds to the JSON property `location`
# @return [String]
attr_accessor :location
#
# Corresponds to the JSON property `message`
# @return [String]
attr_accessor :message
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@code = args[:code] unless args[:code].nil?
@location = args[:location] unless args[:location].nil?
@message = args[:message] unless args[:message].nil?
end
end
end
#
class Warning
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `code`
# @return [String]
attr_accessor :code
#
# Corresponds to the JSON property `data`
# @return [Array<Google::Apis::AutoscalerV1beta2::Operation::Warning::Datum>]
attr_accessor :data
#
# Corresponds to the JSON property `message`
# @return [String]
attr_accessor :message
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@code = args[:code] unless args[:code].nil?
@data = args[:data] unless args[:data].nil?
@message = args[:message] unless args[:message].nil?
end
#
class Datum
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `key`
# @return [String]
attr_accessor :key
#
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@key = args[:key] unless args[:key].nil?
@value = args[:value] unless args[:value].nil?
end
end
end
end
#
class OperationList
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
#
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AutoscalerV1beta2::Operation>]
attr_accessor :items
# [Output Only] Type of resource. Always compute#operations for Operations
# resource.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
#
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
#
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] unless args[:id].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
@self_link = args[:self_link] unless args[:self_link].nil?
end
end
#
class Zone
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `creationTimestamp`
# @return [String]
attr_accessor :creation_timestamp
#
# Corresponds to the JSON property `deprecated`
# @return [Google::Apis::AutoscalerV1beta2::DeprecationStatus]
attr_accessor :deprecated
#
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
#
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# [Output Only] Type of the resource. Always kind#zone for zones.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
#
# Corresponds to the JSON property `maintenanceWindows`
# @return [Array<Google::Apis::AutoscalerV1beta2::Zone::MaintenanceWindow>]
attr_accessor :maintenance_windows
#
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
#
# Corresponds to the JSON property `region`
# @return [String]
attr_accessor :region
# [Output Only] Server defined URL for the resource.
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
#
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil?
@deprecated = args[:deprecated] unless args[:deprecated].nil?
@description = args[:description] unless args[:description].nil?
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@maintenance_windows = args[:maintenance_windows] unless args[:maintenance_windows].nil?
@name = args[:name] unless args[:name].nil?
@region = args[:region] unless args[:region].nil?
@self_link = args[:self_link] unless args[:self_link].nil?
@status = args[:status] unless args[:status].nil?
end
#
class MaintenanceWindow
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `beginTime`
# @return [String]
attr_accessor :begin_time
#
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
#
# Corresponds to the JSON property `endTime`
# @return [String]
attr_accessor :end_time
#
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@begin_time = args[:begin_time] unless args[:begin_time].nil?
@description = args[:description] unless args[:description].nil?
@end_time = args[:end_time] unless args[:end_time].nil?
@name = args[:name] unless args[:name].nil?
end
end
end
#
class ZoneList
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
#
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AutoscalerV1beta2::Zone>]
attr_accessor :items
# Type of resource.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
#
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# Server defined URL for this resource (output only).
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] unless args[:id].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
@self_link = args[:self_link] unless args[:self_link].nil?
end
end
end
end
end

View File

@ -0,0 +1,281 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AutoscalerV1beta2
class Autoscaler
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListAutoscalerResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AutoscalingPolicy
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AutoscalingPolicyCpuUtilization
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AutoscalingPolicyCustomMetricUtilization
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AutoscalingPolicyLoadBalancingUtilization
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class DeprecationStatus
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Operation
class Representation < Google::Apis::Core::JsonRepresentation; end
class Error
class Representation < Google::Apis::Core::JsonRepresentation; end
class Error
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class Warning
class Representation < Google::Apis::Core::JsonRepresentation; end
class Datum
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
end
class OperationList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Zone
class Representation < Google::Apis::Core::JsonRepresentation; end
class MaintenanceWindow
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class ZoneList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class Autoscaler
class Representation < Google::Apis::Core::JsonRepresentation
property :autoscaling_policy, as: 'autoscalingPolicy', class: Google::Apis::AutoscalerV1beta2::AutoscalingPolicy, decorator: Google::Apis::AutoscalerV1beta2::AutoscalingPolicy::Representation
property :creation_timestamp, as: 'creationTimestamp'
property :description, as: 'description'
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
property :self_link, as: 'selfLink'
property :target, as: 'target'
end
end
# @private
class ListAutoscalerResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::AutoscalerV1beta2::Autoscaler, decorator: Google::Apis::AutoscalerV1beta2::Autoscaler::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class AutoscalingPolicy
class Representation < Google::Apis::Core::JsonRepresentation
property :cool_down_period_sec, as: 'coolDownPeriodSec'
property :cpu_utilization, as: 'cpuUtilization', class: Google::Apis::AutoscalerV1beta2::AutoscalingPolicyCpuUtilization, decorator: Google::Apis::AutoscalerV1beta2::AutoscalingPolicyCpuUtilization::Representation
collection :custom_metric_utilizations, as: 'customMetricUtilizations', class: Google::Apis::AutoscalerV1beta2::AutoscalingPolicyCustomMetricUtilization, decorator: Google::Apis::AutoscalerV1beta2::AutoscalingPolicyCustomMetricUtilization::Representation
property :load_balancing_utilization, as: 'loadBalancingUtilization', class: Google::Apis::AutoscalerV1beta2::AutoscalingPolicyLoadBalancingUtilization, decorator: Google::Apis::AutoscalerV1beta2::AutoscalingPolicyLoadBalancingUtilization::Representation
property :max_num_replicas, as: 'maxNumReplicas'
property :min_num_replicas, as: 'minNumReplicas'
end
end
# @private
class AutoscalingPolicyCpuUtilization
class Representation < Google::Apis::Core::JsonRepresentation
property :utilization_target, as: 'utilizationTarget'
end
end
# @private
class AutoscalingPolicyCustomMetricUtilization
class Representation < Google::Apis::Core::JsonRepresentation
property :metric, as: 'metric'
property :utilization_target, as: 'utilizationTarget'
property :utilization_target_type, as: 'utilizationTargetType'
end
end
# @private
class AutoscalingPolicyLoadBalancingUtilization
class Representation < Google::Apis::Core::JsonRepresentation
property :utilization_target, as: 'utilizationTarget'
end
end
# @private
class DeprecationStatus
class Representation < Google::Apis::Core::JsonRepresentation
property :deleted, as: 'deleted'
property :deprecated, as: 'deprecated'
property :obsolete, as: 'obsolete'
property :replacement, as: 'replacement'
property :state, as: 'state'
end
end
# @private
class Operation
class Representation < Google::Apis::Core::JsonRepresentation
property :client_operation_id, as: 'clientOperationId'
property :creation_timestamp, as: 'creationTimestamp'
property :end_time, as: 'endTime'
property :error, as: 'error', class: Google::Apis::AutoscalerV1beta2::Operation::Error, decorator: Google::Apis::AutoscalerV1beta2::Operation::Error::Representation
property :http_error_message, as: 'httpErrorMessage'
property :http_error_status_code, as: 'httpErrorStatusCode'
property :id, as: 'id'
property :insert_time, as: 'insertTime'
property :kind, as: 'kind'
property :name, as: 'name'
property :operation_type, as: 'operationType'
property :progress, as: 'progress'
property :region, as: 'region'
property :self_link, as: 'selfLink'
property :start_time, as: 'startTime'
property :status, as: 'status'
property :status_message, as: 'statusMessage'
property :target_id, as: 'targetId'
property :target_link, as: 'targetLink'
property :user, as: 'user'
collection :warnings, as: 'warnings', class: Google::Apis::AutoscalerV1beta2::Operation::Warning, decorator: Google::Apis::AutoscalerV1beta2::Operation::Warning::Representation
property :zone, as: 'zone'
end
# @private
class Error
class Representation < Google::Apis::Core::JsonRepresentation
collection :errors, as: 'errors', class: Google::Apis::AutoscalerV1beta2::Operation::Error::Error, decorator: Google::Apis::AutoscalerV1beta2::Operation::Error::Error::Representation
end
# @private
class Error
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
property :location, as: 'location'
property :message, as: 'message'
end
end
end
# @private
class Warning
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
collection :data, as: 'data', class: Google::Apis::AutoscalerV1beta2::Operation::Warning::Datum, decorator: Google::Apis::AutoscalerV1beta2::Operation::Warning::Datum::Representation
property :message, as: 'message'
end
# @private
class Datum
class Representation < Google::Apis::Core::JsonRepresentation
property :key, as: 'key'
property :value, as: 'value'
end
end
end
end
# @private
class OperationList
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
collection :items, as: 'items', class: Google::Apis::AutoscalerV1beta2::Operation, decorator: Google::Apis::AutoscalerV1beta2::Operation::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :self_link, as: 'selfLink'
end
end
# @private
class Zone
class Representation < Google::Apis::Core::JsonRepresentation
property :creation_timestamp, as: 'creationTimestamp'
property :deprecated, as: 'deprecated', class: Google::Apis::AutoscalerV1beta2::DeprecationStatus, decorator: Google::Apis::AutoscalerV1beta2::DeprecationStatus::Representation
property :description, as: 'description'
property :id, as: 'id'
property :kind, as: 'kind'
collection :maintenance_windows, as: 'maintenanceWindows', class: Google::Apis::AutoscalerV1beta2::Zone::MaintenanceWindow, decorator: Google::Apis::AutoscalerV1beta2::Zone::MaintenanceWindow::Representation
property :name, as: 'name'
property :region, as: 'region'
property :self_link, as: 'selfLink'
property :status, as: 'status'
end
# @private
class MaintenanceWindow
class Representation < Google::Apis::Core::JsonRepresentation
property :begin_time, as: 'beginTime'
property :description, as: 'description'
property :end_time, as: 'endTime'
property :name, as: 'name'
end
end
end
# @private
class ZoneList
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
collection :items, as: 'items', class: Google::Apis::AutoscalerV1beta2::Zone, decorator: Google::Apis::AutoscalerV1beta2::Zone::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :self_link, as: 'selfLink'
end
end
end
end
end

View File

@ -0,0 +1,488 @@
# Copyright 2015 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.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AutoscalerV1beta2
# Google Compute Engine Autoscaler API
#
# The Google Compute Engine Autoscaler API provides autoscaling for groups of
# Cloud VMs.
#
# @example
# require 'google/apis/autoscaler_v1beta2'
#
# Autoscaler = Google::Apis::AutoscalerV1beta2 # Alias the module
# service = Autoscaler::AutoscalerService.new
#
# @see http://developers.google.com/compute/docs/autoscaler
class AutoscalerService < Google::Apis::Core::BaseService
# @return [String]
# 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.
attr_accessor :key
# @return [String]
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
attr_accessor :quota_user
# @return [String]
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
attr_accessor :user_ip
def initialize
super('https://www.googleapis.com/', 'autoscaler/v1beta2/')
end
# Deletes the specified Autoscaler resource.
# @param [String] project
# Project ID of Autoscaler resource.
# @param [String] zone
# Zone name of Autoscaler resource.
# @param [String] autoscaler
# Name of the Autoscaler resource.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AutoscalerV1beta2::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AutoscalerV1beta2::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_autoscaler(project, zone, autoscaler, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'projects/{project}/zones/{zone}/autoscalers/{autoscaler}'
command = make_simple_command(:delete, path, options)
command.response_representation = Google::Apis::AutoscalerV1beta2::Operation::Representation
command.response_class = Google::Apis::AutoscalerV1beta2::Operation
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.params['autoscaler'] = autoscaler unless autoscaler.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Gets the specified Autoscaler resource.
# @param [String] project
# Project ID of Autoscaler resource.
# @param [String] zone
# Zone name of Autoscaler resource.
# @param [String] autoscaler
# Name of the Autoscaler resource.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AutoscalerV1beta2::Autoscaler] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AutoscalerV1beta2::Autoscaler]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_autoscaler(project, zone, autoscaler, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'projects/{project}/zones/{zone}/autoscalers/{autoscaler}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AutoscalerV1beta2::Autoscaler::Representation
command.response_class = Google::Apis::AutoscalerV1beta2::Autoscaler
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.params['autoscaler'] = autoscaler unless autoscaler.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Adds new Autoscaler resource.
# @param [String] project
# Project ID of Autoscaler resource.
# @param [String] zone
# Zone name of Autoscaler resource.
# @param [Google::Apis::AutoscalerV1beta2::Autoscaler] autoscaler_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AutoscalerV1beta2::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AutoscalerV1beta2::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def insert_autoscaler(project, zone, autoscaler_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'projects/{project}/zones/{zone}/autoscalers'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::AutoscalerV1beta2::Autoscaler::Representation
command.request_object = autoscaler_object
command.response_representation = Google::Apis::AutoscalerV1beta2::Operation::Representation
command.response_class = Google::Apis::AutoscalerV1beta2::Operation
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Lists all Autoscaler resources in this zone.
# @param [String] project
# Project ID of Autoscaler resource.
# @param [String] zone
# Zone name of Autoscaler resource.
# @param [String] filter
# @param [Fixnum] max_results
# @param [String] page_token
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AutoscalerV1beta2::ListAutoscalerResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AutoscalerV1beta2::ListAutoscalerResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_autoscalers(project, zone, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'projects/{project}/zones/{zone}/autoscalers'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AutoscalerV1beta2::ListAutoscalerResponse::Representation
command.response_class = Google::Apis::AutoscalerV1beta2::ListAutoscalerResponse
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.query['filter'] = filter unless filter.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Update the entire content of the Autoscaler resource. This method supports
# patch semantics.
# @param [String] project
# Project ID of Autoscaler resource.
# @param [String] zone
# Zone name of Autoscaler resource.
# @param [String] autoscaler
# Name of the Autoscaler resource.
# @param [Google::Apis::AutoscalerV1beta2::Autoscaler] autoscaler_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AutoscalerV1beta2::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AutoscalerV1beta2::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def patch_autoscaler(project, zone, autoscaler, autoscaler_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'projects/{project}/zones/{zone}/autoscalers/{autoscaler}'
command = make_simple_command(:patch, path, options)
command.request_representation = Google::Apis::AutoscalerV1beta2::Autoscaler::Representation
command.request_object = autoscaler_object
command.response_representation = Google::Apis::AutoscalerV1beta2::Operation::Representation
command.response_class = Google::Apis::AutoscalerV1beta2::Operation
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.params['autoscaler'] = autoscaler unless autoscaler.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Update the entire content of the Autoscaler resource.
# @param [String] project
# Project ID of Autoscaler resource.
# @param [String] zone
# Zone name of Autoscaler resource.
# @param [String] autoscaler
# Name of the Autoscaler resource.
# @param [Google::Apis::AutoscalerV1beta2::Autoscaler] autoscaler_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AutoscalerV1beta2::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AutoscalerV1beta2::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_autoscaler(project, zone, autoscaler, autoscaler_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'projects/{project}/zones/{zone}/autoscalers/{autoscaler}'
command = make_simple_command(:put, path, options)
command.request_representation = Google::Apis::AutoscalerV1beta2::Autoscaler::Representation
command.request_object = autoscaler_object
command.response_representation = Google::Apis::AutoscalerV1beta2::Operation::Representation
command.response_class = Google::Apis::AutoscalerV1beta2::Operation
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.params['autoscaler'] = autoscaler unless autoscaler.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Deletes the specified zone-specific operation resource.
# @param [String] project
# @param [String] zone
# @param [String] operation
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_zone_operation(project, zone, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/zones/{zone}/operations/{operation}'
command = make_simple_command(:delete, path, options)
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.params['operation'] = operation unless operation.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Retrieves the specified zone-specific operation resource.
# @param [String] project
# @param [String] zone
# @param [String] operation
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AutoscalerV1beta2::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AutoscalerV1beta2::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_zone_operation(project, zone, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/zones/{zone}/operations/{operation}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AutoscalerV1beta2::Operation::Representation
command.response_class = Google::Apis::AutoscalerV1beta2::Operation
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.params['operation'] = operation unless operation.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Retrieves the list of operation resources contained within the specified zone.
# @param [String] project
# @param [String] zone
# @param [String] filter
# @param [Fixnum] max_results
# @param [String] page_token
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AutoscalerV1beta2::OperationList] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AutoscalerV1beta2::OperationList]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_zone_operations(project, zone, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/zones/{zone}/operations'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AutoscalerV1beta2::OperationList::Representation
command.response_class = Google::Apis::AutoscalerV1beta2::OperationList
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.query['filter'] = filter unless filter.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
#
# @param [String] project
# @param [String] filter
# @param [Fixnum] max_results
# @param [String] page_token
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AutoscalerV1beta2::ZoneList] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AutoscalerV1beta2::ZoneList]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_zones(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/zones'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AutoscalerV1beta2::ZoneList::Representation
command.response_class = Google::Apis::AutoscalerV1beta2::ZoneList
command.params['project'] = project unless project.nil?
command.query['filter'] = filter unless filter.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
protected
def apply_command_defaults(command)
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
end
end
end
end
end

View File

@ -0,0 +1,49 @@
# Copyright 2015 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.
require 'google/apis/bigquery_v2/service.rb'
require 'google/apis/bigquery_v2/classes.rb'
require 'google/apis/bigquery_v2/representations.rb'
module Google
module Apis
# BigQuery API
#
# A data platform for customers to create, manage, share and query data.
#
# @see https://cloud.google.com/bigquery/
module BigqueryV2
VERSION = 'V2'
REVISION = '20150526'
# View and manage your data in Google BigQuery
AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery'
# Insert data into Google BigQuery
AUTH_BIGQUERY_INSERTDATA = 'https://www.googleapis.com/auth/bigquery.insertdata'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
# Manage your data and permissions in Google Cloud Storage
AUTH_DEVSTORAGE_FULL_CONTROL = 'https://www.googleapis.com/auth/devstorage.full_control'
# View your data in Google Cloud Storage
AUTH_DEVSTORAGE_READ_ONLY = 'https://www.googleapis.com/auth/devstorage.read_only'
# Manage your data in Google Cloud Storage
AUTH_DEVSTORAGE_READ_WRITE = 'https://www.googleapis.com/auth/devstorage.read_write'
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,753 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module BigqueryV2
class CsvOptions
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Dataset
class Representation < Google::Apis::Core::JsonRepresentation; end
class Access
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class DatasetList
class Representation < Google::Apis::Core::JsonRepresentation; end
class Dataset
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class DatasetReference
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ErrorProto
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ExternalDataConfiguration
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class GetQueryResultsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Job
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class CancelJobResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobConfiguration
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobConfigurationExtract
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobConfigurationLink
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobConfigurationLoad
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobConfigurationQuery
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobConfigurationTableCopy
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobList
class Representation < Google::Apis::Core::JsonRepresentation; end
class Job
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class JobReference
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobStatistics
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobStatistics2
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobStatistics3
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobStatistics4
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobStatus
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ProjectList
class Representation < Google::Apis::Core::JsonRepresentation; end
class Project
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class ProjectReference
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class QueryRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class QueryResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Table
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class TableCell
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class InsertAllTableDataRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
class Row
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class InsertAllTableDataResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
class InsertError
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class TableDataList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class TableFieldSchema
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class TableList
class Representation < Google::Apis::Core::JsonRepresentation; end
class Table
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class TableReference
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class TableRow
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class TableSchema
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ViewDefinition
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class CsvOptions
class Representation < Google::Apis::Core::JsonRepresentation
property :allow_jagged_rows, as: 'allowJaggedRows'
property :allow_quoted_newlines, as: 'allowQuotedNewlines'
property :encoding, as: 'encoding'
property :field_delimiter, as: 'fieldDelimiter'
property :quote, as: 'quote'
property :skip_leading_rows, as: 'skipLeadingRows'
end
end
# @private
class Dataset
class Representation < Google::Apis::Core::JsonRepresentation
collection :access, as: 'access', class: Google::Apis::BigqueryV2::Dataset::Access, decorator: Google::Apis::BigqueryV2::Dataset::Access::Representation
property :creation_time, as: 'creationTime'
property :dataset_reference, as: 'datasetReference', class: Google::Apis::BigqueryV2::DatasetReference, decorator: Google::Apis::BigqueryV2::DatasetReference::Representation
property :default_table_expiration_ms, as: 'defaultTableExpirationMs'
property :description, as: 'description'
property :etag, as: 'etag'
property :friendly_name, as: 'friendlyName'
property :id, as: 'id'
property :kind, as: 'kind'
property :last_modified_time, as: 'lastModifiedTime'
property :location, as: 'location'
property :self_link, as: 'selfLink'
end
# @private
class Access
class Representation < Google::Apis::Core::JsonRepresentation
property :domain, as: 'domain'
property :group_by_email, as: 'groupByEmail'
property :role, as: 'role'
property :special_group, as: 'specialGroup'
property :user_by_email, as: 'userByEmail'
property :view, as: 'view', class: Google::Apis::BigqueryV2::TableReference, decorator: Google::Apis::BigqueryV2::TableReference::Representation
end
end
end
# @private
class DatasetList
class Representation < Google::Apis::Core::JsonRepresentation
collection :datasets, as: 'datasets', class: Google::Apis::BigqueryV2::DatasetList::Dataset, decorator: Google::Apis::BigqueryV2::DatasetList::Dataset::Representation
property :etag, as: 'etag'
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
# @private
class Dataset
class Representation < Google::Apis::Core::JsonRepresentation
property :dataset_reference, as: 'datasetReference', class: Google::Apis::BigqueryV2::DatasetReference, decorator: Google::Apis::BigqueryV2::DatasetReference::Representation
property :friendly_name, as: 'friendlyName'
property :id, as: 'id'
property :kind, as: 'kind'
end
end
end
# @private
class DatasetReference
class Representation < Google::Apis::Core::JsonRepresentation
property :dataset_id, as: 'datasetId'
property :project_id, as: 'projectId'
end
end
# @private
class ErrorProto
class Representation < Google::Apis::Core::JsonRepresentation
property :debug_info, as: 'debugInfo'
property :location, as: 'location'
property :message, as: 'message'
property :reason, as: 'reason'
end
end
# @private
class ExternalDataConfiguration
class Representation < Google::Apis::Core::JsonRepresentation
property :compression, as: 'compression'
property :csv_options, as: 'csvOptions', class: Google::Apis::BigqueryV2::CsvOptions, decorator: Google::Apis::BigqueryV2::CsvOptions::Representation
property :ignore_unknown_values, as: 'ignoreUnknownValues'
property :max_bad_records, as: 'maxBadRecords'
property :schema, as: 'schema', class: Google::Apis::BigqueryV2::TableSchema, decorator: Google::Apis::BigqueryV2::TableSchema::Representation
property :source_format, as: 'sourceFormat'
collection :source_uris, as: 'sourceUris'
end
end
# @private
class GetQueryResultsResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :cache_hit, as: 'cacheHit'
property :etag, as: 'etag'
property :job_complete, as: 'jobComplete'
property :job_reference, as: 'jobReference', class: Google::Apis::BigqueryV2::JobReference, decorator: Google::Apis::BigqueryV2::JobReference::Representation
property :kind, as: 'kind'
property :page_token, as: 'pageToken'
collection :rows, as: 'rows', class: Google::Apis::BigqueryV2::TableRow, decorator: Google::Apis::BigqueryV2::TableRow::Representation
property :schema, as: 'schema', class: Google::Apis::BigqueryV2::TableSchema, decorator: Google::Apis::BigqueryV2::TableSchema::Representation
property :total_bytes_processed, as: 'totalBytesProcessed'
property :total_rows, as: 'totalRows'
end
end
# @private
class Job
class Representation < Google::Apis::Core::JsonRepresentation
property :configuration, as: 'configuration', class: Google::Apis::BigqueryV2::JobConfiguration, decorator: Google::Apis::BigqueryV2::JobConfiguration::Representation
property :etag, as: 'etag'
property :id, as: 'id'
property :job_reference, as: 'jobReference', class: Google::Apis::BigqueryV2::JobReference, decorator: Google::Apis::BigqueryV2::JobReference::Representation
property :kind, as: 'kind'
property :self_link, as: 'selfLink'
property :statistics, as: 'statistics', class: Google::Apis::BigqueryV2::JobStatistics, decorator: Google::Apis::BigqueryV2::JobStatistics::Representation
property :status, as: 'status', class: Google::Apis::BigqueryV2::JobStatus, decorator: Google::Apis::BigqueryV2::JobStatus::Representation
property :user_email, as: 'user_email'
end
end
# @private
class CancelJobResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :job, as: 'job', class: Google::Apis::BigqueryV2::Job, decorator: Google::Apis::BigqueryV2::Job::Representation
property :kind, as: 'kind'
end
end
# @private
class JobConfiguration
class Representation < Google::Apis::Core::JsonRepresentation
property :copy, as: 'copy', class: Google::Apis::BigqueryV2::JobConfigurationTableCopy, decorator: Google::Apis::BigqueryV2::JobConfigurationTableCopy::Representation
property :dry_run, as: 'dryRun'
property :extract, as: 'extract', class: Google::Apis::BigqueryV2::JobConfigurationExtract, decorator: Google::Apis::BigqueryV2::JobConfigurationExtract::Representation
property :link, as: 'link', class: Google::Apis::BigqueryV2::JobConfigurationLink, decorator: Google::Apis::BigqueryV2::JobConfigurationLink::Representation
property :load, as: 'load', class: Google::Apis::BigqueryV2::JobConfigurationLoad, decorator: Google::Apis::BigqueryV2::JobConfigurationLoad::Representation
property :query, as: 'query', class: Google::Apis::BigqueryV2::JobConfigurationQuery, decorator: Google::Apis::BigqueryV2::JobConfigurationQuery::Representation
end
end
# @private
class JobConfigurationExtract
class Representation < Google::Apis::Core::JsonRepresentation
property :compression, as: 'compression'
property :destination_format, as: 'destinationFormat'
property :destination_uri, as: 'destinationUri'
collection :destination_uris, as: 'destinationUris'
property :field_delimiter, as: 'fieldDelimiter'
property :print_header, as: 'printHeader'
property :source_table, as: 'sourceTable', class: Google::Apis::BigqueryV2::TableReference, decorator: Google::Apis::BigqueryV2::TableReference::Representation
end
end
# @private
class JobConfigurationLink
class Representation < Google::Apis::Core::JsonRepresentation
property :create_disposition, as: 'createDisposition'
property :destination_table, as: 'destinationTable', class: Google::Apis::BigqueryV2::TableReference, decorator: Google::Apis::BigqueryV2::TableReference::Representation
collection :source_uri, as: 'sourceUri'
property :write_disposition, as: 'writeDisposition'
end
end
# @private
class JobConfigurationLoad
class Representation < Google::Apis::Core::JsonRepresentation
property :allow_jagged_rows, as: 'allowJaggedRows'
property :allow_quoted_newlines, as: 'allowQuotedNewlines'
property :create_disposition, as: 'createDisposition'
property :destination_table, as: 'destinationTable', class: Google::Apis::BigqueryV2::TableReference, decorator: Google::Apis::BigqueryV2::TableReference::Representation
property :encoding, as: 'encoding'
property :field_delimiter, as: 'fieldDelimiter'
property :ignore_unknown_values, as: 'ignoreUnknownValues'
property :max_bad_records, as: 'maxBadRecords'
collection :projection_fields, as: 'projectionFields'
property :quote, as: 'quote'
property :schema, as: 'schema', class: Google::Apis::BigqueryV2::TableSchema, decorator: Google::Apis::BigqueryV2::TableSchema::Representation
property :schema_inline, as: 'schemaInline'
property :schema_inline_format, as: 'schemaInlineFormat'
property :skip_leading_rows, as: 'skipLeadingRows'
property :source_format, as: 'sourceFormat'
collection :source_uris, as: 'sourceUris'
property :write_disposition, as: 'writeDisposition'
end
end
# @private
class JobConfigurationQuery
class Representation < Google::Apis::Core::JsonRepresentation
property :allow_large_results, as: 'allowLargeResults'
property :create_disposition, as: 'createDisposition'
property :default_dataset, as: 'defaultDataset', class: Google::Apis::BigqueryV2::DatasetReference, decorator: Google::Apis::BigqueryV2::DatasetReference::Representation
property :destination_table, as: 'destinationTable', class: Google::Apis::BigqueryV2::TableReference, decorator: Google::Apis::BigqueryV2::TableReference::Representation
property :flatten_results, as: 'flattenResults'
property :preserve_nulls, as: 'preserveNulls'
property :priority, as: 'priority'
property :query, as: 'query'
hash :table_definitions, as: 'tableDefinitions', class: Google::Apis::BigqueryV2::ExternalDataConfiguration, decorator: Google::Apis::BigqueryV2::ExternalDataConfiguration::Representation
property :use_query_cache, as: 'useQueryCache'
property :write_disposition, as: 'writeDisposition'
end
end
# @private
class JobConfigurationTableCopy
class Representation < Google::Apis::Core::JsonRepresentation
property :create_disposition, as: 'createDisposition'
property :destination_table, as: 'destinationTable', class: Google::Apis::BigqueryV2::TableReference, decorator: Google::Apis::BigqueryV2::TableReference::Representation
property :source_table, as: 'sourceTable', class: Google::Apis::BigqueryV2::TableReference, decorator: Google::Apis::BigqueryV2::TableReference::Representation
collection :source_tables, as: 'sourceTables', class: Google::Apis::BigqueryV2::TableReference, decorator: Google::Apis::BigqueryV2::TableReference::Representation
property :write_disposition, as: 'writeDisposition'
end
end
# @private
class JobList
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :jobs, as: 'jobs', class: Google::Apis::BigqueryV2::JobList::Job, decorator: Google::Apis::BigqueryV2::JobList::Job::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
# @private
class Job
class Representation < Google::Apis::Core::JsonRepresentation
property :configuration, as: 'configuration', class: Google::Apis::BigqueryV2::JobConfiguration, decorator: Google::Apis::BigqueryV2::JobConfiguration::Representation
property :error_result, as: 'errorResult', class: Google::Apis::BigqueryV2::ErrorProto, decorator: Google::Apis::BigqueryV2::ErrorProto::Representation
property :id, as: 'id'
property :job_reference, as: 'jobReference', class: Google::Apis::BigqueryV2::JobReference, decorator: Google::Apis::BigqueryV2::JobReference::Representation
property :kind, as: 'kind'
property :state, as: 'state'
property :statistics, as: 'statistics', class: Google::Apis::BigqueryV2::JobStatistics, decorator: Google::Apis::BigqueryV2::JobStatistics::Representation
property :status, as: 'status', class: Google::Apis::BigqueryV2::JobStatus, decorator: Google::Apis::BigqueryV2::JobStatus::Representation
property :user_email, as: 'user_email'
end
end
end
# @private
class JobReference
class Representation < Google::Apis::Core::JsonRepresentation
property :job_id, as: 'jobId'
property :project_id, as: 'projectId'
end
end
# @private
class JobStatistics
class Representation < Google::Apis::Core::JsonRepresentation
property :creation_time, as: 'creationTime'
property :end_time, as: 'endTime'
property :extract, as: 'extract', class: Google::Apis::BigqueryV2::JobStatistics4, decorator: Google::Apis::BigqueryV2::JobStatistics4::Representation
property :load, as: 'load', class: Google::Apis::BigqueryV2::JobStatistics3, decorator: Google::Apis::BigqueryV2::JobStatistics3::Representation
property :query, as: 'query', class: Google::Apis::BigqueryV2::JobStatistics2, decorator: Google::Apis::BigqueryV2::JobStatistics2::Representation
property :start_time, as: 'startTime'
property :total_bytes_processed, as: 'totalBytesProcessed'
end
end
# @private
class JobStatistics2
class Representation < Google::Apis::Core::JsonRepresentation
property :cache_hit, as: 'cacheHit'
property :total_bytes_processed, as: 'totalBytesProcessed'
end
end
# @private
class JobStatistics3
class Representation < Google::Apis::Core::JsonRepresentation
property :input_file_bytes, as: 'inputFileBytes'
property :input_files, as: 'inputFiles'
property :output_bytes, as: 'outputBytes'
property :output_rows, as: 'outputRows'
end
end
# @private
class JobStatistics4
class Representation < Google::Apis::Core::JsonRepresentation
collection :destination_uri_file_counts, as: 'destinationUriFileCounts'
end
end
# @private
class JobStatus
class Representation < Google::Apis::Core::JsonRepresentation
property :error_result, as: 'errorResult', class: Google::Apis::BigqueryV2::ErrorProto, decorator: Google::Apis::BigqueryV2::ErrorProto::Representation
collection :errors, as: 'errors', class: Google::Apis::BigqueryV2::ErrorProto, decorator: Google::Apis::BigqueryV2::ErrorProto::Representation
property :state, as: 'state'
end
end
# @private
class ProjectList
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
collection :projects, as: 'projects', class: Google::Apis::BigqueryV2::ProjectList::Project, decorator: Google::Apis::BigqueryV2::ProjectList::Project::Representation
property :total_items, as: 'totalItems'
end
# @private
class Project
class Representation < Google::Apis::Core::JsonRepresentation
property :friendly_name, as: 'friendlyName'
property :id, as: 'id'
property :kind, as: 'kind'
property :numeric_id, as: 'numericId'
property :project_reference, as: 'projectReference', class: Google::Apis::BigqueryV2::ProjectReference, decorator: Google::Apis::BigqueryV2::ProjectReference::Representation
end
end
end
# @private
class ProjectReference
class Representation < Google::Apis::Core::JsonRepresentation
property :project_id, as: 'projectId'
end
end
# @private
class QueryRequest
class Representation < Google::Apis::Core::JsonRepresentation
property :default_dataset, as: 'defaultDataset', class: Google::Apis::BigqueryV2::DatasetReference, decorator: Google::Apis::BigqueryV2::DatasetReference::Representation
property :dry_run, as: 'dryRun'
property :kind, as: 'kind'
property :max_results, as: 'maxResults'
property :preserve_nulls, as: 'preserveNulls'
property :query, as: 'query'
property :timeout_ms, as: 'timeoutMs'
property :use_query_cache, as: 'useQueryCache'
end
end
# @private
class QueryResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :cache_hit, as: 'cacheHit'
property :job_complete, as: 'jobComplete'
property :job_reference, as: 'jobReference', class: Google::Apis::BigqueryV2::JobReference, decorator: Google::Apis::BigqueryV2::JobReference::Representation
property :kind, as: 'kind'
property :page_token, as: 'pageToken'
collection :rows, as: 'rows', class: Google::Apis::BigqueryV2::TableRow, decorator: Google::Apis::BigqueryV2::TableRow::Representation
property :schema, as: 'schema', class: Google::Apis::BigqueryV2::TableSchema, decorator: Google::Apis::BigqueryV2::TableSchema::Representation
property :total_bytes_processed, as: 'totalBytesProcessed'
property :total_rows, as: 'totalRows'
end
end
# @private
class Table
class Representation < Google::Apis::Core::JsonRepresentation
property :creation_time, as: 'creationTime'
property :description, as: 'description'
property :etag, as: 'etag'
property :expiration_time, as: 'expirationTime'
property :friendly_name, as: 'friendlyName'
property :id, as: 'id'
property :kind, as: 'kind'
property :last_modified_time, as: 'lastModifiedTime'
property :num_bytes, as: 'numBytes'
property :num_rows, as: 'numRows'
property :schema, as: 'schema', class: Google::Apis::BigqueryV2::TableSchema, decorator: Google::Apis::BigqueryV2::TableSchema::Representation
property :self_link, as: 'selfLink'
property :table_reference, as: 'tableReference', class: Google::Apis::BigqueryV2::TableReference, decorator: Google::Apis::BigqueryV2::TableReference::Representation
property :type, as: 'type'
property :view, as: 'view', class: Google::Apis::BigqueryV2::ViewDefinition, decorator: Google::Apis::BigqueryV2::ViewDefinition::Representation
end
end
# @private
class TableCell
class Representation < Google::Apis::Core::JsonRepresentation
property :v, as: 'v'
end
end
# @private
class InsertAllTableDataRequest
class Representation < Google::Apis::Core::JsonRepresentation
property :ignore_unknown_values, as: 'ignoreUnknownValues'
property :kind, as: 'kind'
collection :rows, as: 'rows', class: Google::Apis::BigqueryV2::InsertAllTableDataRequest::Row, decorator: Google::Apis::BigqueryV2::InsertAllTableDataRequest::Row::Representation
property :skip_invalid_rows, as: 'skipInvalidRows'
end
# @private
class Row
class Representation < Google::Apis::Core::JsonRepresentation
property :insert_id, as: 'insertId'
hash :json, as: 'json'
end
end
end
# @private
class InsertAllTableDataResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :insert_errors, as: 'insertErrors', class: Google::Apis::BigqueryV2::InsertAllTableDataResponse::InsertError, decorator: Google::Apis::BigqueryV2::InsertAllTableDataResponse::InsertError::Representation
property :kind, as: 'kind'
end
# @private
class InsertError
class Representation < Google::Apis::Core::JsonRepresentation
collection :errors, as: 'errors', class: Google::Apis::BigqueryV2::ErrorProto, decorator: Google::Apis::BigqueryV2::ErrorProto::Representation
property :index, as: 'index'
end
end
end
# @private
class TableDataList
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :kind, as: 'kind'
property :page_token, as: 'pageToken'
collection :rows, as: 'rows', class: Google::Apis::BigqueryV2::TableRow, decorator: Google::Apis::BigqueryV2::TableRow::Representation
property :total_rows, as: 'totalRows'
end
end
# @private
class TableFieldSchema
class Representation < Google::Apis::Core::JsonRepresentation
property :description, as: 'description'
collection :fields, as: 'fields', class: Google::Apis::BigqueryV2::TableFieldSchema, decorator: Google::Apis::BigqueryV2::TableFieldSchema::Representation
property :mode, as: 'mode'
property :name, as: 'name'
property :type, as: 'type'
end
end
# @private
class TableList
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
collection :tables, as: 'tables', class: Google::Apis::BigqueryV2::TableList::Table, decorator: Google::Apis::BigqueryV2::TableList::Table::Representation
property :total_items, as: 'totalItems'
end
# @private
class Table
class Representation < Google::Apis::Core::JsonRepresentation
property :friendly_name, as: 'friendlyName'
property :id, as: 'id'
property :kind, as: 'kind'
property :table_reference, as: 'tableReference', class: Google::Apis::BigqueryV2::TableReference, decorator: Google::Apis::BigqueryV2::TableReference::Representation
property :type, as: 'type'
end
end
end
# @private
class TableReference
class Representation < Google::Apis::Core::JsonRepresentation
property :dataset_id, as: 'datasetId'
property :project_id, as: 'projectId'
property :table_id, as: 'tableId'
end
end
# @private
class TableRow
class Representation < Google::Apis::Core::JsonRepresentation
collection :f, as: 'f', class: Google::Apis::BigqueryV2::TableCell, decorator: Google::Apis::BigqueryV2::TableCell::Representation
end
end
# @private
class TableSchema
class Representation < Google::Apis::Core::JsonRepresentation
collection :fields, as: 'fields', class: Google::Apis::BigqueryV2::TableFieldSchema, decorator: Google::Apis::BigqueryV2::TableFieldSchema::Representation
end
end
# @private
class ViewDefinition
class Representation < Google::Apis::Core::JsonRepresentation
property :query, as: 'query'
end
end
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,37 @@
# Copyright 2015 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.
require 'google/apis/blogger_v3/service.rb'
require 'google/apis/blogger_v3/classes.rb'
require 'google/apis/blogger_v3/representations.rb'
module Google
module Apis
# Blogger API
#
# API for access to the data within Blogger.
#
# @see https://developers.google.com/blogger/docs/3.0/getting_started
module BloggerV3
VERSION = 'V3'
REVISION = '20150422'
# Manage your Blogger account
AUTH_BLOGGER = 'https://www.googleapis.com/auth/blogger'
# View your Blogger account
AUTH_BLOGGER_READONLY = 'https://www.googleapis.com/auth/blogger.readonly'
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,562 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module BloggerV3
class Blog
class Representation < Google::Apis::Core::JsonRepresentation; end
class Locale
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Pages
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Posts
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class BlogList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class BlogPerUserInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class BlogUserInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Comment
class Representation < Google::Apis::Core::JsonRepresentation; end
class Author
class Representation < Google::Apis::Core::JsonRepresentation; end
class Image
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class Blog
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class InReplyTo
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Post
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class CommentList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Page
class Representation < Google::Apis::Core::JsonRepresentation; end
class Author
class Representation < Google::Apis::Core::JsonRepresentation; end
class Image
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class Blog
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class PageList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Pageviews
class Representation < Google::Apis::Core::JsonRepresentation; end
class Count
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class Post
class Representation < Google::Apis::Core::JsonRepresentation; end
class Author
class Representation < Google::Apis::Core::JsonRepresentation; end
class Image
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class Blog
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Image
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Location
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Replies
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class PostList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PostPerUserInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PostUserInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PostUserInfosList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class User
class Representation < Google::Apis::Core::JsonRepresentation; end
class Blogs
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Locale
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
# @private
class Blog
class Representation < Google::Apis::Core::JsonRepresentation
property :custom_meta_data, as: 'customMetaData'
property :description, as: 'description'
property :id, as: 'id'
property :kind, as: 'kind'
property :locale, as: 'locale', class: Google::Apis::BloggerV3::Blog::Locale, decorator: Google::Apis::BloggerV3::Blog::Locale::Representation
property :name, as: 'name'
property :pages, as: 'pages', class: Google::Apis::BloggerV3::Blog::Pages, decorator: Google::Apis::BloggerV3::Blog::Pages::Representation
property :posts, as: 'posts', class: Google::Apis::BloggerV3::Blog::Posts, decorator: Google::Apis::BloggerV3::Blog::Posts::Representation
property :published, as: 'published', type: DateTime
property :self_link, as: 'selfLink'
property :status, as: 'status'
property :updated, as: 'updated', type: DateTime
property :url, as: 'url'
end
# @private
class Locale
class Representation < Google::Apis::Core::JsonRepresentation
property :country, as: 'country'
property :language, as: 'language'
property :variant, as: 'variant'
end
end
# @private
class Pages
class Representation < Google::Apis::Core::JsonRepresentation
property :self_link, as: 'selfLink'
property :total_items, as: 'totalItems'
end
end
# @private
class Posts
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::BloggerV3::Post, decorator: Google::Apis::BloggerV3::Post::Representation
property :self_link, as: 'selfLink'
property :total_items, as: 'totalItems'
end
end
end
# @private
class BlogList
class Representation < Google::Apis::Core::JsonRepresentation
collection :blog_user_infos, as: 'blogUserInfos', class: Google::Apis::BloggerV3::BlogUserInfo, decorator: Google::Apis::BloggerV3::BlogUserInfo::Representation
collection :items, as: 'items', class: Google::Apis::BloggerV3::Blog, decorator: Google::Apis::BloggerV3::Blog::Representation
property :kind, as: 'kind'
end
end
# @private
class BlogPerUserInfo
class Representation < Google::Apis::Core::JsonRepresentation
property :blog_id, as: 'blogId'
property :has_admin_access, as: 'hasAdminAccess'
property :kind, as: 'kind'
property :photos_album_key, as: 'photosAlbumKey'
property :role, as: 'role'
property :user_id, as: 'userId'
end
end
# @private
class BlogUserInfo
class Representation < Google::Apis::Core::JsonRepresentation
property :blog, as: 'blog', class: Google::Apis::BloggerV3::Blog, decorator: Google::Apis::BloggerV3::Blog::Representation
property :blog_user_info, as: 'blog_user_info', class: Google::Apis::BloggerV3::BlogPerUserInfo, decorator: Google::Apis::BloggerV3::BlogPerUserInfo::Representation
property :kind, as: 'kind'
end
end
# @private
class Comment
class Representation < Google::Apis::Core::JsonRepresentation
property :author, as: 'author', class: Google::Apis::BloggerV3::Comment::Author, decorator: Google::Apis::BloggerV3::Comment::Author::Representation
property :blog, as: 'blog', class: Google::Apis::BloggerV3::Comment::Blog, decorator: Google::Apis::BloggerV3::Comment::Blog::Representation
property :content, as: 'content'
property :id, as: 'id'
property :in_reply_to, as: 'inReplyTo', class: Google::Apis::BloggerV3::Comment::InReplyTo, decorator: Google::Apis::BloggerV3::Comment::InReplyTo::Representation
property :kind, as: 'kind'
property :post, as: 'post', class: Google::Apis::BloggerV3::Comment::Post, decorator: Google::Apis::BloggerV3::Comment::Post::Representation
property :published, as: 'published', type: DateTime
property :self_link, as: 'selfLink'
property :status, as: 'status'
property :updated, as: 'updated', type: DateTime
end
# @private
class Author
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
property :id, as: 'id'
property :image, as: 'image', class: Google::Apis::BloggerV3::Comment::Author::Image, decorator: Google::Apis::BloggerV3::Comment::Author::Image::Representation
property :url, as: 'url'
end
# @private
class Image
class Representation < Google::Apis::Core::JsonRepresentation
property :url, as: 'url'
end
end
end
# @private
class Blog
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
end
end
# @private
class InReplyTo
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
end
end
# @private
class Post
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
end
end
end
# @private
class CommentList
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::BloggerV3::Comment, decorator: Google::Apis::BloggerV3::Comment::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :prev_page_token, as: 'prevPageToken'
end
end
# @private
class Page
class Representation < Google::Apis::Core::JsonRepresentation
property :author, as: 'author', class: Google::Apis::BloggerV3::Page::Author, decorator: Google::Apis::BloggerV3::Page::Author::Representation
property :blog, as: 'blog', class: Google::Apis::BloggerV3::Page::Blog, decorator: Google::Apis::BloggerV3::Page::Blog::Representation
property :content, as: 'content'
property :etag, as: 'etag'
property :id, as: 'id'
property :kind, as: 'kind'
property :published, as: 'published', type: DateTime
property :self_link, as: 'selfLink'
property :status, as: 'status'
property :title, as: 'title'
property :updated, as: 'updated', type: DateTime
property :url, as: 'url'
end
# @private
class Author
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
property :id, as: 'id'
property :image, as: 'image', class: Google::Apis::BloggerV3::Page::Author::Image, decorator: Google::Apis::BloggerV3::Page::Author::Image::Representation
property :url, as: 'url'
end
# @private
class Image
class Representation < Google::Apis::Core::JsonRepresentation
property :url, as: 'url'
end
end
end
# @private
class Blog
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
end
end
end
# @private
class PageList
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::BloggerV3::Page, decorator: Google::Apis::BloggerV3::Page::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class Pageviews
class Representation < Google::Apis::Core::JsonRepresentation
property :blog_id, as: 'blogId'
collection :counts, as: 'counts', class: Google::Apis::BloggerV3::Pageviews::Count, decorator: Google::Apis::BloggerV3::Pageviews::Count::Representation
property :kind, as: 'kind'
end
# @private
class Count
class Representation < Google::Apis::Core::JsonRepresentation
property :count, as: 'count'
property :time_range, as: 'timeRange'
end
end
end
# @private
class Post
class Representation < Google::Apis::Core::JsonRepresentation
property :author, as: 'author', class: Google::Apis::BloggerV3::Post::Author, decorator: Google::Apis::BloggerV3::Post::Author::Representation
property :blog, as: 'blog', class: Google::Apis::BloggerV3::Post::Blog, decorator: Google::Apis::BloggerV3::Post::Blog::Representation
property :content, as: 'content'
property :custom_meta_data, as: 'customMetaData'
property :etag, as: 'etag'
property :id, as: 'id'
collection :images, as: 'images', class: Google::Apis::BloggerV3::Post::Image, decorator: Google::Apis::BloggerV3::Post::Image::Representation
property :kind, as: 'kind'
collection :labels, as: 'labels'
property :location, as: 'location', class: Google::Apis::BloggerV3::Post::Location, decorator: Google::Apis::BloggerV3::Post::Location::Representation
property :published, as: 'published', type: DateTime
property :reader_comments, as: 'readerComments'
property :replies, as: 'replies', class: Google::Apis::BloggerV3::Post::Replies, decorator: Google::Apis::BloggerV3::Post::Replies::Representation
property :self_link, as: 'selfLink'
property :status, as: 'status'
property :title, as: 'title'
property :title_link, as: 'titleLink'
property :updated, as: 'updated', type: DateTime
property :url, as: 'url'
end
# @private
class Author
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
property :id, as: 'id'
property :image, as: 'image', class: Google::Apis::BloggerV3::Post::Author::Image, decorator: Google::Apis::BloggerV3::Post::Author::Image::Representation
property :url, as: 'url'
end
# @private
class Image
class Representation < Google::Apis::Core::JsonRepresentation
property :url, as: 'url'
end
end
end
# @private
class Blog
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
end
end
# @private
class Image
class Representation < Google::Apis::Core::JsonRepresentation
property :url, as: 'url'
end
end
# @private
class Location
class Representation < Google::Apis::Core::JsonRepresentation
property :lat, as: 'lat'
property :lng, as: 'lng'
property :name, as: 'name'
property :span, as: 'span'
end
end
# @private
class Replies
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::BloggerV3::Comment, decorator: Google::Apis::BloggerV3::Comment::Representation
property :self_link, as: 'selfLink'
property :total_items, as: 'totalItems'
end
end
end
# @private
class PostList
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::BloggerV3::Post, decorator: Google::Apis::BloggerV3::Post::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class PostPerUserInfo
class Representation < Google::Apis::Core::JsonRepresentation
property :blog_id, as: 'blogId'
property :has_edit_access, as: 'hasEditAccess'
property :kind, as: 'kind'
property :post_id, as: 'postId'
property :user_id, as: 'userId'
end
end
# @private
class PostUserInfo
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
property :post, as: 'post', class: Google::Apis::BloggerV3::Post, decorator: Google::Apis::BloggerV3::Post::Representation
property :post_user_info, as: 'post_user_info', class: Google::Apis::BloggerV3::PostPerUserInfo, decorator: Google::Apis::BloggerV3::PostPerUserInfo::Representation
end
end
# @private
class PostUserInfosList
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::BloggerV3::PostUserInfo, decorator: Google::Apis::BloggerV3::PostUserInfo::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class User
class Representation < Google::Apis::Core::JsonRepresentation
property :about, as: 'about'
property :blogs, as: 'blogs', class: Google::Apis::BloggerV3::User::Blogs, decorator: Google::Apis::BloggerV3::User::Blogs::Representation
property :created, as: 'created', type: DateTime
property :display_name, as: 'displayName'
property :id, as: 'id'
property :kind, as: 'kind'
property :locale, as: 'locale', class: Google::Apis::BloggerV3::User::Locale, decorator: Google::Apis::BloggerV3::User::Locale::Representation
property :self_link, as: 'selfLink'
property :url, as: 'url'
end
# @private
class Blogs
class Representation < Google::Apis::Core::JsonRepresentation
property :self_link, as: 'selfLink'
end
end
# @private
class Locale
class Representation < Google::Apis::Core::JsonRepresentation
property :country, as: 'country'
property :language, as: 'language'
property :variant, as: 'variant'
end
end
end
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,34 @@
# Copyright 2015 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.
require 'google/apis/books_v1/service.rb'
require 'google/apis/books_v1/classes.rb'
require 'google/apis/books_v1/representations.rb'
module Google
module Apis
# Books API
#
# Lets you search for books and manage your Google Books library.
#
# @see https://developers.google.com/books/docs/v1/getting_started
module BooksV1
VERSION = 'V1'
REVISION = '20150318'
# Manage your books
AUTH_BOOKS = 'https://www.googleapis.com/auth/books'
end
end
end

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,37 @@
# Copyright 2015 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.
require 'google/apis/calendar_v3/service.rb'
require 'google/apis/calendar_v3/classes.rb'
require 'google/apis/calendar_v3/representations.rb'
module Google
module Apis
# Calendar API
#
# Lets you manipulate events and other calendar data.
#
# @see https://developers.google.com/google-apps/calendar/firstapp
module CalendarV3
VERSION = 'V3'
REVISION = '20150408'
# Manage your calendars
AUTH_CALENDAR = 'https://www.googleapis.com/auth/calendar'
# View your calendars
AUTH_CALENDAR_READONLY = 'https://www.googleapis.com/auth/calendar.readonly'
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,560 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CalendarV3
class Acl
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AclRule
class Representation < Google::Apis::Core::JsonRepresentation; end
class Scope
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class Calendar
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class CalendarList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class CalendarListEntry
class Representation < Google::Apis::Core::JsonRepresentation; end
class NotificationSettings
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class CalendarNotification
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Channel
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ColorDefinition
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Colors
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Error
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Event
class Representation < Google::Apis::Core::JsonRepresentation; end
class Creator
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ExtendedProperties
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Gadget
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Organizer
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Reminders
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Source
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class EventAttachment
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class EventAttendee
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class EventDateTime
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class EventReminder
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Events
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class FreeBusyCalendar
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class FreeBusyGroup
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class FreeBusyRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class FreeBusyRequestItem
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class FreeBusyResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Setting
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Settings
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class TimePeriod
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class Acl
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::CalendarV3::AclRule, decorator: Google::Apis::CalendarV3::AclRule::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :next_sync_token, as: 'nextSyncToken'
end
end
# @private
class AclRule
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :id, as: 'id'
property :kind, as: 'kind'
property :role, as: 'role'
property :scope, as: 'scope', class: Google::Apis::CalendarV3::AclRule::Scope, decorator: Google::Apis::CalendarV3::AclRule::Scope::Representation
end
# @private
class Scope
class Representation < Google::Apis::Core::JsonRepresentation
property :type, as: 'type'
property :value, as: 'value'
end
end
end
# @private
class Calendar
class Representation < Google::Apis::Core::JsonRepresentation
property :description, as: 'description'
property :etag, as: 'etag'
property :id, as: 'id'
property :kind, as: 'kind'
property :location, as: 'location'
property :summary, as: 'summary'
property :time_zone, as: 'timeZone'
end
end
# @private
class CalendarList
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::CalendarV3::CalendarListEntry, decorator: Google::Apis::CalendarV3::CalendarListEntry::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :next_sync_token, as: 'nextSyncToken'
end
end
# @private
class CalendarListEntry
class Representation < Google::Apis::Core::JsonRepresentation
property :access_role, as: 'accessRole'
property :background_color, as: 'backgroundColor'
property :color_id, as: 'colorId'
collection :default_reminders, as: 'defaultReminders', class: Google::Apis::CalendarV3::EventReminder, decorator: Google::Apis::CalendarV3::EventReminder::Representation
property :deleted, as: 'deleted'
property :description, as: 'description'
property :etag, as: 'etag'
property :foreground_color, as: 'foregroundColor'
property :hidden, as: 'hidden'
property :id, as: 'id'
property :kind, as: 'kind'
property :location, as: 'location'
property :notification_settings, as: 'notificationSettings', class: Google::Apis::CalendarV3::CalendarListEntry::NotificationSettings, decorator: Google::Apis::CalendarV3::CalendarListEntry::NotificationSettings::Representation
property :primary, as: 'primary'
property :selected, as: 'selected'
property :summary, as: 'summary'
property :summary_override, as: 'summaryOverride'
property :time_zone, as: 'timeZone'
end
# @private
class NotificationSettings
class Representation < Google::Apis::Core::JsonRepresentation
collection :notifications, as: 'notifications', class: Google::Apis::CalendarV3::CalendarNotification, decorator: Google::Apis::CalendarV3::CalendarNotification::Representation
end
end
end
# @private
class CalendarNotification
class Representation < Google::Apis::Core::JsonRepresentation
property :delivery_method, as: 'method'
property :type, as: 'type'
end
end
# @private
class Channel
class Representation < Google::Apis::Core::JsonRepresentation
property :address, as: 'address'
property :expiration, as: 'expiration'
property :id, as: 'id'
property :kind, as: 'kind'
hash :params, as: 'params'
property :payload, as: 'payload'
property :resource_id, as: 'resourceId'
property :resource_uri, as: 'resourceUri'
property :token, as: 'token'
property :type, as: 'type'
end
end
# @private
class ColorDefinition
class Representation < Google::Apis::Core::JsonRepresentation
property :background, as: 'background'
property :foreground, as: 'foreground'
end
end
# @private
class Colors
class Representation < Google::Apis::Core::JsonRepresentation
hash :calendar, as: 'calendar', class: Google::Apis::CalendarV3::ColorDefinition, decorator: Google::Apis::CalendarV3::ColorDefinition::Representation
hash :event, as: 'event', class: Google::Apis::CalendarV3::ColorDefinition, decorator: Google::Apis::CalendarV3::ColorDefinition::Representation
property :kind, as: 'kind'
property :updated, as: 'updated', type: DateTime
end
end
# @private
class Error
class Representation < Google::Apis::Core::JsonRepresentation
property :domain, as: 'domain'
property :reason, as: 'reason'
end
end
# @private
class Event
class Representation < Google::Apis::Core::JsonRepresentation
property :anyone_can_add_self, as: 'anyoneCanAddSelf'
collection :attendees, as: 'attendees', class: Google::Apis::CalendarV3::EventAttendee, decorator: Google::Apis::CalendarV3::EventAttendee::Representation
property :attendees_omitted, as: 'attendeesOmitted'
property :color_id, as: 'colorId'
property :created, as: 'created', type: DateTime
property :creator, as: 'creator', class: Google::Apis::CalendarV3::Event::Creator, decorator: Google::Apis::CalendarV3::Event::Creator::Representation
property :description, as: 'description'
property :end, as: 'end', class: Google::Apis::CalendarV3::EventDateTime, decorator: Google::Apis::CalendarV3::EventDateTime::Representation
property :end_time_unspecified, as: 'endTimeUnspecified'
property :etag, as: 'etag'
property :extended_properties, as: 'extendedProperties', class: Google::Apis::CalendarV3::Event::ExtendedProperties, decorator: Google::Apis::CalendarV3::Event::ExtendedProperties::Representation
property :gadget, as: 'gadget', class: Google::Apis::CalendarV3::Event::Gadget, decorator: Google::Apis::CalendarV3::Event::Gadget::Representation
property :guests_can_invite_others, as: 'guestsCanInviteOthers'
property :guests_can_modify, as: 'guestsCanModify'
property :guests_can_see_other_guests, as: 'guestsCanSeeOtherGuests'
property :hangout_link, as: 'hangoutLink'
property :html_link, as: 'htmlLink'
property :i_cal_uid, as: 'iCalUID'
property :id, as: 'id'
property :kind, as: 'kind'
property :location, as: 'location'
property :locked, as: 'locked'
property :organizer, as: 'organizer', class: Google::Apis::CalendarV3::Event::Organizer, decorator: Google::Apis::CalendarV3::Event::Organizer::Representation
property :original_start_time, as: 'originalStartTime', class: Google::Apis::CalendarV3::EventDateTime, decorator: Google::Apis::CalendarV3::EventDateTime::Representation
property :private_copy, as: 'privateCopy'
collection :recurrence, as: 'recurrence'
property :recurring_event_id, as: 'recurringEventId'
property :reminders, as: 'reminders', class: Google::Apis::CalendarV3::Event::Reminders, decorator: Google::Apis::CalendarV3::Event::Reminders::Representation
property :sequence, as: 'sequence'
property :source, as: 'source', class: Google::Apis::CalendarV3::Event::Source, decorator: Google::Apis::CalendarV3::Event::Source::Representation
property :start, as: 'start', class: Google::Apis::CalendarV3::EventDateTime, decorator: Google::Apis::CalendarV3::EventDateTime::Representation
property :status, as: 'status'
property :summary, as: 'summary'
property :transparency, as: 'transparency'
property :updated, as: 'updated', type: DateTime
property :visibility, as: 'visibility'
end
# @private
class Creator
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
property :email, as: 'email'
property :id, as: 'id'
property :self, as: 'self'
end
end
# @private
class ExtendedProperties
class Representation < Google::Apis::Core::JsonRepresentation
hash :private, as: 'private'
hash :shared, as: 'shared'
end
end
# @private
class Gadget
class Representation < Google::Apis::Core::JsonRepresentation
property :display_mode, as: 'display'
property :height, as: 'height'
property :icon_link, as: 'iconLink'
property :link, as: 'link'
hash :preferences, as: 'preferences'
property :title, as: 'title'
property :type, as: 'type'
property :width, as: 'width'
end
end
# @private
class Organizer
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
property :email, as: 'email'
property :id, as: 'id'
property :self, as: 'self'
end
end
# @private
class Reminders
class Representation < Google::Apis::Core::JsonRepresentation
collection :overrides, as: 'overrides', class: Google::Apis::CalendarV3::EventReminder, decorator: Google::Apis::CalendarV3::EventReminder::Representation
property :use_default, as: 'useDefault'
end
end
# @private
class Source
class Representation < Google::Apis::Core::JsonRepresentation
property :title, as: 'title'
property :url, as: 'url'
end
end
end
# @private
class EventAttachment
class Representation < Google::Apis::Core::JsonRepresentation
end
end
# @private
class EventAttendee
class Representation < Google::Apis::Core::JsonRepresentation
property :additional_guests, as: 'additionalGuests'
property :comment, as: 'comment'
property :display_name, as: 'displayName'
property :email, as: 'email'
property :id, as: 'id'
property :optional, as: 'optional'
property :organizer, as: 'organizer'
property :resource, as: 'resource'
property :response_status, as: 'responseStatus'
property :self, as: 'self'
end
end
# @private
class EventDateTime
class Representation < Google::Apis::Core::JsonRepresentation
property :date, as: 'date', type: Date
property :date_time, as: 'dateTime', type: DateTime
property :time_zone, as: 'timeZone'
end
end
# @private
class EventReminder
class Representation < Google::Apis::Core::JsonRepresentation
property :reminder_method, as: 'method'
property :minutes, as: 'minutes'
end
end
# @private
class Events
class Representation < Google::Apis::Core::JsonRepresentation
property :access_role, as: 'accessRole'
collection :default_reminders, as: 'defaultReminders', class: Google::Apis::CalendarV3::EventReminder, decorator: Google::Apis::CalendarV3::EventReminder::Representation
property :description, as: 'description'
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::CalendarV3::Event, decorator: Google::Apis::CalendarV3::Event::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :next_sync_token, as: 'nextSyncToken'
property :summary, as: 'summary'
property :time_zone, as: 'timeZone'
property :updated, as: 'updated', type: DateTime
end
end
# @private
class FreeBusyCalendar
class Representation < Google::Apis::Core::JsonRepresentation
collection :busy, as: 'busy', class: Google::Apis::CalendarV3::TimePeriod, decorator: Google::Apis::CalendarV3::TimePeriod::Representation
collection :errors, as: 'errors', class: Google::Apis::CalendarV3::Error, decorator: Google::Apis::CalendarV3::Error::Representation
end
end
# @private
class FreeBusyGroup
class Representation < Google::Apis::Core::JsonRepresentation
collection :calendars, as: 'calendars'
collection :errors, as: 'errors', class: Google::Apis::CalendarV3::Error, decorator: Google::Apis::CalendarV3::Error::Representation
end
end
# @private
class FreeBusyRequest
class Representation < Google::Apis::Core::JsonRepresentation
property :calendar_expansion_max, as: 'calendarExpansionMax'
property :group_expansion_max, as: 'groupExpansionMax'
collection :items, as: 'items', class: Google::Apis::CalendarV3::FreeBusyRequestItem, decorator: Google::Apis::CalendarV3::FreeBusyRequestItem::Representation
property :time_max, as: 'timeMax', type: DateTime
property :time_min, as: 'timeMin', type: DateTime
property :time_zone, as: 'timeZone'
end
end
# @private
class FreeBusyRequestItem
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
end
end
# @private
class FreeBusyResponse
class Representation < Google::Apis::Core::JsonRepresentation
hash :calendars, as: 'calendars', class: Google::Apis::CalendarV3::FreeBusyCalendar, decorator: Google::Apis::CalendarV3::FreeBusyCalendar::Representation
hash :groups, as: 'groups', class: Google::Apis::CalendarV3::FreeBusyGroup, decorator: Google::Apis::CalendarV3::FreeBusyGroup::Representation
property :kind, as: 'kind'
property :time_max, as: 'timeMax', type: DateTime
property :time_min, as: 'timeMin', type: DateTime
end
end
# @private
class Setting
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :id, as: 'id'
property :kind, as: 'kind'
property :value, as: 'value'
end
end
# @private
class Settings
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::CalendarV3::Setting, decorator: Google::Apis::CalendarV3::Setting::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :next_sync_token, as: 'nextSyncToken'
end
end
# @private
class TimePeriod
class Representation < Google::Apis::Core::JsonRepresentation
property :end, as: 'end', type: DateTime
property :start, as: 'start', type: DateTime
end
end
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,31 @@
# Copyright 2015 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.
require 'google/apis/civicinfo_v2/service.rb'
require 'google/apis/civicinfo_v2/classes.rb'
require 'google/apis/civicinfo_v2/representations.rb'
module Google
module Apis
# Google Civic Information API
#
# An API for accessing civic information.
#
# @see https://developers.google.com/civic-information
module CivicinfoV2
VERSION = 'V2'
REVISION = '20150302'
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,374 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CivicinfoV2
class AdministrationRegion
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AdministrativeBody
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Candidate
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Channel
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Contest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class SearchDivisionResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class DivisionSearchResult
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Election
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ElectionOfficial
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class QueryElectionsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ElectoralDistrict
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class GeographicDivision
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Office
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Official
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PollingLocation
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class RepresentativeInfoData
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class RepresentativeInfoResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class SimpleAddressType
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Source
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class VoterInfoResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class AdministrationRegion
class Representation < Google::Apis::Core::JsonRepresentation
property :election_administration_body, as: 'electionAdministrationBody', class: Google::Apis::CivicinfoV2::AdministrativeBody, decorator: Google::Apis::CivicinfoV2::AdministrativeBody::Representation
property :id, as: 'id'
property :local_jurisdiction, as: 'local_jurisdiction', class: Google::Apis::CivicinfoV2::AdministrationRegion, decorator: Google::Apis::CivicinfoV2::AdministrationRegion::Representation
property :name, as: 'name'
collection :sources, as: 'sources', class: Google::Apis::CivicinfoV2::Source, decorator: Google::Apis::CivicinfoV2::Source::Representation
end
end
# @private
class AdministrativeBody
class Representation < Google::Apis::Core::JsonRepresentation
property :absentee_voting_info_url, as: 'absenteeVotingInfoUrl'
property :ballot_info_url, as: 'ballotInfoUrl'
property :correspondence_address, as: 'correspondenceAddress', class: Google::Apis::CivicinfoV2::SimpleAddressType, decorator: Google::Apis::CivicinfoV2::SimpleAddressType::Representation
property :election_info_url, as: 'electionInfoUrl'
collection :election_officials, as: 'electionOfficials', class: Google::Apis::CivicinfoV2::ElectionOfficial, decorator: Google::Apis::CivicinfoV2::ElectionOfficial::Representation
property :election_registration_confirmation_url, as: 'electionRegistrationConfirmationUrl'
property :election_registration_url, as: 'electionRegistrationUrl'
property :election_rules_url, as: 'electionRulesUrl'
property :hours_of_operation, as: 'hoursOfOperation'
property :name, as: 'name'
property :physical_address, as: 'physicalAddress', class: Google::Apis::CivicinfoV2::SimpleAddressType, decorator: Google::Apis::CivicinfoV2::SimpleAddressType::Representation
collection :voter_services, as: 'voter_services'
property :voting_location_finder_url, as: 'votingLocationFinderUrl'
end
end
# @private
class Candidate
class Representation < Google::Apis::Core::JsonRepresentation
property :candidate_url, as: 'candidateUrl'
collection :channels, as: 'channels', class: Google::Apis::CivicinfoV2::Channel, decorator: Google::Apis::CivicinfoV2::Channel::Representation
property :email, as: 'email'
property :name, as: 'name'
property :order_on_ballot, as: 'orderOnBallot'
property :party, as: 'party'
property :phone, as: 'phone'
property :photo_url, as: 'photoUrl'
end
end
# @private
class Channel
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :type, as: 'type'
end
end
# @private
class Contest
class Representation < Google::Apis::Core::JsonRepresentation
property :ballot_placement, as: 'ballotPlacement'
collection :candidates, as: 'candidates', class: Google::Apis::CivicinfoV2::Candidate, decorator: Google::Apis::CivicinfoV2::Candidate::Representation
property :district, as: 'district', class: Google::Apis::CivicinfoV2::ElectoralDistrict, decorator: Google::Apis::CivicinfoV2::ElectoralDistrict::Representation
property :electorate_specifications, as: 'electorateSpecifications'
property :id, as: 'id'
collection :level, as: 'level'
property :number_elected, as: 'numberElected'
property :number_voting_for, as: 'numberVotingFor'
property :office, as: 'office'
property :primary_party, as: 'primaryParty'
property :referendum_subtitle, as: 'referendumSubtitle'
property :referendum_title, as: 'referendumTitle'
property :referendum_url, as: 'referendumUrl'
collection :roles, as: 'roles'
collection :sources, as: 'sources', class: Google::Apis::CivicinfoV2::Source, decorator: Google::Apis::CivicinfoV2::Source::Representation
property :special, as: 'special'
property :type, as: 'type'
end
end
# @private
class SearchDivisionResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
collection :results, as: 'results', class: Google::Apis::CivicinfoV2::DivisionSearchResult, decorator: Google::Apis::CivicinfoV2::DivisionSearchResult::Representation
end
end
# @private
class DivisionSearchResult
class Representation < Google::Apis::Core::JsonRepresentation
collection :aliases, as: 'aliases'
property :name, as: 'name'
property :ocd_id, as: 'ocdId'
end
end
# @private
class Election
class Representation < Google::Apis::Core::JsonRepresentation
property :election_day, as: 'electionDay'
property :id, as: 'id'
property :name, as: 'name'
end
end
# @private
class ElectionOfficial
class Representation < Google::Apis::Core::JsonRepresentation
property :email_address, as: 'emailAddress'
property :fax_number, as: 'faxNumber'
property :name, as: 'name'
property :office_phone_number, as: 'officePhoneNumber'
property :title, as: 'title'
end
end
# @private
class QueryElectionsResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :elections, as: 'elections', class: Google::Apis::CivicinfoV2::Election, decorator: Google::Apis::CivicinfoV2::Election::Representation
property :kind, as: 'kind'
end
end
# @private
class ElectoralDistrict
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :name, as: 'name'
property :scope, as: 'scope'
end
end
# @private
class GeographicDivision
class Representation < Google::Apis::Core::JsonRepresentation
collection :also_known_as, as: 'alsoKnownAs'
property :name, as: 'name'
collection :office_indices, as: 'officeIndices'
end
end
# @private
class Office
class Representation < Google::Apis::Core::JsonRepresentation
property :division_id, as: 'divisionId'
collection :levels, as: 'levels'
property :name, as: 'name'
collection :official_indices, as: 'officialIndices'
collection :roles, as: 'roles'
collection :sources, as: 'sources', class: Google::Apis::CivicinfoV2::Source, decorator: Google::Apis::CivicinfoV2::Source::Representation
end
end
# @private
class Official
class Representation < Google::Apis::Core::JsonRepresentation
collection :address, as: 'address', class: Google::Apis::CivicinfoV2::SimpleAddressType, decorator: Google::Apis::CivicinfoV2::SimpleAddressType::Representation
collection :channels, as: 'channels', class: Google::Apis::CivicinfoV2::Channel, decorator: Google::Apis::CivicinfoV2::Channel::Representation
collection :emails, as: 'emails'
property :name, as: 'name'
property :party, as: 'party'
collection :phones, as: 'phones'
property :photo_url, as: 'photoUrl'
collection :urls, as: 'urls'
end
end
# @private
class PollingLocation
class Representation < Google::Apis::Core::JsonRepresentation
property :address, as: 'address', class: Google::Apis::CivicinfoV2::SimpleAddressType, decorator: Google::Apis::CivicinfoV2::SimpleAddressType::Representation
property :end_date, as: 'endDate'
property :id, as: 'id'
property :name, as: 'name'
property :notes, as: 'notes'
property :polling_hours, as: 'pollingHours'
collection :sources, as: 'sources', class: Google::Apis::CivicinfoV2::Source, decorator: Google::Apis::CivicinfoV2::Source::Representation
property :start_date, as: 'startDate'
property :voter_services, as: 'voterServices'
end
end
# @private
class RepresentativeInfoData
class Representation < Google::Apis::Core::JsonRepresentation
hash :divisions, as: 'divisions', class: Google::Apis::CivicinfoV2::GeographicDivision, decorator: Google::Apis::CivicinfoV2::GeographicDivision::Representation
collection :offices, as: 'offices', class: Google::Apis::CivicinfoV2::Office, decorator: Google::Apis::CivicinfoV2::Office::Representation
collection :officials, as: 'officials', class: Google::Apis::CivicinfoV2::Official, decorator: Google::Apis::CivicinfoV2::Official::Representation
end
end
# @private
class RepresentativeInfoResponse
class Representation < Google::Apis::Core::JsonRepresentation
hash :divisions, as: 'divisions', class: Google::Apis::CivicinfoV2::GeographicDivision, decorator: Google::Apis::CivicinfoV2::GeographicDivision::Representation
property :kind, as: 'kind'
property :normalized_input, as: 'normalizedInput', class: Google::Apis::CivicinfoV2::SimpleAddressType, decorator: Google::Apis::CivicinfoV2::SimpleAddressType::Representation
collection :offices, as: 'offices', class: Google::Apis::CivicinfoV2::Office, decorator: Google::Apis::CivicinfoV2::Office::Representation
collection :officials, as: 'officials', class: Google::Apis::CivicinfoV2::Official, decorator: Google::Apis::CivicinfoV2::Official::Representation
end
end
# @private
class SimpleAddressType
class Representation < Google::Apis::Core::JsonRepresentation
property :city, as: 'city'
property :line1, as: 'line1'
property :line2, as: 'line2'
property :line3, as: 'line3'
property :location_name, as: 'locationName'
property :state, as: 'state'
property :zip, as: 'zip'
end
end
# @private
class Source
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :official, as: 'official'
end
end
# @private
class VoterInfoResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :contests, as: 'contests', class: Google::Apis::CivicinfoV2::Contest, decorator: Google::Apis::CivicinfoV2::Contest::Representation
collection :drop_off_locations, as: 'dropOffLocations', class: Google::Apis::CivicinfoV2::PollingLocation, decorator: Google::Apis::CivicinfoV2::PollingLocation::Representation
collection :early_vote_sites, as: 'earlyVoteSites', class: Google::Apis::CivicinfoV2::PollingLocation, decorator: Google::Apis::CivicinfoV2::PollingLocation::Representation
property :election, as: 'election', class: Google::Apis::CivicinfoV2::Election, decorator: Google::Apis::CivicinfoV2::Election::Representation
property :kind, as: 'kind'
property :normalized_input, as: 'normalizedInput', class: Google::Apis::CivicinfoV2::SimpleAddressType, decorator: Google::Apis::CivicinfoV2::SimpleAddressType::Representation
collection :other_elections, as: 'otherElections', class: Google::Apis::CivicinfoV2::Election, decorator: Google::Apis::CivicinfoV2::Election::Representation
collection :polling_locations, as: 'pollingLocations', class: Google::Apis::CivicinfoV2::PollingLocation, decorator: Google::Apis::CivicinfoV2::PollingLocation::Representation
property :precinct_id, as: 'precinctId'
collection :state, as: 'state', class: Google::Apis::CivicinfoV2::AdministrationRegion, decorator: Google::Apis::CivicinfoV2::AdministrationRegion::Representation
end
end
end
end
end

View File

@ -0,0 +1,284 @@
# Copyright 2015 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.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CivicinfoV2
# Google Civic Information API
#
# An API for accessing civic information.
#
# @example
# require 'google/apis/civicinfo_v2'
#
# Civicinfo = Google::Apis::CivicinfoV2 # Alias the module
# service = Civicinfo::CivicInfoService.new
#
# @see https://developers.google.com/civic-information
class CivicInfoService < Google::Apis::Core::BaseService
# @return [String]
# 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.
attr_accessor :key
# @return [String]
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
attr_accessor :quota_user
# @return [String]
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
attr_accessor :user_ip
def initialize
super('https://www.googleapis.com/', 'civicinfo/v2/')
end
# Searches for political divisions by their natural name or OCD ID.
# @param [String] query
# The search query. Queries can cover any parts of a OCD ID or a human readable
# division name. All words given in the query are treated as required patterns.
# In addition to that, most query operators of the Apache Lucene library are
# supported. See http://lucene.apache.org/core/2_9_4/queryparsersyntax.html
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CivicinfoV2::SearchDivisionResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CivicinfoV2::SearchDivisionResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def search_divisions(query: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'divisions'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::CivicinfoV2::SearchDivisionResponse::Representation
command.response_class = Google::Apis::CivicinfoV2::SearchDivisionResponse
command.query['query'] = query unless query.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# List of available elections to query.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CivicinfoV2::QueryElectionsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CivicinfoV2::QueryElectionsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def query_election(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'elections'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::CivicinfoV2::QueryElectionsResponse::Representation
command.response_class = Google::Apis::CivicinfoV2::QueryElectionsResponse
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Looks up information relevant to a voter based on the voter's registered
# address.
# @param [String] address
# The registered address of the voter to look up.
# @param [String] election_id
# The unique ID of the election to look up. A list of election IDs can be
# obtained at https://www.googleapis.com/civicinfo/`version`/elections
# @param [Boolean] official_only
# If set to true, only data from official state sources will be returned.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CivicinfoV2::VoterInfoResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CivicinfoV2::VoterInfoResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def query_voter_info(address: nil, election_id: nil, official_only: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'voterinfo'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::CivicinfoV2::VoterInfoResponse::Representation
command.response_class = Google::Apis::CivicinfoV2::VoterInfoResponse
command.query['address'] = address unless address.nil?
command.query['electionId'] = election_id unless election_id.nil?
command.query['officialOnly'] = official_only unless official_only.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Looks up political geography and representative information for a single
# address.
# @param [String] address
# The address to look up. May only be specified if the field ocdId is not given
# in the URL.
# @param [Boolean] include_offices
# Whether to return information about offices and officials. If false, only the
# top-level district information will be returned.
# @param [Array<String>, String] levels
# A list of office levels to filter by. Only offices that serve at least one of
# these levels will be returned. Divisions that don't contain a matching office
# will not be returned.
# @param [Array<String>, String] roles
# A list of office roles to filter by. Only offices fulfilling one of these
# roles will be returned. Divisions that don't contain a matching office will
# not be returned.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CivicinfoV2::RepresentativeInfoResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CivicinfoV2::RepresentativeInfoResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def representative_info_by_address(address: nil, include_offices: nil, levels: nil, roles: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'representatives'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::CivicinfoV2::RepresentativeInfoResponse::Representation
command.response_class = Google::Apis::CivicinfoV2::RepresentativeInfoResponse
command.query['address'] = address unless address.nil?
command.query['includeOffices'] = include_offices unless include_offices.nil?
command.query['levels'] = levels unless levels.nil?
command.query['roles'] = roles unless roles.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Looks up representative information for a single geographic division.
# @param [String] ocd_id
# The Open Civic Data division identifier of the division to look up.
# @param [Array<String>, String] levels
# A list of office levels to filter by. Only offices that serve at least one of
# these levels will be returned. Divisions that don't contain a matching office
# will not be returned.
# @param [Boolean] recursive
# If true, information about all divisions contained in the division requested
# will be included as well. For example, if querying ocd-division/country:us/
# district:dc, this would also return all DC's wards and ANCs.
# @param [Array<String>, String] roles
# A list of office roles to filter by. Only offices fulfilling one of these
# roles will be returned. Divisions that don't contain a matching office will
# not be returned.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CivicinfoV2::RepresentativeInfoData] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CivicinfoV2::RepresentativeInfoData]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def representative_info_by_division(ocd_id, levels: nil, recursive: nil, roles: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'representatives/{ocdId}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::CivicinfoV2::RepresentativeInfoData::Representation
command.response_class = Google::Apis::CivicinfoV2::RepresentativeInfoData
command.params['ocdId'] = ocd_id unless ocd_id.nil?
command.query['levels'] = levels unless levels.nil?
command.query['recursive'] = recursive unless recursive.nil?
command.query['roles'] = roles unless roles.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
protected
def apply_command_defaults(command)
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
end
end
end
end
end

View File

@ -0,0 +1,34 @@
# Copyright 2015 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.
require 'google/apis/cloudlatencytest_v2/service.rb'
require 'google/apis/cloudlatencytest_v2/classes.rb'
require 'google/apis/cloudlatencytest_v2/representations.rb'
module Google
module Apis
# Google Cloud Network Performance Monitoring API
#
# A Test API to report latency data.
#
# @see
module CloudlatencytestV2
VERSION = 'V2'
REVISION = '20150206'
# View monitoring data for all of your Google Cloud and API projects
AUTH_MONITORING_READONLY = 'https://www.googleapis.com/auth/monitoring.readonly'
end
end
end

View File

@ -0,0 +1,160 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CloudlatencytestV2
#
class AggregatedStats
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `stats`
# @return [Array<Google::Apis::CloudlatencytestV2::Stats>]
attr_accessor :stats
def initialize(**args)
@stats = args[:stats] unless args[:stats].nil?
end
end
#
class AggregatedStatsReply
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `testValue`
# @return [String]
attr_accessor :test_value
def initialize(**args)
@test_value = args[:test_value] unless args[:test_value].nil?
end
end
#
class DoubleValue
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `label`
# @return [String]
attr_accessor :label
#
# Corresponds to the JSON property `value`
# @return [Float]
attr_accessor :value
def initialize(**args)
@label = args[:label] unless args[:label].nil?
@value = args[:value] unless args[:value].nil?
end
end
#
class IntValue
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `label`
# @return [String]
attr_accessor :label
#
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
@label = args[:label] unless args[:label].nil?
@value = args[:value] unless args[:value].nil?
end
end
#
class Stats
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `doubleValues`
# @return [Array<Google::Apis::CloudlatencytestV2::DoubleValue>]
attr_accessor :double_values
#
# Corresponds to the JSON property `intValues`
# @return [Array<Google::Apis::CloudlatencytestV2::IntValue>]
attr_accessor :int_values
#
# Corresponds to the JSON property `stringValues`
# @return [Array<Google::Apis::CloudlatencytestV2::StringValue>]
attr_accessor :string_values
#
# Corresponds to the JSON property `time`
# @return [Float]
attr_accessor :time
def initialize(**args)
@double_values = args[:double_values] unless args[:double_values].nil?
@int_values = args[:int_values] unless args[:int_values].nil?
@string_values = args[:string_values] unless args[:string_values].nil?
@time = args[:time] unless args[:time].nil?
end
end
#
class StatsReply
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `testValue`
# @return [String]
attr_accessor :test_value
def initialize(**args)
@test_value = args[:test_value] unless args[:test_value].nil?
end
end
#
class StringValue
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `label`
# @return [String]
attr_accessor :label
#
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
@label = args[:label] unless args[:label].nil?
@value = args[:value] unless args[:value].nil?
end
end
end
end
end

View File

@ -0,0 +1,80 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CloudlatencytestV2
class AggregatedStatsRepresentation < Google::Apis::Core::JsonRepresentation; end
class AggregatedStatsReplyRepresentation < Google::Apis::Core::JsonRepresentation; end
class DoubleValueRepresentation < Google::Apis::Core::JsonRepresentation; end
class IntValueRepresentation < Google::Apis::Core::JsonRepresentation; end
class StatsRepresentation < Google::Apis::Core::JsonRepresentation; end
class StatsReplyRepresentation < Google::Apis::Core::JsonRepresentation; end
class StringValueRepresentation < Google::Apis::Core::JsonRepresentation; end
# @private
class AggregatedStatsRepresentation < Google::Apis::Core::JsonRepresentation
collection :stats, as: 'stats', class: Google::Apis::CloudlatencytestV2::Stats, decorator: Google::Apis::CloudlatencytestV2::StatsRepresentation
end
# @private
class AggregatedStatsReplyRepresentation < Google::Apis::Core::JsonRepresentation
property :test_value, as: 'testValue'
end
# @private
class DoubleValueRepresentation < Google::Apis::Core::JsonRepresentation
property :label, as: 'label'
property :value, as: 'value'
end
# @private
class IntValueRepresentation < Google::Apis::Core::JsonRepresentation
property :label, as: 'label'
property :value, as: 'value'
end
# @private
class StatsRepresentation < Google::Apis::Core::JsonRepresentation
collection :double_values, as: 'doubleValues', class: Google::Apis::CloudlatencytestV2::DoubleValue, decorator: Google::Apis::CloudlatencytestV2::DoubleValueRepresentation
collection :int_values, as: 'intValues', class: Google::Apis::CloudlatencytestV2::IntValue, decorator: Google::Apis::CloudlatencytestV2::IntValueRepresentation
collection :string_values, as: 'stringValues', class: Google::Apis::CloudlatencytestV2::StringValue, decorator: Google::Apis::CloudlatencytestV2::StringValueRepresentation
property :time, as: 'time'
end
# @private
class StatsReplyRepresentation < Google::Apis::Core::JsonRepresentation
property :test_value, as: 'testValue'
end
# @private
class StringValueRepresentation < Google::Apis::Core::JsonRepresentation
property :label, as: 'label'
property :value, as: 'value'
end
end
end
end

View File

@ -0,0 +1,141 @@
# Copyright 2015 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.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CloudlatencytestV2
# Google Cloud Network Performance Monitoring API
#
# A Test API to report latency data.
#
# @example
# require 'google/apis/cloudlatencytest_v2'
#
# Cloudlatencytest = Google::Apis::CloudlatencytestV2 # Alias the module
# service = Cloudlatencytest::CloudlatencytestService.new
#
# @see
class CloudlatencytestService < Google::Apis::Core::BaseService
# @return [String]
# 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.
attr_accessor :key
# @return [String]
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
attr_accessor :quota_user
# @return [String]
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
attr_accessor :user_ip
def initialize
super('https://cloudlatencytest-pa.googleapis.com/', 'v2/statscollection/')
end
# RPC to update the new TCP stats.
# @param [Google::Apis::CloudlatencytestV2::AggregatedStats] aggregated_stats_obj
#
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Api::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudlatencytestV2::AggregatedStatsReply] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudlatencytestV2::AggregatedStatsReply]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def updateaggregatedstats_statscollection(aggregated_stats_obj, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'updateaggregatedstats'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::CloudlatencytestV2::AggregatedStatsRepresentation
command.request_object = aggregated_stats_obj
command.response_representation = Google::Apis::CloudlatencytestV2::AggregatedStatsReplyRepresentation
command.response_class = Google::Apis::CloudlatencytestV2::AggregatedStatsReply
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# RPC to update the new TCP stats.
# @param [Google::Apis::CloudlatencytestV2::Stats] stats_obj
#
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Api::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudlatencytestV2::StatsReply] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudlatencytestV2::StatsReply]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def updatestats_statscollection(stats_obj, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'updatestats'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::CloudlatencytestV2::StatsRepresentation
command.request_object = stats_obj
command.response_representation = Google::Apis::CloudlatencytestV2::StatsReplyRepresentation
command.response_class = Google::Apis::CloudlatencytestV2::StatsReply
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
protected
def apply_command_defaults(command)
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
end
end
end
end
end

View File

@ -0,0 +1,34 @@
# Copyright 2015 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.
require 'google/apis/cloudmonitoring_v2beta2/service.rb'
require 'google/apis/cloudmonitoring_v2beta2/classes.rb'
require 'google/apis/cloudmonitoring_v2beta2/representations.rb'
module Google
module Apis
# Cloud Monitoring API
#
# API for accessing Google Cloud and API monitoring data.
#
# @see https://cloud.google.com/monitoring/v2beta2/
module CloudmonitoringV2beta2
VERSION = 'V2beta2'
REVISION = '20150616'
# View and write monitoring data for all of your Google and third-party Cloud and API projects
AUTH_MONITORING = 'https://www.googleapis.com/auth/monitoring'
end
end
end

View File

@ -0,0 +1,679 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CloudmonitoringV2beta2
# The response of cloudmonitoring.metricDescriptors.delete.
class DeleteMetricDescriptorResponse
include Google::Apis::Core::Hashable
# Identifies what kind of resource this is. Value: the fixed string "
# cloudmonitoring#deleteMetricDescriptorResponse".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] unless args[:kind].nil?
end
end
# The request of cloudmonitoring.metricDescriptors.list.
class ListMetricDescriptorsRequest
include Google::Apis::Core::Hashable
# Identifies what kind of resource this is. Value: the fixed string "
# cloudmonitoring#listMetricDescriptorsRequest".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] unless args[:kind].nil?
end
end
# The response of cloudmonitoring.metricDescriptors.list.
class ListMetricDescriptorsResponse
include Google::Apis::Core::Hashable
# Identifies what kind of resource this is. Value: the fixed string "
# cloudmonitoring#listMetricDescriptorsResponse".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The returned metric descriptors.
# Corresponds to the JSON property `metrics`
# @return [Array<Google::Apis::CloudmonitoringV2beta2::MetricDescriptor>]
attr_accessor :metrics
# Pagination token. If present, indicates that additional results are available
# for retrieval. To access the results past the pagination limit, pass this
# value to the pageToken query parameter.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] unless args[:kind].nil?
@metrics = args[:metrics] unless args[:metrics].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
# The request of cloudmonitoring.timeseriesDescriptors.list
class ListTimeseriesDescriptorsRequest
include Google::Apis::Core::Hashable
# Identifies what kind of resource this is. Value: the fixed string "
# cloudmonitoring#listTimeseriesDescriptorsRequest".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] unless args[:kind].nil?
end
end
# The response of cloudmonitoring.timeseriesDescriptors.list
class ListTimeseriesDescriptorsResponse
include Google::Apis::Core::Hashable
# Identifies what kind of resource this is. Value: the fixed string "
# cloudmonitoring#listTimeseriesDescriptorsResponse".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Pagination token. If present, indicates that additional results are available
# for retrieval. To access the results past the pagination limit, set this value
# to the pageToken query parameter.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# The oldest timestamp of the interval of this query, as an RFC 3339 string.
# Corresponds to the JSON property `oldest`
# @return [DateTime]
attr_accessor :oldest
# The returned time series descriptors.
# Corresponds to the JSON property `timeseries`
# @return [Array<Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor>]
attr_accessor :timeseries
# The youngest timestamp of the interval of this query, as an RFC 3339 string.
# Corresponds to the JSON property `youngest`
# @return [DateTime]
attr_accessor :youngest
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
@oldest = args[:oldest] unless args[:oldest].nil?
@timeseries = args[:timeseries] unless args[:timeseries].nil?
@youngest = args[:youngest] unless args[:youngest].nil?
end
end
# The request of cloudmonitoring.timeseries.list
class ListTimeseriesRequest
include Google::Apis::Core::Hashable
# Identifies what kind of resource this is. Value: the fixed string "
# cloudmonitoring#listTimeseriesRequest".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] unless args[:kind].nil?
end
end
# The response of cloudmonitoring.timeseries.list
class ListTimeseriesResponse
include Google::Apis::Core::Hashable
# Identifies what kind of resource this is. Value: the fixed string "
# cloudmonitoring#listTimeseriesResponse".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Pagination token. If present, indicates that additional results are available
# for retrieval. To access the results past the pagination limit, set the
# pageToken query parameter to this value. All of the points of a time series
# will be returned before returning any point of the subsequent time series.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# The oldest timestamp of the interval of this query as an RFC 3339 string.
# Corresponds to the JSON property `oldest`
# @return [DateTime]
attr_accessor :oldest
# The returned time series.
# Corresponds to the JSON property `timeseries`
# @return [Array<Google::Apis::CloudmonitoringV2beta2::Timeseries>]
attr_accessor :timeseries
# The youngest timestamp of the interval of this query as an RFC 3339 string.
# Corresponds to the JSON property `youngest`
# @return [DateTime]
attr_accessor :youngest
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
@oldest = args[:oldest] unless args[:oldest].nil?
@timeseries = args[:timeseries] unless args[:timeseries].nil?
@youngest = args[:youngest] unless args[:youngest].nil?
end
end
# A metricDescriptor defines the name, label keys, and data type of a particular
# metric.
class MetricDescriptor
include Google::Apis::Core::Hashable
# Description of this metric.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# Labels defined for this metric.
# Corresponds to the JSON property `labels`
# @return [Array<Google::Apis::CloudmonitoringV2beta2::MetricDescriptorLabelDescriptor>]
attr_accessor :labels
# The name of this metric.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The project ID to which the metric belongs.
# Corresponds to the JSON property `project`
# @return [String]
attr_accessor :project
# A type in a metric contains information about how the metric is collected and
# what its data points look like.
# Corresponds to the JSON property `typeDescriptor`
# @return [Google::Apis::CloudmonitoringV2beta2::MetricDescriptorTypeDescriptor]
attr_accessor :type_descriptor
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@description = args[:description] unless args[:description].nil?
@labels = args[:labels] unless args[:labels].nil?
@name = args[:name] unless args[:name].nil?
@project = args[:project] unless args[:project].nil?
@type_descriptor = args[:type_descriptor] unless args[:type_descriptor].nil?
end
end
# A label in a metric is a description of this metric, including the key of this
# description (what the description is), and the value for this description.
class MetricDescriptorLabelDescriptor
include Google::Apis::Core::Hashable
# Label description.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# Label key.
# Corresponds to the JSON property `key`
# @return [String]
attr_accessor :key
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@description = args[:description] unless args[:description].nil?
@key = args[:key] unless args[:key].nil?
end
end
# A type in a metric contains information about how the metric is collected and
# what its data points look like.
class MetricDescriptorTypeDescriptor
include Google::Apis::Core::Hashable
# The method of collecting data for the metric. See Metric types.
# Corresponds to the JSON property `metricType`
# @return [String]
attr_accessor :metric_type
# The data type of of individual points in the metric's time series. See Metric
# value types.
# Corresponds to the JSON property `valueType`
# @return [String]
attr_accessor :value_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@metric_type = args[:metric_type] unless args[:metric_type].nil?
@value_type = args[:value_type] unless args[:value_type].nil?
end
end
# Point is a single point in a time series. It consists of a start time, an end
# time, and a value.
class Point
include Google::Apis::Core::Hashable
# The value of this data point. Either "true" or "false".
# Corresponds to the JSON property `boolValue`
# @return [Boolean]
attr_accessor :bool_value
alias_method :bool_value?, :bool_value
# Distribution data point value type. When writing distribution points, try to
# be consistent with the boundaries of your buckets. If you must modify the
# bucket boundaries, then do so by merging, partitioning, or appending rather
# than skewing them.
# Corresponds to the JSON property `distributionValue`
# @return [Google::Apis::CloudmonitoringV2beta2::PointDistribution]
attr_accessor :distribution_value
# The value of this data point as a double-precision floating-point number.
# Corresponds to the JSON property `doubleValue`
# @return [Float]
attr_accessor :double_value
# The interval [start, end] is the time period to which the point's value
# applies. For gauge metrics, whose values are instantaneous measurements, this
# interval should be empty (start should equal end). For cumulative metrics (of
# which deltas and rates are special cases), the interval should be non-empty.
# Both start and end are RFC 3339 strings.
# Corresponds to the JSON property `end`
# @return [DateTime]
attr_accessor :end
# The value of this data point as a 64-bit integer.
# Corresponds to the JSON property `int64Value`
# @return [String]
attr_accessor :int64_value
# The interval [start, end] is the time period to which the point's value
# applies. For gauge metrics, whose values are instantaneous measurements, this
# interval should be empty (start should equal end). For cumulative metrics (of
# which deltas and rates are special cases), the interval should be non-empty.
# Both start and end are RFC 3339 strings.
# Corresponds to the JSON property `start`
# @return [DateTime]
attr_accessor :start
# The value of this data point in string format.
# Corresponds to the JSON property `stringValue`
# @return [String]
attr_accessor :string_value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@bool_value = args[:bool_value] unless args[:bool_value].nil?
@distribution_value = args[:distribution_value] unless args[:distribution_value].nil?
@double_value = args[:double_value] unless args[:double_value].nil?
@end = args[:end] unless args[:end].nil?
@int64_value = args[:int64_value] unless args[:int64_value].nil?
@start = args[:start] unless args[:start].nil?
@string_value = args[:string_value] unless args[:string_value].nil?
end
end
# Distribution data point value type. When writing distribution points, try to
# be consistent with the boundaries of your buckets. If you must modify the
# bucket boundaries, then do so by merging, partitioning, or appending rather
# than skewing them.
class PointDistribution
include Google::Apis::Core::Hashable
# The finite buckets.
# Corresponds to the JSON property `buckets`
# @return [Array<Google::Apis::CloudmonitoringV2beta2::PointDistributionBucket>]
attr_accessor :buckets
# The overflow bucket is a special bucket that does not have the upperBound
# field; it includes all of the events that are no less than its lower bound.
# Corresponds to the JSON property `overflowBucket`
# @return [Google::Apis::CloudmonitoringV2beta2::PointDistributionOverflowBucket]
attr_accessor :overflow_bucket
# The underflow bucket is a special bucket that does not have the lowerBound
# field; it includes all of the events that are less than its upper bound.
# Corresponds to the JSON property `underflowBucket`
# @return [Google::Apis::CloudmonitoringV2beta2::PointDistributionUnderflowBucket]
attr_accessor :underflow_bucket
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@buckets = args[:buckets] unless args[:buckets].nil?
@overflow_bucket = args[:overflow_bucket] unless args[:overflow_bucket].nil?
@underflow_bucket = args[:underflow_bucket] unless args[:underflow_bucket].nil?
end
end
# The histogram's bucket. Buckets that form the histogram of a distribution
# value. If the upper bound of a bucket, say U1, does not equal the lower bound
# of the next bucket, say L2, this means that there is no event in [U1, L2).
class PointDistributionBucket
include Google::Apis::Core::Hashable
# The number of events whose values are in the interval defined by this bucket.
# Corresponds to the JSON property `count`
# @return [String]
attr_accessor :count
# The lower bound of the value interval of this bucket (inclusive).
# Corresponds to the JSON property `lowerBound`
# @return [Float]
attr_accessor :lower_bound
# The upper bound of the value interval of this bucket (exclusive).
# Corresponds to the JSON property `upperBound`
# @return [Float]
attr_accessor :upper_bound
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@count = args[:count] unless args[:count].nil?
@lower_bound = args[:lower_bound] unless args[:lower_bound].nil?
@upper_bound = args[:upper_bound] unless args[:upper_bound].nil?
end
end
# The overflow bucket is a special bucket that does not have the upperBound
# field; it includes all of the events that are no less than its lower bound.
class PointDistributionOverflowBucket
include Google::Apis::Core::Hashable
# The number of events whose values are in the interval defined by this bucket.
# Corresponds to the JSON property `count`
# @return [String]
attr_accessor :count
# The lower bound of the value interval of this bucket (inclusive).
# Corresponds to the JSON property `lowerBound`
# @return [Float]
attr_accessor :lower_bound
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@count = args[:count] unless args[:count].nil?
@lower_bound = args[:lower_bound] unless args[:lower_bound].nil?
end
end
# The underflow bucket is a special bucket that does not have the lowerBound
# field; it includes all of the events that are less than its upper bound.
class PointDistributionUnderflowBucket
include Google::Apis::Core::Hashable
# The number of events whose values are in the interval defined by this bucket.
# Corresponds to the JSON property `count`
# @return [String]
attr_accessor :count
# The upper bound of the value interval of this bucket (exclusive).
# Corresponds to the JSON property `upperBound`
# @return [Float]
attr_accessor :upper_bound
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@count = args[:count] unless args[:count].nil?
@upper_bound = args[:upper_bound] unless args[:upper_bound].nil?
end
end
# The monitoring data is organized as metrics and stored as data points that are
# recorded over time. Each data point represents information like the CPU
# utilization of your virtual machine. A historical record of these data points
# is called a time series.
class Timeseries
include Google::Apis::Core::Hashable
# The data points of this time series. The points are listed in order of their
# end timestamp, from younger to older.
# Corresponds to the JSON property `points`
# @return [Array<Google::Apis::CloudmonitoringV2beta2::Point>]
attr_accessor :points
# TimeseriesDescriptor identifies a single time series.
# Corresponds to the JSON property `timeseriesDesc`
# @return [Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor]
attr_accessor :timeseries_desc
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@points = args[:points] unless args[:points].nil?
@timeseries_desc = args[:timeseries_desc] unless args[:timeseries_desc].nil?
end
end
# TimeseriesDescriptor identifies a single time series.
class TimeseriesDescriptor
include Google::Apis::Core::Hashable
# The label's name.
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
# The name of the metric.
# Corresponds to the JSON property `metric`
# @return [String]
attr_accessor :metric
# The Developers Console project number to which this time series belongs.
# Corresponds to the JSON property `project`
# @return [String]
attr_accessor :project
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@labels = args[:labels] unless args[:labels].nil?
@metric = args[:metric] unless args[:metric].nil?
@project = args[:project] unless args[:project].nil?
end
end
#
class TimeseriesDescriptorLabel
include Google::Apis::Core::Hashable
# The label's name.
# Corresponds to the JSON property `key`
# @return [String]
attr_accessor :key
# The label's value.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@key = args[:key] unless args[:key].nil?
@value = args[:value] unless args[:value].nil?
end
end
# When writing time series, TimeseriesPoint should be used instead of Timeseries,
# to enforce single point for each time series in the timeseries.write request.
class TimeseriesPoint
include Google::Apis::Core::Hashable
# Point is a single point in a time series. It consists of a start time, an end
# time, and a value.
# Corresponds to the JSON property `point`
# @return [Google::Apis::CloudmonitoringV2beta2::Point]
attr_accessor :point
# TimeseriesDescriptor identifies a single time series.
# Corresponds to the JSON property `timeseriesDesc`
# @return [Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor]
attr_accessor :timeseries_desc
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@point = args[:point] unless args[:point].nil?
@timeseries_desc = args[:timeseries_desc] unless args[:timeseries_desc].nil?
end
end
# The request of cloudmonitoring.timeseries.write
class WriteTimeseriesRequest
include Google::Apis::Core::Hashable
# The label's name.
# Corresponds to the JSON property `commonLabels`
# @return [Hash<String,String>]
attr_accessor :common_labels
# Provide time series specific labels and the data points for each time series.
# The labels in timeseries and the common_labels should form a complete list of
# labels that required by the metric.
# Corresponds to the JSON property `timeseries`
# @return [Array<Google::Apis::CloudmonitoringV2beta2::TimeseriesPoint>]
attr_accessor :timeseries
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@common_labels = args[:common_labels] unless args[:common_labels].nil?
@timeseries = args[:timeseries] unless args[:timeseries].nil?
end
end
# The response of cloudmonitoring.timeseries.write
class WriteTimeseriesResponse
include Google::Apis::Core::Hashable
# Identifies what kind of resource this is. Value: the fixed string "
# cloudmonitoring#writeTimeseriesResponse".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] unless args[:kind].nil?
end
end
end
end
end

View File

@ -0,0 +1,311 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CloudmonitoringV2beta2
class DeleteMetricDescriptorResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListMetricDescriptorsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListMetricDescriptorsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListTimeseriesDescriptorsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListTimeseriesDescriptorsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListTimeseriesRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListTimeseriesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class MetricDescriptor
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class MetricDescriptorLabelDescriptor
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class MetricDescriptorTypeDescriptor
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Point
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PointDistribution
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PointDistributionBucket
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PointDistributionOverflowBucket
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PointDistributionUnderflowBucket
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Timeseries
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class TimeseriesDescriptor
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class TimeseriesDescriptorLabel
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class TimeseriesPoint
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class WriteTimeseriesRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class WriteTimeseriesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class DeleteMetricDescriptorResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
end
end
# @private
class ListMetricDescriptorsRequest
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
end
end
# @private
class ListMetricDescriptorsResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
collection :metrics, as: 'metrics', class: Google::Apis::CloudmonitoringV2beta2::MetricDescriptor, decorator: Google::Apis::CloudmonitoringV2beta2::MetricDescriptor::Representation
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class ListTimeseriesDescriptorsRequest
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
end
end
# @private
class ListTimeseriesDescriptorsResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :oldest, as: 'oldest', type: DateTime
collection :timeseries, as: 'timeseries', class: Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor, decorator: Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor::Representation
property :youngest, as: 'youngest', type: DateTime
end
end
# @private
class ListTimeseriesRequest
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
end
end
# @private
class ListTimeseriesResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :oldest, as: 'oldest', type: DateTime
collection :timeseries, as: 'timeseries', class: Google::Apis::CloudmonitoringV2beta2::Timeseries, decorator: Google::Apis::CloudmonitoringV2beta2::Timeseries::Representation
property :youngest, as: 'youngest', type: DateTime
end
end
# @private
class MetricDescriptor
class Representation < Google::Apis::Core::JsonRepresentation
property :description, as: 'description'
collection :labels, as: 'labels', class: Google::Apis::CloudmonitoringV2beta2::MetricDescriptorLabelDescriptor, decorator: Google::Apis::CloudmonitoringV2beta2::MetricDescriptorLabelDescriptor::Representation
property :name, as: 'name'
property :project, as: 'project'
property :type_descriptor, as: 'typeDescriptor', class: Google::Apis::CloudmonitoringV2beta2::MetricDescriptorTypeDescriptor, decorator: Google::Apis::CloudmonitoringV2beta2::MetricDescriptorTypeDescriptor::Representation
end
end
# @private
class MetricDescriptorLabelDescriptor
class Representation < Google::Apis::Core::JsonRepresentation
property :description, as: 'description'
property :key, as: 'key'
end
end
# @private
class MetricDescriptorTypeDescriptor
class Representation < Google::Apis::Core::JsonRepresentation
property :metric_type, as: 'metricType'
property :value_type, as: 'valueType'
end
end
# @private
class Point
class Representation < Google::Apis::Core::JsonRepresentation
property :bool_value, as: 'boolValue'
property :distribution_value, as: 'distributionValue', class: Google::Apis::CloudmonitoringV2beta2::PointDistribution, decorator: Google::Apis::CloudmonitoringV2beta2::PointDistribution::Representation
property :double_value, as: 'doubleValue'
property :end, as: 'end', type: DateTime
property :int64_value, as: 'int64Value'
property :start, as: 'start', type: DateTime
property :string_value, as: 'stringValue'
end
end
# @private
class PointDistribution
class Representation < Google::Apis::Core::JsonRepresentation
collection :buckets, as: 'buckets', class: Google::Apis::CloudmonitoringV2beta2::PointDistributionBucket, decorator: Google::Apis::CloudmonitoringV2beta2::PointDistributionBucket::Representation
property :overflow_bucket, as: 'overflowBucket', class: Google::Apis::CloudmonitoringV2beta2::PointDistributionOverflowBucket, decorator: Google::Apis::CloudmonitoringV2beta2::PointDistributionOverflowBucket::Representation
property :underflow_bucket, as: 'underflowBucket', class: Google::Apis::CloudmonitoringV2beta2::PointDistributionUnderflowBucket, decorator: Google::Apis::CloudmonitoringV2beta2::PointDistributionUnderflowBucket::Representation
end
end
# @private
class PointDistributionBucket
class Representation < Google::Apis::Core::JsonRepresentation
property :count, as: 'count'
property :lower_bound, as: 'lowerBound'
property :upper_bound, as: 'upperBound'
end
end
# @private
class PointDistributionOverflowBucket
class Representation < Google::Apis::Core::JsonRepresentation
property :count, as: 'count'
property :lower_bound, as: 'lowerBound'
end
end
# @private
class PointDistributionUnderflowBucket
class Representation < Google::Apis::Core::JsonRepresentation
property :count, as: 'count'
property :upper_bound, as: 'upperBound'
end
end
# @private
class Timeseries
class Representation < Google::Apis::Core::JsonRepresentation
collection :points, as: 'points', class: Google::Apis::CloudmonitoringV2beta2::Point, decorator: Google::Apis::CloudmonitoringV2beta2::Point::Representation
property :timeseries_desc, as: 'timeseriesDesc', class: Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor, decorator: Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor::Representation
end
end
# @private
class TimeseriesDescriptor
class Representation < Google::Apis::Core::JsonRepresentation
hash :labels, as: 'labels'
property :metric, as: 'metric'
property :project, as: 'project'
end
end
# @private
class TimeseriesDescriptorLabel
class Representation < Google::Apis::Core::JsonRepresentation
property :key, as: 'key'
property :value, as: 'value'
end
end
# @private
class TimeseriesPoint
class Representation < Google::Apis::Core::JsonRepresentation
property :point, as: 'point', class: Google::Apis::CloudmonitoringV2beta2::Point, decorator: Google::Apis::CloudmonitoringV2beta2::Point::Representation
property :timeseries_desc, as: 'timeseriesDesc', class: Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor, decorator: Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor::Representation
end
end
# @private
class WriteTimeseriesRequest
class Representation < Google::Apis::Core::JsonRepresentation
hash :common_labels, as: 'commonLabels'
collection :timeseries, as: 'timeseries', class: Google::Apis::CloudmonitoringV2beta2::TimeseriesPoint, decorator: Google::Apis::CloudmonitoringV2beta2::TimeseriesPoint::Representation
end
end
# @private
class WriteTimeseriesResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
end
end
end
end
end

View File

@ -0,0 +1,458 @@
# Copyright 2015 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.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CloudmonitoringV2beta2
# Cloud Monitoring API
#
# API for accessing Google Cloud and API monitoring data.
#
# @example
# require 'google/apis/cloudmonitoring_v2beta2'
#
# Cloudmonitoring = Google::Apis::CloudmonitoringV2beta2 # Alias the module
# service = Cloudmonitoring::CloudMonitoringService.new
#
# @see https://cloud.google.com/monitoring/v2beta2/
class CloudMonitoringService < Google::Apis::Core::BaseService
# @return [String]
# 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.
attr_accessor :key
# @return [String]
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
attr_accessor :quota_user
# @return [String]
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
attr_accessor :user_ip
def initialize
super('https://www.googleapis.com/', 'cloudmonitoring/v2beta2/projects/')
end
# Create a new metric.
# @param [String] project
# The project id. The value can be the numeric project ID or string-based
# project name.
# @param [Google::Apis::CloudmonitoringV2beta2::MetricDescriptor] metric_descriptor_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudmonitoringV2beta2::MetricDescriptor] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudmonitoringV2beta2::MetricDescriptor]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def create_metric_descriptor(project, metric_descriptor_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/metricDescriptors'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::CloudmonitoringV2beta2::MetricDescriptor::Representation
command.request_object = metric_descriptor_object
command.response_representation = Google::Apis::CloudmonitoringV2beta2::MetricDescriptor::Representation
command.response_class = Google::Apis::CloudmonitoringV2beta2::MetricDescriptor
command.params['project'] = project unless project.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Delete an existing metric.
# @param [String] project
# The project ID to which the metric belongs.
# @param [String] metric
# Name of the metric.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudmonitoringV2beta2::DeleteMetricDescriptorResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudmonitoringV2beta2::DeleteMetricDescriptorResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_metric_descriptor(project, metric, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/metricDescriptors/{metric}'
command = make_simple_command(:delete, path, options)
command.response_representation = Google::Apis::CloudmonitoringV2beta2::DeleteMetricDescriptorResponse::Representation
command.response_class = Google::Apis::CloudmonitoringV2beta2::DeleteMetricDescriptorResponse
command.params['project'] = project unless project.nil?
command.params['metric'] = metric unless metric.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# List metric descriptors that match the query. If the query is not set, then
# all of the metric descriptors will be returned. Large responses will be
# paginated, use the nextPageToken returned in the response to request
# subsequent pages of results by setting the pageToken query parameter to the
# value of the nextPageToken.
# @param [String] project
# The project id. The value can be the numeric project ID or string-based
# project name.
# @param [Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsRequest] list_metric_descriptors_request_object
# @param [Fixnum] count
# Maximum number of metric descriptors per page. Used for pagination. If not
# specified, count = 100.
# @param [String] page_token
# The pagination token, which is used to page through large result sets. Set
# this value to the value of the nextPageToken to retrieve the next page of
# results.
# @param [String] query
# The query used to search against existing metrics. Separate keywords with a
# space; the service joins all keywords with AND, meaning that all keywords must
# match for a metric to be returned. If this field is omitted, all metrics are
# returned. If an empty string is passed with this field, no metrics are
# returned.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_metric_descriptors(project, list_metric_descriptors_request_object = nil, count: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/metricDescriptors'
command = make_simple_command(:get, path, options)
command.request_representation = Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsRequest::Representation
command.request_object = list_metric_descriptors_request_object
command.response_representation = Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsResponse::Representation
command.response_class = Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsResponse
command.params['project'] = project unless project.nil?
command.query['count'] = count unless count.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['query'] = query unless query.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# List the data points of the time series that match the metric and labels
# values and that have data points in the interval. Large responses are
# paginated; use the nextPageToken returned in the response to request
# subsequent pages of results by setting the pageToken query parameter to the
# value of the nextPageToken.
# @param [String] project
# The project ID to which this time series belongs. The value can be the numeric
# project ID or string-based project name.
# @param [String] metric
# Metric names are protocol-free URLs as listed in the Supported Metrics page.
# For example, compute.googleapis.com/instance/disk/read_ops_count.
# @param [Google::Apis::CloudmonitoringV2beta2::ListTimeseriesRequest] list_timeseries_request_object
# @param [String] aggregator
# The aggregation function that will reduce the data points in each window to a
# single point. This parameter is only valid for non-cumulative metrics with a
# value type of INT64 or DOUBLE.
# @param [Fixnum] count
# Maximum number of data points per page, which is used for pagination of
# results.
# @param [Array<String>, String] labels
# A collection of labels for the matching time series, which are represented as:
#
# - key==value: key equals the value
# - key=~value: key regex matches the value
# - key!=value: key does not equal the value
# - key!~value: key regex does not match the value For example, to list all of
# the time series descriptors for the region us-central1, you could specify:
# label=cloud.googleapis.com%2Flocation=~us-central1.*
# @param [String] oldest
# Start of the time interval (exclusive), which is expressed as an RFC 3339
# timestamp. If neither oldest nor timespan is specified, the default time
# interval will be (youngest - 4 hours, youngest]
# @param [String] page_token
# The pagination token, which is used to page through large result sets. Set
# this value to the value of the nextPageToken to retrieve the next page of
# results.
# @param [String] timespan
# Length of the time interval to query, which is an alternative way to declare
# the interval: (youngest - timespan, youngest]. The timespan and oldest
# parameters should not be used together. Units:
# - s: second
# - m: minute
# - h: hour
# - d: day
# - w: week Examples: 2s, 3m, 4w. Only one unit is allowed, for example: 2w3d
# is not allowed; you should use 17d instead.
# If neither oldest nor timespan is specified, the default time interval will be
# (youngest - 4 hours, youngest].
# @param [String] window
# The sampling window. At most one data point will be returned for each window
# in the requested time interval. This parameter is only valid for non-
# cumulative metric types. Units:
# - m: minute
# - h: hour
# - d: day
# - w: week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d is
# not allowed; you should use 17d instead.
# @param [String] youngest
# End of the time interval (inclusive), which is expressed as an RFC 3339
# timestamp.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudmonitoringV2beta2::ListTimeseriesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudmonitoringV2beta2::ListTimeseriesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_timeseries(project, metric, list_timeseries_request_object = nil, aggregator: nil, count: nil, labels: nil, oldest: nil, page_token: nil, timespan: nil, window: nil, youngest: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/timeseries/{metric}'
command = make_simple_command(:get, path, options)
command.request_representation = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesRequest::Representation
command.request_object = list_timeseries_request_object
command.response_representation = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesResponse::Representation
command.response_class = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesResponse
command.params['project'] = project unless project.nil?
command.params['metric'] = metric unless metric.nil?
command.query['aggregator'] = aggregator unless aggregator.nil?
command.query['count'] = count unless count.nil?
command.query['labels'] = labels unless labels.nil?
command.query['oldest'] = oldest unless oldest.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['timespan'] = timespan unless timespan.nil?
command.query['window'] = window unless window.nil?
command.query['youngest'] = youngest unless youngest.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Put data points to one or more time series for one or more metrics. If a time
# series does not exist, a new time series will be created. It is not allowed to
# write a time series point that is older than the existing youngest point of
# that time series. Points that are older than the existing youngest point of
# that time series will be discarded silently. Therefore, users should make sure
# that points of a time series are written sequentially in the order of their
# end time.
# @param [String] project
# The project ID. The value can be the numeric project ID or string-based
# project name.
# @param [Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesRequest] write_timeseries_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def write_timeseries(project, write_timeseries_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/timeseries:write'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesRequest::Representation
command.request_object = write_timeseries_request_object
command.response_representation = Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesResponse::Representation
command.response_class = Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesResponse
command.params['project'] = project unless project.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# List the descriptors of the time series that match the metric and labels
# values and that have data points in the interval. Large responses are
# paginated; use the nextPageToken returned in the response to request
# subsequent pages of results by setting the pageToken query parameter to the
# value of the nextPageToken.
# @param [String] project
# The project ID to which this time series belongs. The value can be the numeric
# project ID or string-based project name.
# @param [String] metric
# Metric names are protocol-free URLs as listed in the Supported Metrics page.
# For example, compute.googleapis.com/instance/disk/read_ops_count.
# @param [Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsRequest] list_timeseries_descriptors_request_object
# @param [String] aggregator
# The aggregation function that will reduce the data points in each window to a
# single point. This parameter is only valid for non-cumulative metrics with a
# value type of INT64 or DOUBLE.
# @param [Fixnum] count
# Maximum number of time series descriptors per page. Used for pagination. If
# not specified, count = 100.
# @param [Array<String>, String] labels
# A collection of labels for the matching time series, which are represented as:
#
# - key==value: key equals the value
# - key=~value: key regex matches the value
# - key!=value: key does not equal the value
# - key!~value: key regex does not match the value For example, to list all of
# the time series descriptors for the region us-central1, you could specify:
# label=cloud.googleapis.com%2Flocation=~us-central1.*
# @param [String] oldest
# Start of the time interval (exclusive), which is expressed as an RFC 3339
# timestamp. If neither oldest nor timespan is specified, the default time
# interval will be (youngest - 4 hours, youngest]
# @param [String] page_token
# The pagination token, which is used to page through large result sets. Set
# this value to the value of the nextPageToken to retrieve the next page of
# results.
# @param [String] timespan
# Length of the time interval to query, which is an alternative way to declare
# the interval: (youngest - timespan, youngest]. The timespan and oldest
# parameters should not be used together. Units:
# - s: second
# - m: minute
# - h: hour
# - d: day
# - w: week Examples: 2s, 3m, 4w. Only one unit is allowed, for example: 2w3d
# is not allowed; you should use 17d instead.
# If neither oldest nor timespan is specified, the default time interval will be
# (youngest - 4 hours, youngest].
# @param [String] window
# The sampling window. At most one data point will be returned for each window
# in the requested time interval. This parameter is only valid for non-
# cumulative metric types. Units:
# - m: minute
# - h: hour
# - d: day
# - w: week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d is
# not allowed; you should use 17d instead.
# @param [String] youngest
# End of the time interval (inclusive), which is expressed as an RFC 3339
# timestamp.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_timeseries_descriptors(project, metric, list_timeseries_descriptors_request_object = nil, aggregator: nil, count: nil, labels: nil, oldest: nil, page_token: nil, timespan: nil, window: nil, youngest: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/timeseriesDescriptors/{metric}'
command = make_simple_command(:get, path, options)
command.request_representation = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsRequest::Representation
command.request_object = list_timeseries_descriptors_request_object
command.response_representation = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsResponse::Representation
command.response_class = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsResponse
command.params['project'] = project unless project.nil?
command.params['metric'] = metric unless metric.nil?
command.query['aggregator'] = aggregator unless aggregator.nil?
command.query['count'] = count unless count.nil?
command.query['labels'] = labels unless labels.nil?
command.query['oldest'] = oldest unless oldest.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['timespan'] = timespan unless timespan.nil?
command.query['window'] = window unless window.nil?
command.query['youngest'] = youngest unless youngest.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
protected
def apply_command_defaults(command)
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
end
end
end
end
end

View File

@ -0,0 +1,38 @@
# Copyright 2015 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.
require 'google/apis/cloudresourcemanager_v1beta1/service.rb'
require 'google/apis/cloudresourcemanager_v1beta1/classes.rb'
require 'google/apis/cloudresourcemanager_v1beta1/representations.rb'
module Google
module Apis
# Google Cloud Resource Manager API
#
# The Google Cloud Resource Manager API provides methods for creating, reading,
# and updating of project metadata, including IAM policies, and will shortly
# provide the same for other high-level entities (e.g. customers and resource
# groups). Longer term, we expect the cloudresourcemanager API to encompass
# other Cloud resources as well.
#
# @see https://cloud.google.com/resource-manager
module CloudresourcemanagerV1beta1
VERSION = 'V1beta1'
REVISION = '20150603'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
end
end
end

View File

@ -0,0 +1,139 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CloudresourcemanagerV1beta1
# A Project is a high-level Google Cloud Platform entity. It is a container for
# ACLs, APIs, AppEngine Apps, VMs, and other Google Cloud Platform resources.
# Projects are subordinate to Customers.
class Project
include Google::Apis::Core::Hashable
# The number uniquely identifying the project. Example: 415104041262. Read-only.
# Corresponds to the JSON property `projectNumber`
# @return [String]
attr_accessor :project_number
# The unique, user-assigned id of the project. It must be 6 to 30 lowercase
# letters, digits, or hyphens. It must start with a letter. Trailing hyphens are
# prohibited. Example: "tokyo-rain-123" Read-only after creation.
# Corresponds to the JSON property `projectId`
# @return [String]
attr_accessor :project_id
# The project lifecycle state. Read-only.
# Corresponds to the JSON property `lifecycleState`
# @return [String]
attr_accessor :lifecycle_state
# The user-assigned name of the project. This field is optional and can remain
# unset. Allowed characters are: lower- and upper-case letters, numbers, hyphen,
# single-quote, double-quotes, space, and exclamation point. Example: "My
# Project" Read-write.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Creation time. Read-only.
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# The labels associated with this project. Label keys must be between 1 and 63
# characters long and must conform to the following regular expression: [a-z]([-
# a-z0-9]*[a-z0-9])?. Label values must be between 0 and 63 characters long and
# must conform to the regular expression ([a-z]([-a-z0-9]*[a-z0-9])?)?. No more
# than 256 labels can be associated with a given resource. Note that additional
# character may be included in labels in the future. Clients should store labels
# in a representation such as JSON that does not depend on specific characters
# being disallowed. Example: "environment" : "dev" Read-write.
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@project_number = args[:project_number] unless args[:project_number].nil?
@project_id = args[:project_id] unless args[:project_id].nil?
@lifecycle_state = args[:lifecycle_state] unless args[:lifecycle_state].nil?
@name = args[:name] unless args[:name].nil?
@create_time = args[:create_time] unless args[:create_time].nil?
@labels = args[:labels] unless args[:labels].nil?
end
end
# A page of the response received from the [ListProjects][cloudresourcemanager.
# projects.v1beta1.Projects.ListProjects] method. A paginated response where
# more pages are available has `next_page_token` set. This token can be used in
# a subsequent request to retrieve the next request page.
class ListProjectsResponse
include Google::Apis::Core::Hashable
# The list of projects that matched the list filter. This list can be paginated.
# Corresponds to the JSON property `projects`
# @return [Array<Google::Apis::CloudresourcemanagerV1beta1::Project>]
attr_accessor :projects
# Pagination token. If the result set is too large to fit in a single response,
# this token is returned. It encodes the position of the current result cursor.
# Feeding this value into a new list request with the `page_token` parameter
# gives the next page of the results. When `next_page_token` is not filled in,
# there is no next page and the list returned is the last page in the result set.
# Pagination tokens have a limited lifetime. Note: pagination is not yet
# supported; the server will not set this field.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@projects = args[:projects] unless args[:projects].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
# A generic empty message that you can re-use to avoid defining duplicated empty
# messages in your APIs. A typical example is to use it as the request or the
# response type of an API method. For instance: service Foo ` rpc Bar(google.
# protobuf.Empty) returns (google.protobuf.Empty); `
class Empty
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
end
end
end

View File

@ -0,0 +1,65 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CloudresourcemanagerV1beta1
class Project
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListProjectsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Empty
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class Project
class Representation < Google::Apis::Core::JsonRepresentation
property :project_number, as: 'projectNumber'
property :project_id, as: 'projectId'
property :lifecycle_state, as: 'lifecycleState'
property :name, as: 'name'
property :create_time, as: 'createTime'
hash :labels, as: 'labels'
end
end
# @private
class ListProjectsResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :projects, as: 'projects', class: Google::Apis::CloudresourcemanagerV1beta1::Project, decorator: Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class Empty
class Representation < Google::Apis::Core::JsonRepresentation
end
end
end
end
end

View File

@ -0,0 +1,301 @@
# Copyright 2015 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.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CloudresourcemanagerV1beta1
# Google Cloud Resource Manager API
#
# The Google Cloud Resource Manager API provides methods for creating, reading,
# and updating of project metadata, including IAM policies, and will shortly
# provide the same for other high-level entities (e.g. customers and resource
# groups). Longer term, we expect the cloudresourcemanager API to encompass
# other Cloud resources as well.
#
# @example
# require 'google/apis/cloudresourcemanager_v1beta1'
#
# Cloudresourcemanager = Google::Apis::CloudresourcemanagerV1beta1 # Alias the module
# service = Cloudresourcemanager::CloudresourcemanagerService.new
#
# @see https://cloud.google.com/resource-manager
class CloudresourcemanagerService < Google::Apis::Core::BaseService
# @return [String]
# 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.
attr_accessor :key
# @return [String]
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
attr_accessor :quota_user
def initialize
super('https://cloudresourcemanager.googleapis.com/', '')
end
# Creates a project resource. Initially, the project resource is owned by its
# creator exclusively. The creator can later grant permission to others to read
# or update the project. Several APIs are activated automatically for the
# project, including Google Cloud Storage.
# @param [Google::Apis::CloudresourcemanagerV1beta1::Project] project_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Project] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::Project]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def create_project(project_object = nil, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta1/projects'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
command.request_object = project_object
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Lists projects that are visible to the user and satisfy the specified filter.
# This method returns projects in an unspecified order. New projects do not
# necessarily appear at the end of the list.
# @param [String] page_token
# A pagination token returned from a previous call to ListProject that indicates
# from where listing should continue. Note: pagination is not yet supported; the
# server ignores this field. Optional.
# @param [Fixnum] page_size
# The maximum number of Projects to return in the response. The server can
# return fewer projects than requested. If unspecified, server picks an
# appropriate default. Note: pagination is not yet supported; the server ignores
# this field. Optional.
# @param [String] filter
# An expression for filtering the results of the request. Filter rules are case
# insensitive. The fields eligible for filtering are: name id labels. where is
# a the name of a label Examples: name:* ==> The project has a name. name:Howl ==
# > The projects name is `Howl` or 'howl'. name:HOWL ==> Equivalent to above.
# NAME:howl ==> Equivalent to above. labels.color:* ==> The project has the
# label "color". labels.color:red ==> The projects label `color` has the value `
# red`. labels.color:red label.size:big ==> The project's label `color` has the
# value `red` and its label `size` has the value `big`. Optional.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_projects(page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta1/projects'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['filter'] = filter unless filter.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves the project identified by the specified `project_id` (for example, `
# my-project-123`). The caller must have read permissions for this project.
# @param [String] project_id
# The project ID (for example, `my-project-123`). Required.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Project] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::Project]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_project(project_id, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta1/projects/{projectId}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project
command.params['projectId'] = project_id unless project_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Updates the attributes of the project identified by the specified `project_id`
# (for example, `my-project-123`). The caller must have modify permissions for
# this project.
# @param [String] project_id
# The project ID (for example, `my-project-123`). Required.
# @param [Google::Apis::CloudresourcemanagerV1beta1::Project] project_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Project] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::Project]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_project(project_id, project_object = nil, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta1/projects/{projectId}'
command = make_simple_command(:put, path, options)
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
command.request_object = project_object
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project
command.params['projectId'] = project_id unless project_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Marks the project identified by the specified `project_id` (for example, `my-
# project-123`) for deletion. This method will only affect the project if it has
# a lifecycle state of [ACTIVE][cloudresourcemanager.projects.v1beta2.
# LifecycleState.ACTIVE] when this method is called. Otherwise this method does
# nothing (since all other states are phases of deletion). This method changes
# the project's lifecycle state from [ACTIVE][cloudresourcemanager.projects.
# v1beta2.LifecycleState.ACTIVE] to [DELETE_REQUESTED] [cloudresourcemanager.
# projects.v1beta2.LifecycleState.DELETE_REQUESTED]. The deletion starts at an
# unspecified time, at which point the lifecycle state changes to [
# DELETE_IN_PROGRESS] [cloudresourcemanager.projects.v1beta2.LifecycleState.
# DELETE_IN_PROGRESS]. Until the deletion completes, you can check the lifecycle
# state checked by retrieving the project with [GetProject] [
# cloudresourcemanager.projects.v1beta2.Projects.GetProject], and the project
# remains visible to [ListProjects] [cloudresourcemanager.projects.v1beta2.
# Projects.ListProjects]. However, you cannot update the project. After the
# deletion completes, the project is not retrievable by the [GetProject] [
# cloudresourcemanager.projects.v1beta2.Projects.GetProject] and [ListProjects] [
# cloudresourcemanager.projects.v1beta2.Projects.ListProjects] methods. The
# caller must have modify permissions for this project.
# @param [String] project_id
# The project ID (for example, `foo-bar-123`). Required.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::Empty]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_project(project_id, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta1/projects/{projectId}'
command = make_simple_command(:delete, path, options)
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Empty::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Empty
command.params['projectId'] = project_id unless project_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Restores the project identified by the specified `project_id` (for example, `
# my-project-123`). You can only use this method for a project that has a
# lifecycle state of [DELETE_REQUESTED] [cloudresourcemanager.projects.v1beta2.
# LifecycleState.DELETE_REQUESTED]. After deletion starts, as indicated by a
# lifecycle state of [DELETE_IN_PROGRESS] [cloudresourcemanager.projects.v1beta2.
# LifecycleState.DELETE_IN_PROGRESS], the project cannot be restored. The caller
# must have modify permissions for this project.
# @param [String] project_id
# The project ID (for example, `foo-bar-123`). Required.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::Empty]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def undelete_project(project_id, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta1/projects/{projectId}:undelete'
command = make_simple_command(:post, path, options)
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Empty::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Empty
command.params['projectId'] = project_id unless project_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
protected
def apply_command_defaults(command)
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
end
end
end
end
end

View File

@ -0,0 +1,49 @@
# Copyright 2015 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.
require 'google/apis/compute_v1/service.rb'
require 'google/apis/compute_v1/classes.rb'
require 'google/apis/compute_v1/representations.rb'
module Google
module Apis
# Compute Engine API
#
# API for the Google Compute Engine service.
#
# @see https://developers.google.com/compute/docs/reference/latest/
module ComputeV1
VERSION = 'V1'
REVISION = '20150305'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
# View and manage your Google Compute Engine resources
AUTH_COMPUTE = 'https://www.googleapis.com/auth/compute'
# View your Google Compute Engine resources
AUTH_COMPUTE_READONLY = 'https://www.googleapis.com/auth/compute.readonly'
# Manage your data and permissions in Google Cloud Storage
AUTH_DEVSTORAGE_FULL_CONTROL = 'https://www.googleapis.com/auth/devstorage.full_control'
# View your data in Google Cloud Storage
AUTH_DEVSTORAGE_READ_ONLY = 'https://www.googleapis.com/auth/devstorage.read_only'
# Manage your data in Google Cloud Storage
AUTH_DEVSTORAGE_READ_WRITE = 'https://www.googleapis.com/auth/devstorage.read_write'
end
end
end

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,35 @@
# Copyright 2015 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.
require 'google/apis/container_v1beta1/service.rb'
require 'google/apis/container_v1beta1/classes.rb'
require 'google/apis/container_v1beta1/representations.rb'
module Google
module Apis
# Google Container Engine API
#
# The Google Container Engine API is used for building and managing container
# based applications, powered by the open source Kubernetes technology.
#
# @see https://cloud.google.com/container-engine/docs/v1beta1/
module ContainerV1beta1
VERSION = 'V1beta1'
REVISION = '20150326'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
end
end
end

View File

@ -0,0 +1,466 @@
# Copyright 2015 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module ContainerV1beta1
#
class Cluster
include Google::Apis::Core::Hashable
# The API version of the Kubernetes master and kubelets running in this cluster.
# Leave blank to pick up the latest stable release, or specify a version of the
# form "x.y.z". The Google Container Engine release notes lists the currently
# supported versions. If an incorrect version is specified, the server returns
# an error listing the currently supported versions.
# Corresponds to the JSON property `clusterApiVersion`
# @return [String]
attr_accessor :cluster_api_version
# The IP address range of the container pods in this cluster, in CIDR notation (
# e.g. 10.96.0.0/14). Leave blank to have one automatically chosen or specify a /
# 14 block in 10.0.0.0/8 or 172.16.0.0/12.
# Corresponds to the JSON property `containerIpv4Cidr`
# @return [String]
attr_accessor :container_ipv4_cidr
# [Output only] The time the cluster was created, in RFC3339 text format.
# Corresponds to the JSON property `creationTimestamp`
# @return [String]
attr_accessor :creation_timestamp
# An optional description of this cluster.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# Whether logs from the cluster should be made available via the Google Cloud
# Logging service. This includes both logs from your applications running in the
# cluster as well as logs from the Kubernetes components themselves.
# Corresponds to the JSON property `enableCloudLogging`
# @return [Boolean]
attr_accessor :enable_cloud_logging
alias_method :enable_cloud_logging?, :enable_cloud_logging
# Whether metrics from the cluster should be made available via the Google Cloud
# Monitoring service.
# Corresponds to the JSON property `enableCloudMonitoring`
# @return [Boolean]
attr_accessor :enable_cloud_monitoring
alias_method :enable_cloud_monitoring?, :enable_cloud_monitoring
# [Output only] The IP address of this cluster's Kubernetes master. The endpoint
# can be accessed from the internet at https://username:password@endpoint/.
# See the masterAuth property of this resource for username and password
# information.
# Corresponds to the JSON property `endpoint`
# @return [String]
attr_accessor :endpoint
# [Output only] The resource URLs of [instance groups](/compute/docs/instance-
# groups/) associated with this cluster.
# Corresponds to the JSON property `instanceGroupUrls`
# @return [Array<String>]
attr_accessor :instance_group_urls
# The authentication information for accessing the master. Authentication is
# either done using HTTP basic authentication or using a bearer token.
# Corresponds to the JSON property `masterAuth`
# @return [Google::Apis::ContainerV1beta1::MasterAuth]
attr_accessor :master_auth
# The name of this cluster. The name must be unique within this project and zone,
# and can be up to 40 characters with the following restrictions:
# - Lowercase letters, numbers, and hyphens only.
# - Must start with a letter.
# - Must end with a number or a letter.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The name of the Google Compute Engine network to which the cluster is
# connected.
# Corresponds to the JSON property `network`
# @return [String]
attr_accessor :network
# The machine type and image to use for all nodes in this cluster. See the
# descriptions of the child properties of nodeConfig.
# Corresponds to the JSON property `nodeConfig`
# @return [Google::Apis::ContainerV1beta1::NodeConfig]
attr_accessor :node_config
# [Output only] The size of the address space on each node for hosting
# containers.
# Corresponds to the JSON property `nodeRoutingPrefixSize`
# @return [Fixnum]
attr_accessor :node_routing_prefix_size
# The number of nodes to create in this cluster. You must ensure that your
# Compute Engine resource quota is sufficient for this number of instances plus
# one (to include the master). You must also have available firewall and routes
# quota.
# Corresponds to the JSON property `numNodes`
# @return [Fixnum]
attr_accessor :num_nodes
# [Output only] Server-defined URL for the resource.
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
# [Output only] The IP address range of the Kubernetes services in this cluster,
# in CIDR notation (e.g. 1.2.3.4/29). Service addresses are typically put in
# the last /16 from the container CIDR.
# Corresponds to the JSON property `servicesIpv4Cidr`
# @return [String]
attr_accessor :services_ipv4_cidr
# [Output only] The current status of this cluster.
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
# [Output only] Additional information about the current status of this cluster,
# if available.
# Corresponds to the JSON property `statusMessage`
# @return [String]
attr_accessor :status_message
# [Output only] The name of the Google Compute Engine zone in which the cluster
# resides.
# Corresponds to the JSON property `zone`
# @return [String]
attr_accessor :zone
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@cluster_api_version = args[:cluster_api_version] unless args[:cluster_api_version].nil?
@container_ipv4_cidr = args[:container_ipv4_cidr] unless args[:container_ipv4_cidr].nil?
@creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil?
@description = args[:description] unless args[:description].nil?
@enable_cloud_logging = args[:enable_cloud_logging] unless args[:enable_cloud_logging].nil?
@enable_cloud_monitoring = args[:enable_cloud_monitoring] unless args[:enable_cloud_monitoring].nil?
@endpoint = args[:endpoint] unless args[:endpoint].nil?
@instance_group_urls = args[:instance_group_urls] unless args[:instance_group_urls].nil?
@master_auth = args[:master_auth] unless args[:master_auth].nil?
@name = args[:name] unless args[:name].nil?
@network = args[:network] unless args[:network].nil?
@node_config = args[:node_config] unless args[:node_config].nil?
@node_routing_prefix_size = args[:node_routing_prefix_size] unless args[:node_routing_prefix_size].nil?
@num_nodes = args[:num_nodes] unless args[:num_nodes].nil?
@self_link = args[:self_link] unless args[:self_link].nil?
@services_ipv4_cidr = args[:services_ipv4_cidr] unless args[:services_ipv4_cidr].nil?
@status = args[:status] unless args[:status].nil?
@status_message = args[:status_message] unless args[:status_message].nil?
@zone = args[:zone] unless args[:zone].nil?
end
end
#
class CreateClusterRequest
include Google::Apis::Core::Hashable
# A cluster resource.
# Corresponds to the JSON property `cluster`
# @return [Google::Apis::ContainerV1beta1::Cluster]
attr_accessor :cluster
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@cluster = args[:cluster] unless args[:cluster].nil?
end
end
#
class ListAggregatedClustersResponse
include Google::Apis::Core::Hashable
# A list of clusters in the project, across all zones.
# Corresponds to the JSON property `clusters`
# @return [Array<Google::Apis::ContainerV1beta1::Cluster>]
attr_accessor :clusters
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@clusters = args[:clusters] unless args[:clusters].nil?
end
end
#
class ListAggregatedOperationsResponse
include Google::Apis::Core::Hashable
# A list of operations in the project, across all zones.
# Corresponds to the JSON property `operations`
# @return [Array<Google::Apis::ContainerV1beta1::Operation>]
attr_accessor :operations
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@operations = args[:operations] unless args[:operations].nil?
end
end
#
class ListClustersResponse
include Google::Apis::Core::Hashable
# A list of clusters in the project in the specified zone.
# Corresponds to the JSON property `clusters`
# @return [Array<Google::Apis::ContainerV1beta1::Cluster>]
attr_accessor :clusters
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@clusters = args[:clusters] unless args[:clusters].nil?
end
end
#
class ListOperationsResponse
include Google::Apis::Core::Hashable
# A list of operations in the project in the specified zone.
# Corresponds to the JSON property `operations`
# @return [Array<Google::Apis::ContainerV1beta1::Operation>]
attr_accessor :operations
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@operations = args[:operations] unless args[:operations].nil?
end
end
# The authentication information for accessing the master. Authentication is
# either done using HTTP basic authentication or using a bearer token.
class MasterAuth
include Google::Apis::Core::Hashable
# The token used to authenticate API requests to the master. The token is to be
# included in an HTTP Authorization Header in all requests to the master
# endpoint. The format of the header is: "Authorization: Bearer ".
# Corresponds to the JSON property `bearerToken`
# @return [String]
attr_accessor :bearer_token
# [Output only] Base64 encoded public certificate used by clients to
# authenticate to the cluster endpoint.
# Corresponds to the JSON property `clientCertificate`
# @return [String]
attr_accessor :client_certificate
# [Output only] Base64 encoded private key used by clients to authenticate to
# the cluster endpoint.
# Corresponds to the JSON property `clientKey`
# @return [String]
attr_accessor :client_key
# [Output only] Base64 encoded public certificate that is the root of trust for
# the cluster.
# Corresponds to the JSON property `clusterCaCertificate`
# @return [String]
attr_accessor :cluster_ca_certificate
# The password to use for HTTP basic authentication when accessing the
# Kubernetes master endpoint. Because the master endpoint is open to the
# internet, you should create a strong password.
# Corresponds to the JSON property `password`
# @return [String]
attr_accessor :password
# The username to use for HTTP basic authentication when accessing the
# Kubernetes master endpoint.
# Corresponds to the JSON property `user`
# @return [String]
attr_accessor :user
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@bearer_token = args[:bearer_token] unless args[:bearer_token].nil?
@client_certificate = args[:client_certificate] unless args[:client_certificate].nil?
@client_key = args[:client_key] unless args[:client_key].nil?
@cluster_ca_certificate = args[:cluster_ca_certificate] unless args[:cluster_ca_certificate].nil?
@password = args[:password] unless args[:password].nil?
@user = args[:user] unless args[:user].nil?
end
end
#
class NodeConfig
include Google::Apis::Core::Hashable
# The name of a Google Compute Engine machine type (e.g. n1-standard-1).
# If unspecified, the default machine type is n1-standard-1.
# Corresponds to the JSON property `machineType`
# @return [String]
attr_accessor :machine_type
# The optional list of ServiceAccounts, each with their specified scopes, to be
# made available on all of the node VMs. In addition to the service accounts and
# scopes specified, the "default" account will always be created with the
# following scopes to ensure the correct functioning of the cluster:
# - https://www.googleapis.com/auth/compute,
# - https://www.googleapis.com/auth/devstorage.read_only
# Corresponds to the JSON property `serviceAccounts`
# @return [Array<Google::Apis::ContainerV1beta1::ServiceAccount>]
attr_accessor :service_accounts
# The fully-specified name of a Google Compute Engine image. For example: https:/
# /www.googleapis.com/compute/v1/projects/debian-cloud/global/images/backports-
# debian-7-wheezy-vYYYYMMDD (where YYYMMDD is the version date).
# If specifying an image, you are responsible for ensuring its compatibility
# with the Debian 7 backports image. We recommend leaving this field blank to
# accept the default backports-debian-7-wheezy value.
# Corresponds to the JSON property `sourceImage`
# @return [String]
attr_accessor :source_image
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@machine_type = args[:machine_type] unless args[:machine_type].nil?
@service_accounts = args[:service_accounts] unless args[:service_accounts].nil?
@source_image = args[:source_image] unless args[:source_image].nil?
end
end
# Defines the operation resource. All fields are output only.
class Operation
include Google::Apis::Core::Hashable
# If an error has occurred, a textual description of the error.
# Corresponds to the JSON property `errorMessage`
# @return [String]
attr_accessor :error_message
# The server-assigned ID for the operation.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The operation type.
# Corresponds to the JSON property `operationType`
# @return [String]
attr_accessor :operation_type
# Server-defined URL for the resource.
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
# The current status of the operation.
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
# [Optional] The URL of the cluster resource that this operation is associated
# with.
# Corresponds to the JSON property `target`
# @return [String]
attr_accessor :target
# Server-defined URL for the target of the operation.
# Corresponds to the JSON property `targetLink`
# @return [String]
attr_accessor :target_link
# The name of the Google Compute Engine zone in which the operation is taking
# place.
# Corresponds to the JSON property `zone`
# @return [String]
attr_accessor :zone
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@error_message = args[:error_message] unless args[:error_message].nil?
@name = args[:name] unless args[:name].nil?
@operation_type = args[:operation_type] unless args[:operation_type].nil?
@self_link = args[:self_link] unless args[:self_link].nil?
@status = args[:status] unless args[:status].nil?
@target = args[:target] unless args[:target].nil?
@target_link = args[:target_link] unless args[:target_link].nil?
@zone = args[:zone] unless args[:zone].nil?
end
end
# A Compute Engine service account.
class ServiceAccount
include Google::Apis::Core::Hashable
# Email address of the service account.
# Corresponds to the JSON property `email`
# @return [String]
attr_accessor :email
# The list of scopes to be made available for this service account.
# Corresponds to the JSON property `scopes`
# @return [Array<String>]
attr_accessor :scopes
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@email = args[:email] unless args[:email].nil?
@scopes = args[:scopes] unless args[:scopes].nil?
end
end
end
end
end

Some files were not shown because too many files have changed in this diff Show More