Import refactored library. See MIGRATING.MD for details
This commit is contained in:
1 parent
9b7809174d
commit
f584a2cec8
373 files changed
+255715
-474
No files matched your search
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in new issue
Block a user