Import refactored library. See MIGRATING.MD for details

This commit is contained in:
Steven Bazyl committed 2015-06-23 15:15:14 -07:00
1 parent 9b7809174d
commit f584a2cec8
373 files changed
+255715 -474

No files matched your search

@@ -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
@@ -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
@@ -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