1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505
|
# 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 YoutubeAnalyticsV2
# Empty response.
class EmptyResponse
include Google::Apis::Core::Hashable
# Request Error information. The presence of an error field signals that the
# operation has failed.
# Corresponds to the JSON property `errors`
# @return [Google::Apis::YoutubeAnalyticsV2::Errors]
attr_accessor :errors
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@errors = args[:errors] if args.key?(:errors)
end
end
# Describes one specific error.
class ErrorProto
include Google::Apis::Core::Hashable
# Error arguments, to be used when building user-friendly error messages given
# the error domain and code. Different error codes require different arguments.
# Corresponds to the JSON property `argument`
# @return [Array<String>]
attr_accessor :argument
# Error code in the error domain. This should correspond to a value of the enum
# type whose name is in domain. See the core error domain in error_domain.proto.
# Corresponds to the JSON property `code`
# @return [String]
attr_accessor :code
# Debugging information, which should not be shared externally.
# Corresponds to the JSON property `debugInfo`
# @return [String]
attr_accessor :debug_info
# Error domain. RoSy services can define their own domain and error codes. This
# should normally be the name of an enum type, such as: gdata.CoreErrorDomain
# Corresponds to the JSON property `domain`
# @return [String]
attr_accessor :domain
# A short explanation for the error, which can be shared outside Google. Please
# set domain, code and arguments whenever possible instead of this error message
# so that external APIs can build safe error messages themselves. External
# messages built in a RoSy interface will most likely refer to information and
# concepts that are not available externally and should not be exposed. It is
# safer if external APIs can understand the errors and decide what the error
# message should look like.
# Corresponds to the JSON property `externalErrorMessage`
# @return [String]
attr_accessor :external_error_message
# Location of the error, as specified by the location type. If location_type is
# PATH, this should be a path to a field that's relative to the request, using
# FieldPath notation (net/proto2/util/public/field_path.h). Examples:
# authenticated_user.gaia_id resource.address[2].country
# Corresponds to the JSON property `location`
# @return [String]
attr_accessor :location
#
# Corresponds to the JSON property `locationType`
# @return [String]
attr_accessor :location_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@argument = args[:argument] if args.key?(:argument)
@code = args[:code] if args.key?(:code)
@debug_info = args[:debug_info] if args.key?(:debug_info)
@domain = args[:domain] if args.key?(:domain)
@external_error_message = args[:external_error_message] if args.key?(:external_error_message)
@location = args[:location] if args.key?(:location)
@location_type = args[:location_type] if args.key?(:location_type)
end
end
# Request Error information. The presence of an error field signals that the
# operation has failed.
class Errors
include Google::Apis::Core::Hashable
# Global error code. Deprecated and ignored. Set custom error codes in
# ErrorProto.domain and ErrorProto.code instead.
# Corresponds to the JSON property `code`
# @return [String]
attr_accessor :code
# Specific error description and codes
# Corresponds to the JSON property `error`
# @return [Array<Google::Apis::YoutubeAnalyticsV2::ErrorProto>]
attr_accessor :error
# Request identifier generated by the service, which can be used to identify the
# error in the logs
# 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)
@code = args[:code] if args.key?(:code)
@error = args[:error] if args.key?(:error)
@request_id = args[:request_id] if args.key?(:request_id)
end
end
# A group.
class Group
include Google::Apis::Core::Hashable
# A group's content details.
# Corresponds to the JSON property `contentDetails`
# @return [Google::Apis::YoutubeAnalyticsV2::GroupContentDetails]
attr_accessor :content_details
# Request Error information. The presence of an error field signals that the
# operation has failed.
# Corresponds to the JSON property `errors`
# @return [Google::Apis::YoutubeAnalyticsV2::Errors]
attr_accessor :errors
# The Etag of this resource.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# The ID that YouTube uses to uniquely identify the group.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Identifies the API resource's type. The value will be `youtube#group`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# A group snippet.
# Corresponds to the JSON property `snippet`
# @return [Google::Apis::YoutubeAnalyticsV2::GroupSnippet]
attr_accessor :snippet
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@content_details = args[:content_details] if args.key?(:content_details)
@errors = args[:errors] if args.key?(:errors)
@etag = args[:etag] if args.key?(:etag)
@id = args[:id] if args.key?(:id)
@kind = args[:kind] if args.key?(:kind)
@snippet = args[:snippet] if args.key?(:snippet)
end
end
# A group's content details.
class GroupContentDetails
include Google::Apis::Core::Hashable
# The number of items in the group.
# Corresponds to the JSON property `itemCount`
# @return [Fixnum]
attr_accessor :item_count
# The type of resources that the group contains. Valid values for this property
# are: * `youtube#channel` * `youtube#playlist` * `youtube#video` * `
# youtubePartner#asset`
# Corresponds to the JSON property `itemType`
# @return [String]
attr_accessor :item_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@item_count = args[:item_count] if args.key?(:item_count)
@item_type = args[:item_type] if args.key?(:item_type)
end
end
# A group item.
class GroupItem
include Google::Apis::Core::Hashable
# Request Error information. The presence of an error field signals that the
# operation has failed.
# Corresponds to the JSON property `errors`
# @return [Google::Apis::YoutubeAnalyticsV2::Errors]
attr_accessor :errors
# The Etag of this resource.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# The ID that YouTube uses to uniquely identify the group that contains the item.
# Corresponds to the JSON property `groupId`
# @return [String]
attr_accessor :group_id
# The ID that YouTube uses to uniquely identify the `channel`, `video`, `
# playlist`, or `asset` resource that is included in the group. Note that this
# ID refers specifically to the inclusion of that resource in a particular group
# and is different than the channel ID, video ID, playlist ID, or asset ID that
# uniquely identifies the resource itself. The `resource.id` property's value
# specifies the unique channel, video, playlist, or asset ID.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Identifies the API resource's type. The value will be `youtube#groupItem`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The `resource` object contains information that identifies the item being
# added to the group.
# Corresponds to the JSON property `resource`
# @return [Google::Apis::YoutubeAnalyticsV2::GroupItemResource]
attr_accessor :resource
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@errors = args[:errors] if args.key?(:errors)
@etag = args[:etag] if args.key?(:etag)
@group_id = args[:group_id] if args.key?(:group_id)
@id = args[:id] if args.key?(:id)
@kind = args[:kind] if args.key?(:kind)
@resource = args[:resource] if args.key?(:resource)
end
end
#
class GroupItemResource
include Google::Apis::Core::Hashable
# The channel, video, playlist, or asset ID that YouTube uses to uniquely
# identify the item that is being added to the group.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Identifies the type of resource being added to the group. Valid values for
# this property are: * `youtube#channel` * `youtube#playlist` * `youtube#video` *
# `youtubePartner#asset`
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] if args.key?(:id)
@kind = args[:kind] if args.key?(:kind)
end
end
# A group snippet.
class GroupSnippet
include Google::Apis::Core::Hashable
# The date and time that the group was created. The value is specified in ISO
# 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
# Corresponds to the JSON property `publishedAt`
# @return [String]
attr_accessor :published_at
# The group name. The value must be a non-empty string.
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@published_at = args[:published_at] if args.key?(:published_at)
@title = args[:title] if args.key?(:title)
end
end
# Response message for GroupsService.ListGroupItems.
class ListGroupItemsResponse
include Google::Apis::Core::Hashable
# Request Error information. The presence of an error field signals that the
# operation has failed.
# Corresponds to the JSON property `errors`
# @return [Google::Apis::YoutubeAnalyticsV2::Errors]
attr_accessor :errors
# The Etag of this resource.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# A list of groups that match the API request parameters. Each item in the list
# represents a `groupItem` resource.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::YoutubeAnalyticsV2::GroupItem>]
attr_accessor :items
# Identifies the API resource's type. The value will be `youtube#
# groupItemListResponse`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@errors = args[:errors] if args.key?(:errors)
@etag = args[:etag] if args.key?(:etag)
@items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind)
end
end
# Response message for GroupsService.ListGroups.
class ListGroupsResponse
include Google::Apis::Core::Hashable
# Request Error information. The presence of an error field signals that the
# operation has failed.
# Corresponds to the JSON property `errors`
# @return [Google::Apis::YoutubeAnalyticsV2::Errors]
attr_accessor :errors
# The Etag of this resource.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# A list of groups that match the API request parameters. Each item in the list
# represents a `group` resource.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::YoutubeAnalyticsV2::Group>]
attr_accessor :items
# Identifies the API resource's type. The value will be `youtube#
# groupListResponse`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The token that can be used as the value of the `pageToken` parameter to
# retrieve the next page in the result set.
# 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)
@errors = args[:errors] if args.key?(:errors)
@etag = args[:etag] if args.key?(:etag)
@items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
# Response message for TargetedQueriesService.Query.
class QueryResponse
include Google::Apis::Core::Hashable
# This value specifies information about the data returned in the `rows` fields.
# Each item in the `columnHeaders` list identifies a field returned in the `rows`
# value, which contains a list of comma-delimited data. The `columnHeaders`
# list will begin with the dimensions specified in the API request, which will
# be followed by the metrics specified in the API request. The order of both
# dimensions and metrics will match the ordering in the API request. For example,
# if the API request contains the parameters `dimensions=ageGroup,gender&
# metrics=viewerPercentage`, the API response will return columns in this order:
# `ageGroup`, `gender`, `viewerPercentage`.
# Corresponds to the JSON property `columnHeaders`
# @return [Array<Google::Apis::YoutubeAnalyticsV2::ResultTableColumnHeader>]
attr_accessor :column_headers
# Request Error information. The presence of an error field signals that the
# operation has failed.
# Corresponds to the JSON property `errors`
# @return [Google::Apis::YoutubeAnalyticsV2::Errors]
attr_accessor :errors
# This value specifies the type of data included in the API response. For the
# query method, the kind property value will be `youtubeAnalytics#resultTable`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The list contains all rows of the result table. Each item in the list is an
# array that contains comma-delimited data corresponding to a single row of data.
# The order of the comma-delimited data fields will match the order of the
# columns listed in the `columnHeaders` field. If no data is available for the
# given query, the `rows` element will be omitted from the response. The
# response for a query with the `day` dimension will not contain rows for the
# most recent days.
# Corresponds to the JSON property `rows`
# @return [Array<Array<Object>>]
attr_accessor :rows
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@column_headers = args[:column_headers] if args.key?(:column_headers)
@errors = args[:errors] if args.key?(:errors)
@kind = args[:kind] if args.key?(:kind)
@rows = args[:rows] if args.key?(:rows)
end
end
# The description of a column of the result table.
class ResultTableColumnHeader
include Google::Apis::Core::Hashable
# The type of the column (`DIMENSION` or `METRIC`).
# Corresponds to the JSON property `columnType`
# @return [String]
attr_accessor :column_type
# The type of the data in the column (`STRING`, `INTEGER`, `FLOAT`, etc.).
# Corresponds to the JSON property `dataType`
# @return [String]
attr_accessor :data_type
# The name of the dimension or metric.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@column_type = args[:column_type] if args.key?(:column_type)
@data_type = args[:data_type] if args.key?(:data_type)
@name = args[:name] if args.key?(:name)
end
end
end
end
end
|