Autogenerated update (2017-08-25)
Add: - adexperiencereport_v1 - androiddeviceprovisioning_v1 - androidmanagement_v1 - bigquerydatatransfer_v1 - cloudtrace_v2 - clouduseraccounts_vm_alpha - consumersurveys_v2 - dlp_v2beta1 - oslogin_v1alpha - playcustomapp_v1 - playmoviespartner_v1 - safebrowsing_v4 - spectrum_v1explorer - speech_v1 - streetviewpublish_v1 - vault_v1 - videointelligence_v1beta1 Update: - acceleratedmobilepageurl_v1 - adexchangebuyer2_v2beta1 - adexchangebuyer_v1_4 - adsense_v1_4 - adsensehost_v4_1 - analytics_v3 - analyticsreporting_v4 - androidenterprise_v1 - androidpublisher_v2 - appengine_v1 - appsactivity_v1 - appstate_v1 - bigquery_v2 - calendar_v3 - classroom_v1 - cloudbilling_v1 - cloudbuild_v1 - clouddebugger_v2 - clouderrorreporting_v1beta1 - cloudfunctions_v1 - cloudkms_v1 - cloudmonitoring_v2beta2 - cloudresourcemanager_v1 - compute_beta - compute_v1 - container_v1 - content_v2 - dataflow_v1b3 - dataproc_v1 - datastore_v1 - deploymentmanager_v2 - dfareporting_v2_8 - dns_v1 - doubleclicksearch_v2 - drive_v3 - firebasedynamiclinks_v1 - firebaserules_v1 - fitness_v1 - games_configuration_v1configuration - games_management_v1management - games_v1 - genomics_v1 - gmail_v1 - iam_v1 - identitytoolkit_v3 - language_v1 - logging_v2 - manufacturers_v1 - ml_v1 - monitoring_v3 - oauth2_v2 - partners_v2 - people_v1 - plus_domains_v1 - plus_v1 - proximitybeacon_v1beta1 - pubsub_v1 - runtimeconfig_v1 - script_v1 - searchconsole_v1 - servicecontrol_v1 - servicemanagement_v1 - serviceuser_v1 - sheets_v4 - slides_v1 - sourcerepo_v1 - spanner_v1 - sqladmin_v1beta4 - storage_v1 - storagetransfer_v1 - toolresults_v1beta3 - vision_v1 - webmasters_v3 - youtube_analytics_v1 - youtube_partner_v1 - youtubereporting_v1
This commit is contained in:
1 parent
ce32deabcf
commit
2dd396ce6e
315 files changed
+158012
-116092
No files matched your search
@@ -0,0 +1,736 @@
|
||||
# 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 ConsumersurveysV2
|
||||
|
||||
#
|
||||
class FieldMask
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `fields`
|
||||
# @return [Array<Google::Apis::ConsumersurveysV2::FieldMask>]
|
||||
attr_accessor :fields
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :id
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@fields = args[:fields] if args.key?(:fields)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class MobileAppPanel
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `country`
|
||||
# @return [String]
|
||||
attr_accessor :country
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `isPublicPanel`
|
||||
# @return [Boolean]
|
||||
attr_accessor :is_public_panel
|
||||
alias_method :is_public_panel?, :is_public_panel
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `language`
|
||||
# @return [String]
|
||||
attr_accessor :language
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `mobileAppPanelId`
|
||||
# @return [String]
|
||||
attr_accessor :mobile_app_panel_id
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `owners`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :owners
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@country = args[:country] if args.key?(:country)
|
||||
@is_public_panel = args[:is_public_panel] if args.key?(:is_public_panel)
|
||||
@language = args[:language] if args.key?(:language)
|
||||
@mobile_app_panel_id = args[:mobile_app_panel_id] if args.key?(:mobile_app_panel_id)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@owners = args[:owners] if args.key?(:owners)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class MobileAppPanelsListResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `pageInfo`
|
||||
# @return [Google::Apis::ConsumersurveysV2::PageInfo]
|
||||
attr_accessor :page_info
|
||||
|
||||
# Unique request ID used for logging and debugging. Please include in any error
|
||||
# reporting or troubleshooting requests.
|
||||
# Corresponds to the JSON property `requestId`
|
||||
# @return [String]
|
||||
attr_accessor :request_id
|
||||
|
||||
# An individual predefined panel of Opinion Rewards mobile users.
|
||||
# Corresponds to the JSON property `resources`
|
||||
# @return [Array<Google::Apis::ConsumersurveysV2::MobileAppPanel>]
|
||||
attr_accessor :resources
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `tokenPagination`
|
||||
# @return [Google::Apis::ConsumersurveysV2::TokenPagination]
|
||||
attr_accessor :token_pagination
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@page_info = args[:page_info] if args.key?(:page_info)
|
||||
@request_id = args[:request_id] if args.key?(:request_id)
|
||||
@resources = args[:resources] if args.key?(:resources)
|
||||
@token_pagination = args[:token_pagination] if args.key?(:token_pagination)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class PageInfo
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `resultPerPage`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :result_per_page
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `startIndex`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :start_index
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `totalResults`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :total_results
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@result_per_page = args[:result_per_page] if args.key?(:result_per_page)
|
||||
@start_index = args[:start_index] if args.key?(:start_index)
|
||||
@total_results = args[:total_results] if args.key?(:total_results)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class ResultsGetRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `resultMask`
|
||||
# @return [Google::Apis::ConsumersurveysV2::ResultsMask]
|
||||
attr_accessor :result_mask
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@result_mask = args[:result_mask] if args.key?(:result_mask)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class ResultsMask
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `fields`
|
||||
# @return [Array<Google::Apis::ConsumersurveysV2::FieldMask>]
|
||||
attr_accessor :fields
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `projection`
|
||||
# @return [String]
|
||||
attr_accessor :projection
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@fields = args[:fields] if args.key?(:fields)
|
||||
@projection = args[:projection] if args.key?(:projection)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class Survey
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `audience`
|
||||
# @return [Google::Apis::ConsumersurveysV2::SurveyAudience]
|
||||
attr_accessor :audience
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `cost`
|
||||
# @return [Google::Apis::ConsumersurveysV2::SurveyCost]
|
||||
attr_accessor :cost
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `customerData`
|
||||
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
||||
# @return [String]
|
||||
attr_accessor :customer_data
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `description`
|
||||
# @return [String]
|
||||
attr_accessor :description
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `owners`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :owners
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `questions`
|
||||
# @return [Array<Google::Apis::ConsumersurveysV2::SurveyQuestion>]
|
||||
attr_accessor :questions
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `rejectionReason`
|
||||
# @return [Google::Apis::ConsumersurveysV2::SurveyRejection]
|
||||
attr_accessor :rejection_reason
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `state`
|
||||
# @return [String]
|
||||
attr_accessor :state
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `surveyUrlId`
|
||||
# @return [String]
|
||||
attr_accessor :survey_url_id
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `title`
|
||||
# @return [String]
|
||||
attr_accessor :title
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `wantedResponseCount`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :wanted_response_count
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@audience = args[:audience] if args.key?(:audience)
|
||||
@cost = args[:cost] if args.key?(:cost)
|
||||
@customer_data = args[:customer_data] if args.key?(:customer_data)
|
||||
@description = args[:description] if args.key?(:description)
|
||||
@owners = args[:owners] if args.key?(:owners)
|
||||
@questions = args[:questions] if args.key?(:questions)
|
||||
@rejection_reason = args[:rejection_reason] if args.key?(:rejection_reason)
|
||||
@state = args[:state] if args.key?(:state)
|
||||
@survey_url_id = args[:survey_url_id] if args.key?(:survey_url_id)
|
||||
@title = args[:title] if args.key?(:title)
|
||||
@wanted_response_count = args[:wanted_response_count] if args.key?(:wanted_response_count)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class SurveyAudience
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `ages`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :ages
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `country`
|
||||
# @return [String]
|
||||
attr_accessor :country
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `countrySubdivision`
|
||||
# @return [String]
|
||||
attr_accessor :country_subdivision
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `gender`
|
||||
# @return [String]
|
||||
attr_accessor :gender
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `languages`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :languages
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `mobileAppPanelId`
|
||||
# @return [String]
|
||||
attr_accessor :mobile_app_panel_id
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `populationSource`
|
||||
# @return [String]
|
||||
attr_accessor :population_source
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@ages = args[:ages] if args.key?(:ages)
|
||||
@country = args[:country] if args.key?(:country)
|
||||
@country_subdivision = args[:country_subdivision] if args.key?(:country_subdivision)
|
||||
@gender = args[:gender] if args.key?(:gender)
|
||||
@languages = args[:languages] if args.key?(:languages)
|
||||
@mobile_app_panel_id = args[:mobile_app_panel_id] if args.key?(:mobile_app_panel_id)
|
||||
@population_source = args[:population_source] if args.key?(:population_source)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class SurveyCost
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `costPerResponseNanos`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :cost_per_response_nanos
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `currencyCode`
|
||||
# @return [String]
|
||||
attr_accessor :currency_code
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `maxCostPerResponseNanos`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :max_cost_per_response_nanos
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `nanos`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :nanos
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@cost_per_response_nanos = args[:cost_per_response_nanos] if args.key?(:cost_per_response_nanos)
|
||||
@currency_code = args[:currency_code] if args.key?(:currency_code)
|
||||
@max_cost_per_response_nanos = args[:max_cost_per_response_nanos] if args.key?(:max_cost_per_response_nanos)
|
||||
@nanos = args[:nanos] if args.key?(:nanos)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class SurveyQuestion
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `answerOrder`
|
||||
# @return [String]
|
||||
attr_accessor :answer_order
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `answers`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :answers
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `hasOther`
|
||||
# @return [Boolean]
|
||||
attr_accessor :has_other
|
||||
alias_method :has_other?, :has_other
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `highValueLabel`
|
||||
# @return [String]
|
||||
attr_accessor :high_value_label
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `images`
|
||||
# @return [Array<Google::Apis::ConsumersurveysV2::SurveyQuestionImage>]
|
||||
attr_accessor :images
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `lastAnswerPositionPinned`
|
||||
# @return [Boolean]
|
||||
attr_accessor :last_answer_position_pinned
|
||||
alias_method :last_answer_position_pinned?, :last_answer_position_pinned
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `lowValueLabel`
|
||||
# @return [String]
|
||||
attr_accessor :low_value_label
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `mustPickSuggestion`
|
||||
# @return [Boolean]
|
||||
attr_accessor :must_pick_suggestion
|
||||
alias_method :must_pick_suggestion?, :must_pick_suggestion
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `numStars`
|
||||
# @return [String]
|
||||
attr_accessor :num_stars
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `openTextPlaceholder`
|
||||
# @return [String]
|
||||
attr_accessor :open_text_placeholder
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `openTextSuggestions`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :open_text_suggestions
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `question`
|
||||
# @return [String]
|
||||
attr_accessor :question
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `sentimentText`
|
||||
# @return [String]
|
||||
attr_accessor :sentiment_text
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `singleLineResponse`
|
||||
# @return [Boolean]
|
||||
attr_accessor :single_line_response
|
||||
alias_method :single_line_response?, :single_line_response
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `thresholdAnswers`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :threshold_answers
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `type`
|
||||
# @return [String]
|
||||
attr_accessor :type
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `unitOfMeasurementLabel`
|
||||
# @return [String]
|
||||
attr_accessor :unit_of_measurement_label
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `videoId`
|
||||
# @return [String]
|
||||
attr_accessor :video_id
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@answer_order = args[:answer_order] if args.key?(:answer_order)
|
||||
@answers = args[:answers] if args.key?(:answers)
|
||||
@has_other = args[:has_other] if args.key?(:has_other)
|
||||
@high_value_label = args[:high_value_label] if args.key?(:high_value_label)
|
||||
@images = args[:images] if args.key?(:images)
|
||||
@last_answer_position_pinned = args[:last_answer_position_pinned] if args.key?(:last_answer_position_pinned)
|
||||
@low_value_label = args[:low_value_label] if args.key?(:low_value_label)
|
||||
@must_pick_suggestion = args[:must_pick_suggestion] if args.key?(:must_pick_suggestion)
|
||||
@num_stars = args[:num_stars] if args.key?(:num_stars)
|
||||
@open_text_placeholder = args[:open_text_placeholder] if args.key?(:open_text_placeholder)
|
||||
@open_text_suggestions = args[:open_text_suggestions] if args.key?(:open_text_suggestions)
|
||||
@question = args[:question] if args.key?(:question)
|
||||
@sentiment_text = args[:sentiment_text] if args.key?(:sentiment_text)
|
||||
@single_line_response = args[:single_line_response] if args.key?(:single_line_response)
|
||||
@threshold_answers = args[:threshold_answers] if args.key?(:threshold_answers)
|
||||
@type = args[:type] if args.key?(:type)
|
||||
@unit_of_measurement_label = args[:unit_of_measurement_label] if args.key?(:unit_of_measurement_label)
|
||||
@video_id = args[:video_id] if args.key?(:video_id)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class SurveyQuestionImage
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `altText`
|
||||
# @return [String]
|
||||
attr_accessor :alt_text
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `data`
|
||||
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
||||
# @return [String]
|
||||
attr_accessor :data
|
||||
|
||||
#
|
||||
# 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)
|
||||
@alt_text = args[:alt_text] if args.key?(:alt_text)
|
||||
@data = args[:data] if args.key?(:data)
|
||||
@url = args[:url] if args.key?(:url)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class SurveyRejection
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `explanation`
|
||||
# @return [String]
|
||||
attr_accessor :explanation
|
||||
|
||||
#
|
||||
# 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)
|
||||
@explanation = args[:explanation] if args.key?(:explanation)
|
||||
@type = args[:type] if args.key?(:type)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class SurveyResults
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `status`
|
||||
# @return [String]
|
||||
attr_accessor :status
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `surveyUrlId`
|
||||
# @return [String]
|
||||
attr_accessor :survey_url_id
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@status = args[:status] if args.key?(:status)
|
||||
@survey_url_id = args[:survey_url_id] if args.key?(:survey_url_id)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class SurveysDeleteResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Unique request ID used for logging and debugging. Please include in any error
|
||||
# reporting or troubleshooting requests.
|
||||
# Corresponds to the JSON property `requestId`
|
||||
# @return [String]
|
||||
attr_accessor :request_id
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@request_id = args[:request_id] if args.key?(:request_id)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class SurveysListResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `pageInfo`
|
||||
# @return [Google::Apis::ConsumersurveysV2::PageInfo]
|
||||
attr_accessor :page_info
|
||||
|
||||
# Unique request ID used for logging and debugging. Please include in any error
|
||||
# reporting or troubleshooting requests.
|
||||
# Corresponds to the JSON property `requestId`
|
||||
# @return [String]
|
||||
attr_accessor :request_id
|
||||
|
||||
# An individual survey resource.
|
||||
# Corresponds to the JSON property `resources`
|
||||
# @return [Array<Google::Apis::ConsumersurveysV2::Survey>]
|
||||
attr_accessor :resources
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `tokenPagination`
|
||||
# @return [Google::Apis::ConsumersurveysV2::TokenPagination]
|
||||
attr_accessor :token_pagination
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@page_info = args[:page_info] if args.key?(:page_info)
|
||||
@request_id = args[:request_id] if args.key?(:request_id)
|
||||
@resources = args[:resources] if args.key?(:resources)
|
||||
@token_pagination = args[:token_pagination] if args.key?(:token_pagination)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class SurveysStartRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Threshold to start a survey automically if the quoted prices is less than or
|
||||
# equal to this value. See Survey.Cost for more details.
|
||||
# Corresponds to the JSON property `maxCostPerResponseNanos`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :max_cost_per_response_nanos
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@max_cost_per_response_nanos = args[:max_cost_per_response_nanos] if args.key?(:max_cost_per_response_nanos)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class SurveysStartResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Unique request ID used for logging and debugging. Please include in any error
|
||||
# reporting or troubleshooting requests.
|
||||
# Corresponds to the JSON property `requestId`
|
||||
# @return [String]
|
||||
attr_accessor :request_id
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@request_id = args[:request_id] if args.key?(:request_id)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class SurveysStopResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Unique request ID used for logging and debugging. Please include in any error
|
||||
# reporting or troubleshooting requests.
|
||||
# Corresponds to the JSON property `requestId`
|
||||
# @return [String]
|
||||
attr_accessor :request_id
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@request_id = args[:request_id] if args.key?(:request_id)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class TokenPagination
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `nextPageToken`
|
||||
# @return [String]
|
||||
attr_accessor :next_page_token
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `previousPageToken`
|
||||
# @return [String]
|
||||
attr_accessor :previous_page_token
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
||||
@previous_page_token = args[:previous_page_token] if args.key?(:previous_page_token)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,343 @@
|
||||
# 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 ConsumersurveysV2
|
||||
|
||||
class FieldMask
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class MobileAppPanel
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class MobileAppPanelsListResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class PageInfo
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ResultsGetRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ResultsMask
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Survey
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SurveyAudience
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SurveyCost
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SurveyQuestion
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SurveyQuestionImage
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SurveyRejection
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SurveyResults
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SurveysDeleteResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SurveysListResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SurveysStartRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SurveysStartResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SurveysStopResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class TokenPagination
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class FieldMask
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :fields, as: 'fields', class: Google::Apis::ConsumersurveysV2::FieldMask, decorator: Google::Apis::ConsumersurveysV2::FieldMask::Representation
|
||||
|
||||
property :id, as: 'id'
|
||||
end
|
||||
end
|
||||
|
||||
class MobileAppPanel
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :country, as: 'country'
|
||||
property :is_public_panel, as: 'isPublicPanel'
|
||||
property :language, as: 'language'
|
||||
property :mobile_app_panel_id, as: 'mobileAppPanelId'
|
||||
property :name, as: 'name'
|
||||
collection :owners, as: 'owners'
|
||||
end
|
||||
end
|
||||
|
||||
class MobileAppPanelsListResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :page_info, as: 'pageInfo', class: Google::Apis::ConsumersurveysV2::PageInfo, decorator: Google::Apis::ConsumersurveysV2::PageInfo::Representation
|
||||
|
||||
property :request_id, as: 'requestId'
|
||||
collection :resources, as: 'resources', class: Google::Apis::ConsumersurveysV2::MobileAppPanel, decorator: Google::Apis::ConsumersurveysV2::MobileAppPanel::Representation
|
||||
|
||||
property :token_pagination, as: 'tokenPagination', class: Google::Apis::ConsumersurveysV2::TokenPagination, decorator: Google::Apis::ConsumersurveysV2::TokenPagination::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class PageInfo
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :result_per_page, as: 'resultPerPage'
|
||||
property :start_index, as: 'startIndex'
|
||||
property :total_results, as: 'totalResults'
|
||||
end
|
||||
end
|
||||
|
||||
class ResultsGetRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :result_mask, as: 'resultMask', class: Google::Apis::ConsumersurveysV2::ResultsMask, decorator: Google::Apis::ConsumersurveysV2::ResultsMask::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class ResultsMask
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :fields, as: 'fields', class: Google::Apis::ConsumersurveysV2::FieldMask, decorator: Google::Apis::ConsumersurveysV2::FieldMask::Representation
|
||||
|
||||
property :projection, as: 'projection'
|
||||
end
|
||||
end
|
||||
|
||||
class Survey
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :audience, as: 'audience', class: Google::Apis::ConsumersurveysV2::SurveyAudience, decorator: Google::Apis::ConsumersurveysV2::SurveyAudience::Representation
|
||||
|
||||
property :cost, as: 'cost', class: Google::Apis::ConsumersurveysV2::SurveyCost, decorator: Google::Apis::ConsumersurveysV2::SurveyCost::Representation
|
||||
|
||||
property :customer_data, :base64 => true, as: 'customerData'
|
||||
property :description, as: 'description'
|
||||
collection :owners, as: 'owners'
|
||||
collection :questions, as: 'questions', class: Google::Apis::ConsumersurveysV2::SurveyQuestion, decorator: Google::Apis::ConsumersurveysV2::SurveyQuestion::Representation
|
||||
|
||||
property :rejection_reason, as: 'rejectionReason', class: Google::Apis::ConsumersurveysV2::SurveyRejection, decorator: Google::Apis::ConsumersurveysV2::SurveyRejection::Representation
|
||||
|
||||
property :state, as: 'state'
|
||||
property :survey_url_id, as: 'surveyUrlId'
|
||||
property :title, as: 'title'
|
||||
property :wanted_response_count, as: 'wantedResponseCount'
|
||||
end
|
||||
end
|
||||
|
||||
class SurveyAudience
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :ages, as: 'ages'
|
||||
property :country, as: 'country'
|
||||
property :country_subdivision, as: 'countrySubdivision'
|
||||
property :gender, as: 'gender'
|
||||
collection :languages, as: 'languages'
|
||||
property :mobile_app_panel_id, as: 'mobileAppPanelId'
|
||||
property :population_source, as: 'populationSource'
|
||||
end
|
||||
end
|
||||
|
||||
class SurveyCost
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cost_per_response_nanos, :numeric_string => true, as: 'costPerResponseNanos'
|
||||
property :currency_code, as: 'currencyCode'
|
||||
property :max_cost_per_response_nanos, :numeric_string => true, as: 'maxCostPerResponseNanos'
|
||||
property :nanos, :numeric_string => true, as: 'nanos'
|
||||
end
|
||||
end
|
||||
|
||||
class SurveyQuestion
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :answer_order, as: 'answerOrder'
|
||||
collection :answers, as: 'answers'
|
||||
property :has_other, as: 'hasOther'
|
||||
property :high_value_label, as: 'highValueLabel'
|
||||
collection :images, as: 'images', class: Google::Apis::ConsumersurveysV2::SurveyQuestionImage, decorator: Google::Apis::ConsumersurveysV2::SurveyQuestionImage::Representation
|
||||
|
||||
property :last_answer_position_pinned, as: 'lastAnswerPositionPinned'
|
||||
property :low_value_label, as: 'lowValueLabel'
|
||||
property :must_pick_suggestion, as: 'mustPickSuggestion'
|
||||
property :num_stars, as: 'numStars'
|
||||
property :open_text_placeholder, as: 'openTextPlaceholder'
|
||||
collection :open_text_suggestions, as: 'openTextSuggestions'
|
||||
property :question, as: 'question'
|
||||
property :sentiment_text, as: 'sentimentText'
|
||||
property :single_line_response, as: 'singleLineResponse'
|
||||
collection :threshold_answers, as: 'thresholdAnswers'
|
||||
property :type, as: 'type'
|
||||
property :unit_of_measurement_label, as: 'unitOfMeasurementLabel'
|
||||
property :video_id, as: 'videoId'
|
||||
end
|
||||
end
|
||||
|
||||
class SurveyQuestionImage
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :alt_text, as: 'altText'
|
||||
property :data, :base64 => true, as: 'data'
|
||||
property :url, as: 'url'
|
||||
end
|
||||
end
|
||||
|
||||
class SurveyRejection
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :explanation, as: 'explanation'
|
||||
property :type, as: 'type'
|
||||
end
|
||||
end
|
||||
|
||||
class SurveyResults
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :status, as: 'status'
|
||||
property :survey_url_id, as: 'surveyUrlId'
|
||||
end
|
||||
end
|
||||
|
||||
class SurveysDeleteResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :request_id, as: 'requestId'
|
||||
end
|
||||
end
|
||||
|
||||
class SurveysListResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :page_info, as: 'pageInfo', class: Google::Apis::ConsumersurveysV2::PageInfo, decorator: Google::Apis::ConsumersurveysV2::PageInfo::Representation
|
||||
|
||||
property :request_id, as: 'requestId'
|
||||
collection :resources, as: 'resources', class: Google::Apis::ConsumersurveysV2::Survey, decorator: Google::Apis::ConsumersurveysV2::Survey::Representation
|
||||
|
||||
property :token_pagination, as: 'tokenPagination', class: Google::Apis::ConsumersurveysV2::TokenPagination, decorator: Google::Apis::ConsumersurveysV2::TokenPagination::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class SurveysStartRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :max_cost_per_response_nanos, :numeric_string => true, as: 'maxCostPerResponseNanos'
|
||||
end
|
||||
end
|
||||
|
||||
class SurveysStartResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :request_id, as: 'requestId'
|
||||
end
|
||||
end
|
||||
|
||||
class SurveysStopResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :request_id, as: 'requestId'
|
||||
end
|
||||
end
|
||||
|
||||
class TokenPagination
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
property :previous_page_token, as: 'previousPageToken'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,478 @@
|
||||
# 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 ConsumersurveysV2
|
||||
# Consumer Surveys API
|
||||
#
|
||||
# Creates and conducts surveys, lists the surveys that an authenticated user
|
||||
# owns, and retrieves survey results and information about specified surveys.
|
||||
#
|
||||
# @example
|
||||
# require 'google/apis/consumersurveys_v2'
|
||||
#
|
||||
# Consumersurveys = Google::Apis::ConsumersurveysV2 # Alias the module
|
||||
# service = Consumersurveys::ConsumerSurveysService.new
|
||||
#
|
||||
class ConsumerSurveysService < 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/', 'consumersurveys/v2/')
|
||||
@batch_path = 'batch'
|
||||
end
|
||||
|
||||
# Retrieves a MobileAppPanel that is available to the authenticated user.
|
||||
# @param [String] panel_id
|
||||
# External URL ID for the panel.
|
||||
# @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::ConsumersurveysV2::MobileAppPanel] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ConsumersurveysV2::MobileAppPanel]
|
||||
#
|
||||
# @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_mobileapppanel(panel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'mobileAppPanels/{panelId}', options)
|
||||
command.response_representation = Google::Apis::ConsumersurveysV2::MobileAppPanel::Representation
|
||||
command.response_class = Google::Apis::ConsumersurveysV2::MobileAppPanel
|
||||
command.params['panelId'] = panel_id unless panel_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
|
||||
|
||||
# Lists the MobileAppPanels available to the authenticated user.
|
||||
# @param [Fixnum] max_results
|
||||
# @param [Fixnum] start_index
|
||||
# @param [String] 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::ConsumersurveysV2::MobileAppPanelsListResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ConsumersurveysV2::MobileAppPanelsListResponse]
|
||||
#
|
||||
# @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_mobileapppanels(max_results: nil, start_index: nil, token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'mobileAppPanels', options)
|
||||
command.response_representation = Google::Apis::ConsumersurveysV2::MobileAppPanelsListResponse::Representation
|
||||
command.response_class = Google::Apis::ConsumersurveysV2::MobileAppPanelsListResponse
|
||||
command.query['maxResults'] = max_results unless max_results.nil?
|
||||
command.query['startIndex'] = start_index unless start_index.nil?
|
||||
command.query['token'] = token unless 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
|
||||
|
||||
# Updates a MobileAppPanel. Currently the only property that can be updated is
|
||||
# the owners property.
|
||||
# @param [String] panel_id
|
||||
# External URL ID for the panel.
|
||||
# @param [Google::Apis::ConsumersurveysV2::MobileAppPanel] mobile_app_panel_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::ConsumersurveysV2::MobileAppPanel] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ConsumersurveysV2::MobileAppPanel]
|
||||
#
|
||||
# @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_mobileapppanel(panel_id, mobile_app_panel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:put, 'mobileAppPanels/{panelId}', options)
|
||||
command.request_representation = Google::Apis::ConsumersurveysV2::MobileAppPanel::Representation
|
||||
command.request_object = mobile_app_panel_object
|
||||
command.response_representation = Google::Apis::ConsumersurveysV2::MobileAppPanel::Representation
|
||||
command.response_class = Google::Apis::ConsumersurveysV2::MobileAppPanel
|
||||
command.params['panelId'] = panel_id unless panel_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 any survey results that have been produced so far. Results are
|
||||
# formatted as an Excel file. You must add "?alt=media" to the URL as an
|
||||
# argument to get results.
|
||||
# @param [String] survey_url_id
|
||||
# External URL ID for the survey.
|
||||
# @param [Google::Apis::ConsumersurveysV2::ResultsGetRequest] results_get_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 [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::ConsumersurveysV2::SurveyResults] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ConsumersurveysV2::SurveyResults]
|
||||
#
|
||||
# @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_result(survey_url_id, results_get_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
||||
if download_dest.nil?
|
||||
command = make_simple_command(:get, 'surveys/{surveyUrlId}/results', options)
|
||||
else
|
||||
command = make_download_command(:get, 'surveys/{surveyUrlId}/results', options)
|
||||
command.download_dest = download_dest
|
||||
end
|
||||
command.request_representation = Google::Apis::ConsumersurveysV2::ResultsGetRequest::Representation
|
||||
command.request_object = results_get_request_object
|
||||
command.response_representation = Google::Apis::ConsumersurveysV2::SurveyResults::Representation
|
||||
command.response_class = Google::Apis::ConsumersurveysV2::SurveyResults
|
||||
command.params['surveyUrlId'] = survey_url_id unless survey_url_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
|
||||
|
||||
# Removes a survey from view in all user GET requests.
|
||||
# @param [String] survey_url_id
|
||||
# External URL ID for the survey.
|
||||
# @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::ConsumersurveysV2::SurveysDeleteResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ConsumersurveysV2::SurveysDeleteResponse]
|
||||
#
|
||||
# @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_survey(survey_url_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:delete, 'surveys/{surveyUrlId}', options)
|
||||
command.response_representation = Google::Apis::ConsumersurveysV2::SurveysDeleteResponse::Representation
|
||||
command.response_class = Google::Apis::ConsumersurveysV2::SurveysDeleteResponse
|
||||
command.params['surveyUrlId'] = survey_url_id unless survey_url_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 information about the specified survey.
|
||||
# @param [String] survey_url_id
|
||||
# External URL ID for the survey.
|
||||
# @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::ConsumersurveysV2::Survey] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ConsumersurveysV2::Survey]
|
||||
#
|
||||
# @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_survey(survey_url_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'surveys/{surveyUrlId}', options)
|
||||
command.response_representation = Google::Apis::ConsumersurveysV2::Survey::Representation
|
||||
command.response_class = Google::Apis::ConsumersurveysV2::Survey
|
||||
command.params['surveyUrlId'] = survey_url_id unless survey_url_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
|
||||
|
||||
# Creates a survey.
|
||||
# @param [Google::Apis::ConsumersurveysV2::Survey] survey_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::ConsumersurveysV2::Survey] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ConsumersurveysV2::Survey]
|
||||
#
|
||||
# @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_survey(survey_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'surveys', options)
|
||||
command.request_representation = Google::Apis::ConsumersurveysV2::Survey::Representation
|
||||
command.request_object = survey_object
|
||||
command.response_representation = Google::Apis::ConsumersurveysV2::Survey::Representation
|
||||
command.response_class = Google::Apis::ConsumersurveysV2::Survey
|
||||
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 the surveys owned by the authenticated user.
|
||||
# @param [Fixnum] max_results
|
||||
# @param [Fixnum] start_index
|
||||
# @param [String] 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::ConsumersurveysV2::SurveysListResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ConsumersurveysV2::SurveysListResponse]
|
||||
#
|
||||
# @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_surveys(max_results: nil, start_index: nil, token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'surveys', options)
|
||||
command.response_representation = Google::Apis::ConsumersurveysV2::SurveysListResponse::Representation
|
||||
command.response_class = Google::Apis::ConsumersurveysV2::SurveysListResponse
|
||||
command.query['maxResults'] = max_results unless max_results.nil?
|
||||
command.query['startIndex'] = start_index unless start_index.nil?
|
||||
command.query['token'] = token unless 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
|
||||
|
||||
# Begins running a survey.
|
||||
# @param [String] resource_id
|
||||
# @param [Google::Apis::ConsumersurveysV2::SurveysStartRequest] surveys_start_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::ConsumersurveysV2::SurveysStartResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ConsumersurveysV2::SurveysStartResponse]
|
||||
#
|
||||
# @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 start_survey(resource_id, surveys_start_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'surveys/{resourceId}/start', options)
|
||||
command.request_representation = Google::Apis::ConsumersurveysV2::SurveysStartRequest::Representation
|
||||
command.request_object = surveys_start_request_object
|
||||
command.response_representation = Google::Apis::ConsumersurveysV2::SurveysStartResponse::Representation
|
||||
command.response_class = Google::Apis::ConsumersurveysV2::SurveysStartResponse
|
||||
command.params['resourceId'] = resource_id unless resource_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
|
||||
|
||||
# Stops a running survey.
|
||||
# @param [String] resource_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::ConsumersurveysV2::SurveysStopResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ConsumersurveysV2::SurveysStopResponse]
|
||||
#
|
||||
# @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_survey(resource_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'surveys/{resourceId}/stop', options)
|
||||
command.response_representation = Google::Apis::ConsumersurveysV2::SurveysStopResponse::Representation
|
||||
command.response_class = Google::Apis::ConsumersurveysV2::SurveysStopResponse
|
||||
command.params['resourceId'] = resource_id unless resource_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 a survey. Currently the only property that can be updated is the
|
||||
# owners property.
|
||||
# @param [String] survey_url_id
|
||||
# External URL ID for the survey.
|
||||
# @param [Google::Apis::ConsumersurveysV2::Survey] survey_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::ConsumersurveysV2::Survey] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ConsumersurveysV2::Survey]
|
||||
#
|
||||
# @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_survey(survey_url_id, survey_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:put, 'surveys/{surveyUrlId}', options)
|
||||
command.request_representation = Google::Apis::ConsumersurveysV2::Survey::Representation
|
||||
command.request_object = survey_object
|
||||
command.response_representation = Google::Apis::ConsumersurveysV2::Survey::Representation
|
||||
command.response_class = Google::Apis::ConsumersurveysV2::Survey
|
||||
command.params['surveyUrlId'] = survey_url_id unless survey_url_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
|
||||
Reference in new issue
Block a user