From 7dda305d1645e88ef218d0d412d12647e3ea1eb0 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Wed, 25 Apr 2018 00:36:07 +0000 Subject: [PATCH] Autogenerated update (2018-04-25) Update: - androidmanagement_v1 - classroom_v1 - cloudiot_v1 - cloudtasks_v2beta2 - speech_v1 --- api_names_out.yaml | 234 ++++++ generated/google/apis/androidmanagement_v1.rb | 2 +- .../apis/androidmanagement_v1/classes.rb | 6 +- generated/google/apis/classroom_v1.rb | 2 +- generated/google/apis/classroom_v1/classes.rb | 2 +- generated/google/apis/cloudiot_v1.rb | 2 +- generated/google/apis/cloudiot_v1/classes.rb | 34 +- generated/google/apis/cloudtasks_v2beta2.rb | 2 +- .../google/apis/cloudtasks_v2beta2/classes.rb | 2 +- generated/google/apis/speech_v1.rb | 2 +- generated/google/apis/speech_v1/classes.rb | 12 + .../google/apis/speech_v1/representations.rb | 1 + .../google/apis/websecurityscanner_v1alpha.rb | 34 + .../websecurityscanner_v1alpha/classes.rb | 760 ++++++++++++++++++ .../representations.rb | 354 ++++++++ .../websecurityscanner_v1alpha/service.rb | 548 +++++++++++++ generated/google/apis/youtube_analytics_v2.rb | 46 ++ .../apis/youtube_analytics_v2/classes.rb | 532 ++++++++++++ .../youtube_analytics_v2/representations.rb | 232 ++++++ .../apis/youtube_analytics_v2/service.rb | 478 +++++++++++ 20 files changed, 3269 insertions(+), 16 deletions(-) create mode 100644 generated/google/apis/websecurityscanner_v1alpha.rb create mode 100644 generated/google/apis/websecurityscanner_v1alpha/classes.rb create mode 100644 generated/google/apis/websecurityscanner_v1alpha/representations.rb create mode 100644 generated/google/apis/websecurityscanner_v1alpha/service.rb create mode 100644 generated/google/apis/youtube_analytics_v2.rb create mode 100644 generated/google/apis/youtube_analytics_v2/classes.rb create mode 100644 generated/google/apis/youtube_analytics_v2/representations.rb create mode 100644 generated/google/apis/youtube_analytics_v2/service.rb diff --git a/api_names_out.yaml b/api_names_out.yaml index 9c1a8a704..36e8523f3 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -68493,6 +68493,7 @@ "/speech:v1/Status/message": message "/speech:v1/WordInfo": word_info "/speech:v1/WordInfo/endTime": end_time +"/speech:v1/WordInfo/speakerTag": speaker_tag "/speech:v1/WordInfo/startTime": start_time "/speech:v1/WordInfo/word": word "/speech:v1/fields": fields @@ -75628,6 +75629,140 @@ "/webmasters:v3/webmasters.urlcrawlerrorssamples.markAsFixed/platform": platform "/webmasters:v3/webmasters.urlcrawlerrorssamples.markAsFixed/siteUrl": site_url "/webmasters:v3/webmasters.urlcrawlerrorssamples.markAsFixed/url": url +"/websecurityscanner:v1alpha/Authentication": authentication +"/websecurityscanner:v1alpha/Authentication/customAccount": custom_account +"/websecurityscanner:v1alpha/Authentication/googleAccount": google_account +"/websecurityscanner:v1alpha/CrawledUrl": crawled_url +"/websecurityscanner:v1alpha/CrawledUrl/body": body +"/websecurityscanner:v1alpha/CrawledUrl/httpMethod": http_method +"/websecurityscanner:v1alpha/CrawledUrl/url": url +"/websecurityscanner:v1alpha/CustomAccount": custom_account +"/websecurityscanner:v1alpha/CustomAccount/loginUrl": login_url +"/websecurityscanner:v1alpha/CustomAccount/password": password +"/websecurityscanner:v1alpha/CustomAccount/username": username +"/websecurityscanner:v1alpha/Empty": empty +"/websecurityscanner:v1alpha/Finding": finding +"/websecurityscanner:v1alpha/Finding/body": body +"/websecurityscanner:v1alpha/Finding/description": description +"/websecurityscanner:v1alpha/Finding/finalUrl": final_url +"/websecurityscanner:v1alpha/Finding/findingType": finding_type +"/websecurityscanner:v1alpha/Finding/frameUrl": frame_url +"/websecurityscanner:v1alpha/Finding/fuzzedUrl": fuzzed_url +"/websecurityscanner:v1alpha/Finding/httpMethod": http_method +"/websecurityscanner:v1alpha/Finding/name": name +"/websecurityscanner:v1alpha/Finding/outdatedLibrary": outdated_library +"/websecurityscanner:v1alpha/Finding/reproductionUrl": reproduction_url +"/websecurityscanner:v1alpha/Finding/trackingId": tracking_id +"/websecurityscanner:v1alpha/Finding/violatingResource": violating_resource +"/websecurityscanner:v1alpha/Finding/vulnerableParameters": vulnerable_parameters +"/websecurityscanner:v1alpha/Finding/xss": xss +"/websecurityscanner:v1alpha/FindingTypeStats": finding_type_stats +"/websecurityscanner:v1alpha/FindingTypeStats/findingCount": finding_count +"/websecurityscanner:v1alpha/FindingTypeStats/findingType": finding_type +"/websecurityscanner:v1alpha/GoogleAccount": google_account +"/websecurityscanner:v1alpha/GoogleAccount/password": password +"/websecurityscanner:v1alpha/GoogleAccount/username": username +"/websecurityscanner:v1alpha/ListCrawledUrlsResponse": list_crawled_urls_response +"/websecurityscanner:v1alpha/ListCrawledUrlsResponse/crawledUrls": crawled_urls +"/websecurityscanner:v1alpha/ListCrawledUrlsResponse/crawledUrls/crawled_url": crawled_url +"/websecurityscanner:v1alpha/ListCrawledUrlsResponse/nextPageToken": next_page_token +"/websecurityscanner:v1alpha/ListFindingTypeStatsResponse": list_finding_type_stats_response +"/websecurityscanner:v1alpha/ListFindingTypeStatsResponse/findingTypeStats": finding_type_stats +"/websecurityscanner:v1alpha/ListFindingTypeStatsResponse/findingTypeStats/finding_type_stat": finding_type_stat +"/websecurityscanner:v1alpha/ListFindingsResponse": list_findings_response +"/websecurityscanner:v1alpha/ListFindingsResponse/findings": findings +"/websecurityscanner:v1alpha/ListFindingsResponse/findings/finding": finding +"/websecurityscanner:v1alpha/ListFindingsResponse/nextPageToken": next_page_token +"/websecurityscanner:v1alpha/ListScanConfigsResponse": list_scan_configs_response +"/websecurityscanner:v1alpha/ListScanConfigsResponse/nextPageToken": next_page_token +"/websecurityscanner:v1alpha/ListScanConfigsResponse/scanConfigs": scan_configs +"/websecurityscanner:v1alpha/ListScanConfigsResponse/scanConfigs/scan_config": scan_config +"/websecurityscanner:v1alpha/ListScanRunsResponse": list_scan_runs_response +"/websecurityscanner:v1alpha/ListScanRunsResponse/nextPageToken": next_page_token +"/websecurityscanner:v1alpha/ListScanRunsResponse/scanRuns": scan_runs +"/websecurityscanner:v1alpha/ListScanRunsResponse/scanRuns/scan_run": scan_run +"/websecurityscanner:v1alpha/OutdatedLibrary": outdated_library +"/websecurityscanner:v1alpha/OutdatedLibrary/learnMoreUrls": learn_more_urls +"/websecurityscanner:v1alpha/OutdatedLibrary/learnMoreUrls/learn_more_url": learn_more_url +"/websecurityscanner:v1alpha/OutdatedLibrary/libraryName": library_name +"/websecurityscanner:v1alpha/OutdatedLibrary/version": version +"/websecurityscanner:v1alpha/ScanConfig": scan_config +"/websecurityscanner:v1alpha/ScanConfig/authentication": authentication +"/websecurityscanner:v1alpha/ScanConfig/blacklistPatterns": blacklist_patterns +"/websecurityscanner:v1alpha/ScanConfig/blacklistPatterns/blacklist_pattern": blacklist_pattern +"/websecurityscanner:v1alpha/ScanConfig/displayName": display_name +"/websecurityscanner:v1alpha/ScanConfig/maxQps": max_qps +"/websecurityscanner:v1alpha/ScanConfig/name": name +"/websecurityscanner:v1alpha/ScanConfig/schedule": schedule +"/websecurityscanner:v1alpha/ScanConfig/startingUrls": starting_urls +"/websecurityscanner:v1alpha/ScanConfig/startingUrls/starting_url": starting_url +"/websecurityscanner:v1alpha/ScanConfig/targetPlatforms": target_platforms +"/websecurityscanner:v1alpha/ScanConfig/targetPlatforms/target_platform": target_platform +"/websecurityscanner:v1alpha/ScanConfig/userAgent": user_agent +"/websecurityscanner:v1alpha/ScanRun": scan_run +"/websecurityscanner:v1alpha/ScanRun/endTime": end_time +"/websecurityscanner:v1alpha/ScanRun/executionState": execution_state +"/websecurityscanner:v1alpha/ScanRun/hasVulnerabilities": has_vulnerabilities +"/websecurityscanner:v1alpha/ScanRun/name": name +"/websecurityscanner:v1alpha/ScanRun/progressPercent": progress_percent +"/websecurityscanner:v1alpha/ScanRun/resultState": result_state +"/websecurityscanner:v1alpha/ScanRun/startTime": start_time +"/websecurityscanner:v1alpha/ScanRun/urlsCrawledCount": urls_crawled_count +"/websecurityscanner:v1alpha/ScanRun/urlsTestedCount": urls_tested_count +"/websecurityscanner:v1alpha/Schedule": schedule +"/websecurityscanner:v1alpha/Schedule/intervalDurationDays": interval_duration_days +"/websecurityscanner:v1alpha/Schedule/scheduleTime": schedule_time +"/websecurityscanner:v1alpha/StartScanRunRequest": start_scan_run_request +"/websecurityscanner:v1alpha/StopScanRunRequest": stop_scan_run_request +"/websecurityscanner:v1alpha/ViolatingResource": violating_resource +"/websecurityscanner:v1alpha/ViolatingResource/contentType": content_type +"/websecurityscanner:v1alpha/ViolatingResource/resourceUrl": resource_url +"/websecurityscanner:v1alpha/VulnerableParameters": vulnerable_parameters +"/websecurityscanner:v1alpha/VulnerableParameters/parameterNames": parameter_names +"/websecurityscanner:v1alpha/VulnerableParameters/parameterNames/parameter_name": parameter_name +"/websecurityscanner:v1alpha/Xss": xss +"/websecurityscanner:v1alpha/Xss/errorMessage": error_message +"/websecurityscanner:v1alpha/Xss/stackTraces": stack_traces +"/websecurityscanner:v1alpha/Xss/stackTraces/stack_trace": stack_trace +"/websecurityscanner:v1alpha/fields": fields +"/websecurityscanner:v1alpha/key": key +"/websecurityscanner:v1alpha/quotaUser": quota_user +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.create": create_project_scan_config +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.create/parent": parent +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.delete": delete_project_scan_config +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.delete/name": name +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.get": get_project_scan_config +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.get/name": name +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.list": list_project_scan_configs +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.list/pageSize": page_size +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.list/pageToken": page_token +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.list/parent": parent +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.patch": patch_project_scan_config +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.patch/name": name +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.patch/updateMask": update_mask +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.scanRuns.crawledUrls.list": list_project_scan_config_scan_run_crawled_urls +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.scanRuns.crawledUrls.list/pageSize": page_size +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.scanRuns.crawledUrls.list/pageToken": page_token +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.scanRuns.crawledUrls.list/parent": parent +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.scanRuns.findingTypeStats.list": list_project_scan_config_scan_run_finding_type_stats +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.scanRuns.findingTypeStats.list/parent": parent +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.scanRuns.findings.get": get_project_scan_config_scan_run_finding +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.scanRuns.findings.get/name": name +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.scanRuns.findings.list": list_project_scan_config_scan_run_findings +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.scanRuns.findings.list/filter": filter +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.scanRuns.findings.list/pageSize": page_size +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.scanRuns.findings.list/pageToken": page_token +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.scanRuns.findings.list/parent": parent +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.scanRuns.get": get_project_scan_config_scan_run +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.scanRuns.get/name": name +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.scanRuns.list": list_project_scan_config_scan_runs +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.scanRuns.list/pageSize": page_size +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.scanRuns.list/pageToken": page_token +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.scanRuns.list/parent": parent +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.scanRuns.stop": stop_scan_run +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.scanRuns.stop/name": name +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.start": start_scan_config_scan_run +"/websecurityscanner:v1alpha/websecurityscanner.projects.scanConfigs.start/name": name "/youtube:v3/AccessPolicy": access_policy "/youtube:v3/AccessPolicy/allowed": allowed "/youtube:v3/AccessPolicy/exception": exception @@ -77336,6 +77471,105 @@ "/youtubeAnalytics:v1beta1/youtubeAnalytics.reports.query/sort": sort "/youtubeAnalytics:v1beta1/youtubeAnalytics.reports.query/start-date": start_date "/youtubeAnalytics:v1beta1/youtubeAnalytics.reports.query/start-index": start_index +"/youtubeAnalytics:v2/EmptyResponse": empty_response +"/youtubeAnalytics:v2/EmptyResponse/errors": errors +"/youtubeAnalytics:v2/ErrorProto": error_proto +"/youtubeAnalytics:v2/ErrorProto/argument": argument +"/youtubeAnalytics:v2/ErrorProto/argument/argument": argument +"/youtubeAnalytics:v2/ErrorProto/code": code +"/youtubeAnalytics:v2/ErrorProto/debugInfo": debug_info +"/youtubeAnalytics:v2/ErrorProto/domain": domain +"/youtubeAnalytics:v2/ErrorProto/externalErrorMessage": external_error_message +"/youtubeAnalytics:v2/ErrorProto/location": location +"/youtubeAnalytics:v2/ErrorProto/locationType": location_type +"/youtubeAnalytics:v2/Errors": errors +"/youtubeAnalytics:v2/Errors/code": code +"/youtubeAnalytics:v2/Errors/error": error +"/youtubeAnalytics:v2/Errors/error/error": error +"/youtubeAnalytics:v2/Errors/requestId": request_id +"/youtubeAnalytics:v2/Group": group +"/youtubeAnalytics:v2/Group/contentDetails": content_details +"/youtubeAnalytics:v2/Group/errors": errors +"/youtubeAnalytics:v2/Group/etag": etag +"/youtubeAnalytics:v2/Group/id": id +"/youtubeAnalytics:v2/Group/kind": kind +"/youtubeAnalytics:v2/Group/snippet": snippet +"/youtubeAnalytics:v2/GroupContentDetails": group_content_details +"/youtubeAnalytics:v2/GroupContentDetails/itemCount": item_count +"/youtubeAnalytics:v2/GroupContentDetails/itemType": item_type +"/youtubeAnalytics:v2/GroupItem": group_item +"/youtubeAnalytics:v2/GroupItem/errors": errors +"/youtubeAnalytics:v2/GroupItem/etag": etag +"/youtubeAnalytics:v2/GroupItem/groupId": group_id +"/youtubeAnalytics:v2/GroupItem/id": id +"/youtubeAnalytics:v2/GroupItem/kind": kind +"/youtubeAnalytics:v2/GroupItem/resource": resource +"/youtubeAnalytics:v2/GroupItemResource": group_item_resource +"/youtubeAnalytics:v2/GroupItemResource/id": id +"/youtubeAnalytics:v2/GroupItemResource/kind": kind +"/youtubeAnalytics:v2/GroupSnippet": group_snippet +"/youtubeAnalytics:v2/GroupSnippet/publishedAt": published_at +"/youtubeAnalytics:v2/GroupSnippet/title": title +"/youtubeAnalytics:v2/ListGroupItemsResponse": list_group_items_response +"/youtubeAnalytics:v2/ListGroupItemsResponse/errors": errors +"/youtubeAnalytics:v2/ListGroupItemsResponse/etag": etag +"/youtubeAnalytics:v2/ListGroupItemsResponse/items": items +"/youtubeAnalytics:v2/ListGroupItemsResponse/items/item": item +"/youtubeAnalytics:v2/ListGroupItemsResponse/kind": kind +"/youtubeAnalytics:v2/ListGroupsResponse": list_groups_response +"/youtubeAnalytics:v2/ListGroupsResponse/errors": errors +"/youtubeAnalytics:v2/ListGroupsResponse/etag": etag +"/youtubeAnalytics:v2/ListGroupsResponse/items": items +"/youtubeAnalytics:v2/ListGroupsResponse/items/item": item +"/youtubeAnalytics:v2/ListGroupsResponse/kind": kind +"/youtubeAnalytics:v2/ListGroupsResponse/nextPageToken": next_page_token +"/youtubeAnalytics:v2/QueryResponse": query_response +"/youtubeAnalytics:v2/QueryResponse/columnHeaders": column_headers +"/youtubeAnalytics:v2/QueryResponse/columnHeaders/column_header": column_header +"/youtubeAnalytics:v2/QueryResponse/errors": errors +"/youtubeAnalytics:v2/QueryResponse/kind": kind +"/youtubeAnalytics:v2/QueryResponse/rows": rows +"/youtubeAnalytics:v2/QueryResponse/rows/row": row +"/youtubeAnalytics:v2/QueryResponse/rows/row/row": row +"/youtubeAnalytics:v2/ResultTableColumnHeader": result_table_column_header +"/youtubeAnalytics:v2/ResultTableColumnHeader/columnType": column_type +"/youtubeAnalytics:v2/ResultTableColumnHeader/dataType": data_type +"/youtubeAnalytics:v2/ResultTableColumnHeader/name": name +"/youtubeAnalytics:v2/fields": fields +"/youtubeAnalytics:v2/key": key +"/youtubeAnalytics:v2/quotaUser": quota_user +"/youtubeAnalytics:v2/youtubeAnalytics.groupItems.delete": delete_group_item +"/youtubeAnalytics:v2/youtubeAnalytics.groupItems.delete/id": id +"/youtubeAnalytics:v2/youtubeAnalytics.groupItems.delete/onBehalfOfContentOwner": on_behalf_of_content_owner +"/youtubeAnalytics:v2/youtubeAnalytics.groupItems.insert": insert_group_item +"/youtubeAnalytics:v2/youtubeAnalytics.groupItems.insert/onBehalfOfContentOwner": on_behalf_of_content_owner +"/youtubeAnalytics:v2/youtubeAnalytics.groupItems.list": list_group_items +"/youtubeAnalytics:v2/youtubeAnalytics.groupItems.list/groupId": group_id +"/youtubeAnalytics:v2/youtubeAnalytics.groupItems.list/onBehalfOfContentOwner": on_behalf_of_content_owner +"/youtubeAnalytics:v2/youtubeAnalytics.groups.delete": delete_group +"/youtubeAnalytics:v2/youtubeAnalytics.groups.delete/id": id +"/youtubeAnalytics:v2/youtubeAnalytics.groups.delete/onBehalfOfContentOwner": on_behalf_of_content_owner +"/youtubeAnalytics:v2/youtubeAnalytics.groups.insert": insert_group +"/youtubeAnalytics:v2/youtubeAnalytics.groups.insert/onBehalfOfContentOwner": on_behalf_of_content_owner +"/youtubeAnalytics:v2/youtubeAnalytics.groups.list": list_groups +"/youtubeAnalytics:v2/youtubeAnalytics.groups.list/id": id +"/youtubeAnalytics:v2/youtubeAnalytics.groups.list/mine": mine +"/youtubeAnalytics:v2/youtubeAnalytics.groups.list/onBehalfOfContentOwner": on_behalf_of_content_owner +"/youtubeAnalytics:v2/youtubeAnalytics.groups.list/pageToken": page_token +"/youtubeAnalytics:v2/youtubeAnalytics.groups.update": update_group +"/youtubeAnalytics:v2/youtubeAnalytics.groups.update/onBehalfOfContentOwner": on_behalf_of_content_owner +"/youtubeAnalytics:v2/youtubeAnalytics.reports.query": query_report +"/youtubeAnalytics:v2/youtubeAnalytics.reports.query/currency": currency +"/youtubeAnalytics:v2/youtubeAnalytics.reports.query/dimensions": dimensions +"/youtubeAnalytics:v2/youtubeAnalytics.reports.query/endDate": end_date +"/youtubeAnalytics:v2/youtubeAnalytics.reports.query/filters": filters +"/youtubeAnalytics:v2/youtubeAnalytics.reports.query/ids": ids +"/youtubeAnalytics:v2/youtubeAnalytics.reports.query/includeHistoricalChannelData": include_historical_channel_data +"/youtubeAnalytics:v2/youtubeAnalytics.reports.query/maxResults": max_results +"/youtubeAnalytics:v2/youtubeAnalytics.reports.query/metrics": metrics +"/youtubeAnalytics:v2/youtubeAnalytics.reports.query/sort": sort +"/youtubeAnalytics:v2/youtubeAnalytics.reports.query/startDate": start_date +"/youtubeAnalytics:v2/youtubeAnalytics.reports.query/startIndex": start_index "/youtubePartner:v1/AdBreak": ad_break "/youtubePartner:v1/AdBreak/midrollSeconds": midroll_seconds "/youtubePartner:v1/AdBreak/position": position diff --git a/generated/google/apis/androidmanagement_v1.rb b/generated/google/apis/androidmanagement_v1.rb index 44bd23bd7..7b6e12bde 100644 --- a/generated/google/apis/androidmanagement_v1.rb +++ b/generated/google/apis/androidmanagement_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/android/management module AndroidmanagementV1 VERSION = 'V1' - REVISION = '20180402' + REVISION = '20180417' # Manage Android devices and apps for your customers AUTH_ANDROIDMANAGEMENT = 'https://www.googleapis.com/auth/androidmanagement' diff --git a/generated/google/apis/androidmanagement_v1/classes.rb b/generated/google/apis/androidmanagement_v1/classes.rb index 67cd38918..2d3389e74 100644 --- a/generated/google/apis/androidmanagement_v1/classes.rb +++ b/generated/google/apis/androidmanagement_v1/classes.rb @@ -147,7 +147,7 @@ module Google # The default policy for all permissions requested by the app. If specified, # this overrides the policy-level default_permission_policy which applies to all - # apps. + # apps. It does not override the permission_grants which applies to all apps. # Corresponds to the JSON property `defaultPermissionPolicy` # @return [String] attr_accessor :default_permission_policy @@ -199,7 +199,7 @@ module Google attr_accessor :package_name # Explicit permission grants or denials for the app. These values override the - # default_permission_policy. + # default_permission_policy and permission_grants which apply to all apps. # Corresponds to the JSON property `permissionGrants` # @return [Array] attr_accessor :permission_grants @@ -2022,7 +2022,7 @@ module Google alias_method :usb_file_transfer_disabled?, :usb_file_transfer_disabled # Allows admins to toggle whether USB storge is enabled or disabled on user's - # devices. Next ID: 114 + # devices. # Corresponds to the JSON property `usbMassStorageEnabled` # @return [Boolean] attr_accessor :usb_mass_storage_enabled diff --git a/generated/google/apis/classroom_v1.rb b/generated/google/apis/classroom_v1.rb index 8f4135864..bf980ef02 100644 --- a/generated/google/apis/classroom_v1.rb +++ b/generated/google/apis/classroom_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/classroom/ module ClassroomV1 VERSION = 'V1' - REVISION = '20180413' + REVISION = '20180421' # View and manage announcements in Google Classroom AUTH_CLASSROOM_ANNOUNCEMENTS = 'https://www.googleapis.com/auth/classroom.announcements' diff --git a/generated/google/apis/classroom_v1/classes.rb b/generated/google/apis/classroom_v1/classes.rb index 08b00a6dc..65b4ed2ac 100644 --- a/generated/google/apis/classroom_v1/classes.rb +++ b/generated/google/apis/classroom_v1/classes.rb @@ -315,7 +315,7 @@ module Google # Name of the course. # For example, "10th Grade Biology". - # The name is required. It must be between 1 and 50 characters and a valid + # The name is required. It must be between 1 and 750 characters and a valid # UTF-8 string. # Corresponds to the JSON property `name` # @return [String] diff --git a/generated/google/apis/cloudiot_v1.rb b/generated/google/apis/cloudiot_v1.rb index 43be69f5c..032cb5817 100644 --- a/generated/google/apis/cloudiot_v1.rb +++ b/generated/google/apis/cloudiot_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/iot module CloudiotV1 VERSION = 'V1' - REVISION = '20180314' + REVISION = '20180417' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/cloudiot_v1/classes.rb b/generated/google/apis/cloudiot_v1/classes.rb index fdda938e3..bf9039c21 100644 --- a/generated/google/apis/cloudiot_v1/classes.rb +++ b/generated/google/apis/cloudiot_v1/classes.rb @@ -641,11 +641,11 @@ module Google # Defines an Identity and Access Management (IAM) policy. It is used to # specify access control policies for Cloud Platform resources. - # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of + # A `Policy` consists of a list of `bindings`. A `binding` binds a list of # `members` to a `role`, where the members can be user accounts, Google groups, # Google domains, and service accounts. A `role` is a named list of permissions # defined by IAM. - # **Example** + # **JSON Example** # ` # "bindings": [ # ` @@ -654,7 +654,7 @@ module Google # "user:mike@example.com", # "group:admins@example.com", # "domain:google.com", - # "serviceAccount:my-other-app@appspot.gserviceaccount.com", + # "serviceAccount:my-other-app@appspot.gserviceaccount.com" # ] # `, # ` @@ -663,6 +663,17 @@ module Google # ` # ] # ` + # **YAML Example** + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-other-app@appspot.gserviceaccount.com + # role: roles/owner + # - members: + # - user:sean@example.com + # role: roles/viewer # For a description of IAM and its features, see the # [IAM developer's guide](https://cloud.google.com/iam/docs). class Policy @@ -786,11 +797,11 @@ module Google # Defines an Identity and Access Management (IAM) policy. It is used to # specify access control policies for Cloud Platform resources. - # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of + # A `Policy` consists of a list of `bindings`. A `binding` binds a list of # `members` to a `role`, where the members can be user accounts, Google groups, # Google domains, and service accounts. A `role` is a named list of permissions # defined by IAM. - # **Example** + # **JSON Example** # ` # "bindings": [ # ` @@ -799,7 +810,7 @@ module Google # "user:mike@example.com", # "group:admins@example.com", # "domain:google.com", - # "serviceAccount:my-other-app@appspot.gserviceaccount.com", + # "serviceAccount:my-other-app@appspot.gserviceaccount.com" # ] # `, # ` @@ -808,6 +819,17 @@ module Google # ` # ] # ` + # **YAML Example** + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-other-app@appspot.gserviceaccount.com + # role: roles/owner + # - members: + # - user:sean@example.com + # role: roles/viewer # For a description of IAM and its features, see the # [IAM developer's guide](https://cloud.google.com/iam/docs). # Corresponds to the JSON property `policy` diff --git a/generated/google/apis/cloudtasks_v2beta2.rb b/generated/google/apis/cloudtasks_v2beta2.rb index b767095ce..c113ce413 100644 --- a/generated/google/apis/cloudtasks_v2beta2.rb +++ b/generated/google/apis/cloudtasks_v2beta2.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/cloud-tasks/ module CloudtasksV2beta2 VERSION = 'V2beta2' - REVISION = '20180417' + REVISION = '20180423' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/cloudtasks_v2beta2/classes.rb b/generated/google/apis/cloudtasks_v2beta2/classes.rb index 940ce1584..ce820623d 100644 --- a/generated/google/apis/cloudtasks_v2beta2/classes.rb +++ b/generated/google/apis/cloudtasks_v2beta2/classes.rb @@ -435,7 +435,7 @@ module Google # * `allAuthenticatedUsers`: A special identifier that represents anyone # who is authenticated with a Google account or a service account. # * `user:`emailid``: An email address that represents a specific Google - # account. For example, `alice@gmail.com` or `joe@example.com`. + # account. For example, `alice@gmail.com` . # * `serviceAccount:`emailid``: An email address that represents a service # account. For example, `my-other-app@appspot.gserviceaccount.com`. # * `group:`emailid``: An email address that represents a Google group. diff --git a/generated/google/apis/speech_v1.rb b/generated/google/apis/speech_v1.rb index a4b595192..6abcea2ee 100644 --- a/generated/google/apis/speech_v1.rb +++ b/generated/google/apis/speech_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/speech/ module SpeechV1 VERSION = 'V1' - REVISION = '20180326' + REVISION = '20180420' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/speech_v1/classes.rb b/generated/google/apis/speech_v1/classes.rb index 84d8861dc..c5df0c047 100644 --- a/generated/google/apis/speech_v1/classes.rb +++ b/generated/google/apis/speech_v1/classes.rb @@ -363,6 +363,8 @@ module Google attr_accessor :transcript # Output only. A list of word-specific information for each recognized word. + # Note: When enable_speaker_diarization is true, you will see all the words + # from the beginning of the audio. # Corresponds to the JSON property `words` # @return [Array] attr_accessor :words @@ -487,6 +489,15 @@ module Google # @return [String] attr_accessor :end_time + # Output only. A distinct integer value is assigned for every speaker within + # the audio. This field specifies which one of those speakers was detected to + # have spoken this word. Value ranges from '1' to diarization_speaker_count. + # speaker_tag is set if enable_speaker_diarization = 'true' and only in the + # top alternative. + # Corresponds to the JSON property `speakerTag` + # @return [Fixnum] + attr_accessor :speaker_tag + # Output only. Time offset relative to the beginning of the audio, # and corresponding to the start of the spoken word. # This field is only set if `enable_word_time_offsets=true` and only @@ -509,6 +520,7 @@ module Google # Update properties of this object def update!(**args) @end_time = args[:end_time] if args.key?(:end_time) + @speaker_tag = args[:speaker_tag] if args.key?(:speaker_tag) @start_time = args[:start_time] if args.key?(:start_time) @word = args[:word] if args.key?(:word) end diff --git a/generated/google/apis/speech_v1/representations.rb b/generated/google/apis/speech_v1/representations.rb index 37aa028e6..e5e699a5d 100644 --- a/generated/google/apis/speech_v1/representations.rb +++ b/generated/google/apis/speech_v1/representations.rb @@ -188,6 +188,7 @@ module Google # @private class Representation < Google::Apis::Core::JsonRepresentation property :end_time, as: 'endTime' + property :speaker_tag, as: 'speakerTag' property :start_time, as: 'startTime' property :word, as: 'word' end diff --git a/generated/google/apis/websecurityscanner_v1alpha.rb b/generated/google/apis/websecurityscanner_v1alpha.rb new file mode 100644 index 000000000..9d676a506 --- /dev/null +++ b/generated/google/apis/websecurityscanner_v1alpha.rb @@ -0,0 +1,34 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/websecurityscanner_v1alpha/service.rb' +require 'google/apis/websecurityscanner_v1alpha/classes.rb' +require 'google/apis/websecurityscanner_v1alpha/representations.rb' + +module Google + module Apis + # Web Security Scanner API + # + # Web Security Scanner API (under development). + # + # @see https://cloud.google.com/security-scanner/ + module WebsecurityscannerV1alpha + VERSION = 'V1alpha' + REVISION = '20180423' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + end + end +end diff --git a/generated/google/apis/websecurityscanner_v1alpha/classes.rb b/generated/google/apis/websecurityscanner_v1alpha/classes.rb new file mode 100644 index 000000000..681043f4d --- /dev/null +++ b/generated/google/apis/websecurityscanner_v1alpha/classes.rb @@ -0,0 +1,760 @@ +# 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 WebsecurityscannerV1alpha + + # Scan authentication configuration. + class Authentication + include Google::Apis::Core::Hashable + + # Describes authentication configuration that uses a custom account. + # Corresponds to the JSON property `customAccount` + # @return [Google::Apis::WebsecurityscannerV1alpha::CustomAccount] + attr_accessor :custom_account + + # Describes authentication configuration that uses a Google account. + # Corresponds to the JSON property `googleAccount` + # @return [Google::Apis::WebsecurityscannerV1alpha::GoogleAccount] + attr_accessor :google_account + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @custom_account = args[:custom_account] if args.key?(:custom_account) + @google_account = args[:google_account] if args.key?(:google_account) + end + end + + # A CrawledUrl resource represents a URL that was crawled during a ScanRun. Web + # Security Scanner Service crawls the web applications, following all links + # within the scope of sites, to find the URLs to test against. + class CrawledUrl + include Google::Apis::Core::Hashable + + # Output only. + # The body of the request that was used to visit the URL. + # Corresponds to the JSON property `body` + # @return [String] + attr_accessor :body + + # Output only. + # The http method of the request that was used to visit the URL, in + # uppercase. + # Corresponds to the JSON property `httpMethod` + # @return [String] + attr_accessor :http_method + + # Output only. + # The URL that was crawled. + # 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) + @body = args[:body] if args.key?(:body) + @http_method = args[:http_method] if args.key?(:http_method) + @url = args[:url] if args.key?(:url) + end + end + + # Describes authentication configuration that uses a custom account. + class CustomAccount + include Google::Apis::Core::Hashable + + # Required. + # The login form URL of the website. + # Corresponds to the JSON property `loginUrl` + # @return [String] + attr_accessor :login_url + + # Input only. + # Required. + # The password of the custom account. The credential is stored encrypted + # and not returned in any response. + # Corresponds to the JSON property `password` + # @return [String] + attr_accessor :password + + # Required. + # The user name of the custom account. + # Corresponds to the JSON property `username` + # @return [String] + attr_accessor :username + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @login_url = args[:login_url] if args.key?(:login_url) + @password = args[:password] if args.key?(:password) + @username = args[:username] if args.key?(:username) + end + end + + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for `Empty` is empty JSON object ````. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # A Finding resource represents a vulnerability instance identified during a + # ScanRun. + class Finding + include Google::Apis::Core::Hashable + + # Output only. + # The body of the request that triggered the vulnerability. + # Corresponds to the JSON property `body` + # @return [String] + attr_accessor :body + + # Output only. + # The description of the vulnerability. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Output only. + # The URL where the browser lands when the vulnerability is detected. + # Corresponds to the JSON property `finalUrl` + # @return [String] + attr_accessor :final_url + + # Output only. + # The type of the Finding. + # Corresponds to the JSON property `findingType` + # @return [String] + attr_accessor :finding_type + + # Output only. + # If the vulnerability was originated from nested IFrame, the immediate + # parent IFrame is reported. + # Corresponds to the JSON property `frameUrl` + # @return [String] + attr_accessor :frame_url + + # Output only. + # The URL produced by the server-side fuzzer and used in the request that + # triggered the vulnerability. + # Corresponds to the JSON property `fuzzedUrl` + # @return [String] + attr_accessor :fuzzed_url + + # Output only. + # The http method of the request that triggered the vulnerability, in + # uppercase. + # Corresponds to the JSON property `httpMethod` + # @return [String] + attr_accessor :http_method + + # Output only. + # The resource name of the Finding. The name follows the format of + # 'projects/`projectId`/scanConfigs/`scanConfigId`/scanruns/`scanRunId`/findings/ + # `findingId`'. + # The finding IDs are generated by the system. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Information reported for an outdated library. + # Corresponds to the JSON property `outdatedLibrary` + # @return [Google::Apis::WebsecurityscannerV1alpha::OutdatedLibrary] + attr_accessor :outdated_library + + # Output only. + # The URL containing human-readable payload that user can leverage to + # reproduce the vulnerability. + # Corresponds to the JSON property `reproductionUrl` + # @return [String] + attr_accessor :reproduction_url + + # Output only. + # The tracking ID uniquely identifies a vulnerability instance across + # multiple ScanRuns. + # Corresponds to the JSON property `trackingId` + # @return [String] + attr_accessor :tracking_id + + # Information regarding any resource causing the vulnerability such + # as JavaScript sources, image, audio files, etc. + # Corresponds to the JSON property `violatingResource` + # @return [Google::Apis::WebsecurityscannerV1alpha::ViolatingResource] + attr_accessor :violating_resource + + # Information about vulnerable request parameters. + # Corresponds to the JSON property `vulnerableParameters` + # @return [Google::Apis::WebsecurityscannerV1alpha::VulnerableParameters] + attr_accessor :vulnerable_parameters + + # Information reported for an XSS. + # Corresponds to the JSON property `xss` + # @return [Google::Apis::WebsecurityscannerV1alpha::Xss] + attr_accessor :xss + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @body = args[:body] if args.key?(:body) + @description = args[:description] if args.key?(:description) + @final_url = args[:final_url] if args.key?(:final_url) + @finding_type = args[:finding_type] if args.key?(:finding_type) + @frame_url = args[:frame_url] if args.key?(:frame_url) + @fuzzed_url = args[:fuzzed_url] if args.key?(:fuzzed_url) + @http_method = args[:http_method] if args.key?(:http_method) + @name = args[:name] if args.key?(:name) + @outdated_library = args[:outdated_library] if args.key?(:outdated_library) + @reproduction_url = args[:reproduction_url] if args.key?(:reproduction_url) + @tracking_id = args[:tracking_id] if args.key?(:tracking_id) + @violating_resource = args[:violating_resource] if args.key?(:violating_resource) + @vulnerable_parameters = args[:vulnerable_parameters] if args.key?(:vulnerable_parameters) + @xss = args[:xss] if args.key?(:xss) + end + end + + # A FindingTypeStats resource represents stats regarding a specific FindingType + # of Findings under a given ScanRun. + class FindingTypeStats + include Google::Apis::Core::Hashable + + # Output only. + # The count of findings belonging to this finding type. + # Corresponds to the JSON property `findingCount` + # @return [Fixnum] + attr_accessor :finding_count + + # Output only. + # The finding type associated with the stats. + # Corresponds to the JSON property `findingType` + # @return [String] + attr_accessor :finding_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @finding_count = args[:finding_count] if args.key?(:finding_count) + @finding_type = args[:finding_type] if args.key?(:finding_type) + end + end + + # Describes authentication configuration that uses a Google account. + class GoogleAccount + include Google::Apis::Core::Hashable + + # Input only. + # Required. + # The password of the Google account. The credential is stored encrypted + # and not returned in any response. + # Corresponds to the JSON property `password` + # @return [String] + attr_accessor :password + + # Required. + # The user name of the Google account. + # Corresponds to the JSON property `username` + # @return [String] + attr_accessor :username + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @password = args[:password] if args.key?(:password) + @username = args[:username] if args.key?(:username) + end + end + + # Response for the `ListCrawledUrls` method. + class ListCrawledUrlsResponse + include Google::Apis::Core::Hashable + + # The list of CrawledUrls returned. + # Corresponds to the JSON property `crawledUrls` + # @return [Array] + attr_accessor :crawled_urls + + # Token to retrieve the next page of results, or empty if there are no + # more results in the list. + # 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) + @crawled_urls = args[:crawled_urls] if args.key?(:crawled_urls) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # Response for the `ListFindingTypeStats` method. + class ListFindingTypeStatsResponse + include Google::Apis::Core::Hashable + + # The list of FindingTypeStats returned. + # Corresponds to the JSON property `findingTypeStats` + # @return [Array] + attr_accessor :finding_type_stats + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @finding_type_stats = args[:finding_type_stats] if args.key?(:finding_type_stats) + end + end + + # Response for the `ListFindings` method. + class ListFindingsResponse + include Google::Apis::Core::Hashable + + # The list of Findings returned. + # Corresponds to the JSON property `findings` + # @return [Array] + attr_accessor :findings + + # Token to retrieve the next page of results, or empty if there are no + # more results in the list. + # 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) + @findings = args[:findings] if args.key?(:findings) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # Response for the `ListScanConfigs` method. + class ListScanConfigsResponse + include Google::Apis::Core::Hashable + + # Token to retrieve the next page of results, or empty if there are no + # more results in the list. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The list of ScanConfigs returned. + # Corresponds to the JSON property `scanConfigs` + # @return [Array] + attr_accessor :scan_configs + + 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) + @scan_configs = args[:scan_configs] if args.key?(:scan_configs) + end + end + + # Response for the `ListScanRuns` method. + class ListScanRunsResponse + include Google::Apis::Core::Hashable + + # Token to retrieve the next page of results, or empty if there are no + # more results in the list. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The list of ScanRuns returned. + # Corresponds to the JSON property `scanRuns` + # @return [Array] + attr_accessor :scan_runs + + 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) + @scan_runs = args[:scan_runs] if args.key?(:scan_runs) + end + end + + # Information reported for an outdated library. + class OutdatedLibrary + include Google::Apis::Core::Hashable + + # URLs to learn more information about the vulnerabilities in the library. + # Corresponds to the JSON property `learnMoreUrls` + # @return [Array] + attr_accessor :learn_more_urls + + # The name of the outdated library. + # Corresponds to the JSON property `libraryName` + # @return [String] + attr_accessor :library_name + + # The version number. + # Corresponds to the JSON property `version` + # @return [String] + attr_accessor :version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @learn_more_urls = args[:learn_more_urls] if args.key?(:learn_more_urls) + @library_name = args[:library_name] if args.key?(:library_name) + @version = args[:version] if args.key?(:version) + end + end + + # A ScanConfig resource contains the configurations to launch a scan. + class ScanConfig + include Google::Apis::Core::Hashable + + # Scan authentication configuration. + # Corresponds to the JSON property `authentication` + # @return [Google::Apis::WebsecurityscannerV1alpha::Authentication] + attr_accessor :authentication + + # The blacklist URL patterns as described in + # https://cloud.google.com/security-scanner/docs/excluded-urls + # Corresponds to the JSON property `blacklistPatterns` + # @return [Array] + attr_accessor :blacklist_patterns + + # Required. + # The user provided display name of the ScanConfig. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # The maximum QPS during scanning. A valid value ranges from 5 to 20 + # inclusively. If the field is unspecified or its value is set 0, server will + # default to 15. Other values outside of [5, 20] range will be rejected with + # INVALID_ARGUMENT error. + # Corresponds to the JSON property `maxQps` + # @return [Fixnum] + attr_accessor :max_qps + + # The resource name of the ScanConfig. The name follows the format of + # 'projects/`projectId`/scanConfigs/`scanConfigId`'. The ScanConfig IDs are + # generated by the system. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Scan schedule configuration. + # Corresponds to the JSON property `schedule` + # @return [Google::Apis::WebsecurityscannerV1alpha::Schedule] + attr_accessor :schedule + + # Required. + # The starting URLs from which the scanner finds site pages. + # Corresponds to the JSON property `startingUrls` + # @return [Array] + attr_accessor :starting_urls + + # Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be + # used as a default. + # Corresponds to the JSON property `targetPlatforms` + # @return [Array] + attr_accessor :target_platforms + + # The user agent used during scanning. + # Corresponds to the JSON property `userAgent` + # @return [String] + attr_accessor :user_agent + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @authentication = args[:authentication] if args.key?(:authentication) + @blacklist_patterns = args[:blacklist_patterns] if args.key?(:blacklist_patterns) + @display_name = args[:display_name] if args.key?(:display_name) + @max_qps = args[:max_qps] if args.key?(:max_qps) + @name = args[:name] if args.key?(:name) + @schedule = args[:schedule] if args.key?(:schedule) + @starting_urls = args[:starting_urls] if args.key?(:starting_urls) + @target_platforms = args[:target_platforms] if args.key?(:target_platforms) + @user_agent = args[:user_agent] if args.key?(:user_agent) + end + end + + # A ScanRun is a output-only resource representing an actual run of the scan. + class ScanRun + include Google::Apis::Core::Hashable + + # Output only. + # The time at which the ScanRun reached termination state - that the ScanRun + # is either finished or stopped by user. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # Output only. + # The execution state of the ScanRun. + # Corresponds to the JSON property `executionState` + # @return [String] + attr_accessor :execution_state + + # Output only. + # Whether the scan run has found any vulnerabilities. + # Corresponds to the JSON property `hasVulnerabilities` + # @return [Boolean] + attr_accessor :has_vulnerabilities + alias_method :has_vulnerabilities?, :has_vulnerabilities + + # Output only. + # The resource name of the ScanRun. The name follows the format of + # 'projects/`projectId`/scanConfigs/`scanConfigId`/scanRuns/`scanRunId`'. + # The ScanRun IDs are generated by the system. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Output only. + # The percentage of total completion ranging from 0 to 100. + # If the scan is in queue, the value is 0. + # If the scan is running, the value ranges from 0 to 100. + # If the scan is finished, the value is 100. + # Corresponds to the JSON property `progressPercent` + # @return [Fixnum] + attr_accessor :progress_percent + + # Output only. + # The result state of the ScanRun. This field is only available after the + # execution state reaches "FINISHED". + # Corresponds to the JSON property `resultState` + # @return [String] + attr_accessor :result_state + + # Output only. + # The time at which the ScanRun started. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # Output only. + # The number of URLs crawled during this ScanRun. If the scan is in progress, + # the value represents the number of URLs crawled up to now. + # Corresponds to the JSON property `urlsCrawledCount` + # @return [Fixnum] + attr_accessor :urls_crawled_count + + # Output only. + # The number of URLs tested during this ScanRun. If the scan is in progress, + # the value represents the number of URLs tested up to now. The number of + # URLs tested is usually larger than the number URLS crawled because + # typically a crawled URL is tested with multiple test payloads. + # Corresponds to the JSON property `urlsTestedCount` + # @return [Fixnum] + attr_accessor :urls_tested_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @end_time = args[:end_time] if args.key?(:end_time) + @execution_state = args[:execution_state] if args.key?(:execution_state) + @has_vulnerabilities = args[:has_vulnerabilities] if args.key?(:has_vulnerabilities) + @name = args[:name] if args.key?(:name) + @progress_percent = args[:progress_percent] if args.key?(:progress_percent) + @result_state = args[:result_state] if args.key?(:result_state) + @start_time = args[:start_time] if args.key?(:start_time) + @urls_crawled_count = args[:urls_crawled_count] if args.key?(:urls_crawled_count) + @urls_tested_count = args[:urls_tested_count] if args.key?(:urls_tested_count) + end + end + + # Scan schedule configuration. + class Schedule + include Google::Apis::Core::Hashable + + # Required. + # The duration of time between executions in days. + # Corresponds to the JSON property `intervalDurationDays` + # @return [Fixnum] + attr_accessor :interval_duration_days + + # A timestamp indicates when the next run will be scheduled. The value is + # refreshed by the server after each run. If unspecified, it will default + # to current server time, which means the scan will be scheduled to start + # immediately. + # Corresponds to the JSON property `scheduleTime` + # @return [String] + attr_accessor :schedule_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @interval_duration_days = args[:interval_duration_days] if args.key?(:interval_duration_days) + @schedule_time = args[:schedule_time] if args.key?(:schedule_time) + end + end + + # Request for the `StartScanRun` method. + class StartScanRunRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Request for the `StopScanRun` method. + class StopScanRunRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Information regarding any resource causing the vulnerability such + # as JavaScript sources, image, audio files, etc. + class ViolatingResource + include Google::Apis::Core::Hashable + + # The MIME type of this resource. + # Corresponds to the JSON property `contentType` + # @return [String] + attr_accessor :content_type + + # URL of this violating resource. + # Corresponds to the JSON property `resourceUrl` + # @return [String] + attr_accessor :resource_url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @content_type = args[:content_type] if args.key?(:content_type) + @resource_url = args[:resource_url] if args.key?(:resource_url) + end + end + + # Information about vulnerable request parameters. + class VulnerableParameters + include Google::Apis::Core::Hashable + + # The vulnerable parameter names. + # Corresponds to the JSON property `parameterNames` + # @return [Array] + attr_accessor :parameter_names + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @parameter_names = args[:parameter_names] if args.key?(:parameter_names) + end + end + + # Information reported for an XSS. + class Xss + include Google::Apis::Core::Hashable + + # An error message generated by a javascript breakage. + # Corresponds to the JSON property `errorMessage` + # @return [String] + attr_accessor :error_message + + # Stack traces leading to the point where the XSS occurred. + # Corresponds to the JSON property `stackTraces` + # @return [Array] + attr_accessor :stack_traces + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @error_message = args[:error_message] if args.key?(:error_message) + @stack_traces = args[:stack_traces] if args.key?(:stack_traces) + end + end + end + end +end diff --git a/generated/google/apis/websecurityscanner_v1alpha/representations.rb b/generated/google/apis/websecurityscanner_v1alpha/representations.rb new file mode 100644 index 000000000..1042817d2 --- /dev/null +++ b/generated/google/apis/websecurityscanner_v1alpha/representations.rb @@ -0,0 +1,354 @@ +# 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 WebsecurityscannerV1alpha + + class Authentication + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CrawledUrl + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CustomAccount + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Empty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Finding + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class FindingTypeStats + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleAccount + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListCrawledUrlsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListFindingTypeStatsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListFindingsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListScanConfigsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListScanRunsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class OutdatedLibrary + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ScanConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ScanRun + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Schedule + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class StartScanRunRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class StopScanRunRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ViolatingResource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class VulnerableParameters + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Xss + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Authentication + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :custom_account, as: 'customAccount', class: Google::Apis::WebsecurityscannerV1alpha::CustomAccount, decorator: Google::Apis::WebsecurityscannerV1alpha::CustomAccount::Representation + + property :google_account, as: 'googleAccount', class: Google::Apis::WebsecurityscannerV1alpha::GoogleAccount, decorator: Google::Apis::WebsecurityscannerV1alpha::GoogleAccount::Representation + + end + end + + class CrawledUrl + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :body, as: 'body' + property :http_method, as: 'httpMethod' + property :url, as: 'url' + end + end + + class CustomAccount + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :login_url, as: 'loginUrl' + property :password, as: 'password' + property :username, as: 'username' + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class Finding + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :body, as: 'body' + property :description, as: 'description' + property :final_url, as: 'finalUrl' + property :finding_type, as: 'findingType' + property :frame_url, as: 'frameUrl' + property :fuzzed_url, as: 'fuzzedUrl' + property :http_method, as: 'httpMethod' + property :name, as: 'name' + property :outdated_library, as: 'outdatedLibrary', class: Google::Apis::WebsecurityscannerV1alpha::OutdatedLibrary, decorator: Google::Apis::WebsecurityscannerV1alpha::OutdatedLibrary::Representation + + property :reproduction_url, as: 'reproductionUrl' + property :tracking_id, as: 'trackingId' + property :violating_resource, as: 'violatingResource', class: Google::Apis::WebsecurityscannerV1alpha::ViolatingResource, decorator: Google::Apis::WebsecurityscannerV1alpha::ViolatingResource::Representation + + property :vulnerable_parameters, as: 'vulnerableParameters', class: Google::Apis::WebsecurityscannerV1alpha::VulnerableParameters, decorator: Google::Apis::WebsecurityscannerV1alpha::VulnerableParameters::Representation + + property :xss, as: 'xss', class: Google::Apis::WebsecurityscannerV1alpha::Xss, decorator: Google::Apis::WebsecurityscannerV1alpha::Xss::Representation + + end + end + + class FindingTypeStats + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :finding_count, as: 'findingCount' + property :finding_type, as: 'findingType' + end + end + + class GoogleAccount + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :password, as: 'password' + property :username, as: 'username' + end + end + + class ListCrawledUrlsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :crawled_urls, as: 'crawledUrls', class: Google::Apis::WebsecurityscannerV1alpha::CrawledUrl, decorator: Google::Apis::WebsecurityscannerV1alpha::CrawledUrl::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListFindingTypeStatsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :finding_type_stats, as: 'findingTypeStats', class: Google::Apis::WebsecurityscannerV1alpha::FindingTypeStats, decorator: Google::Apis::WebsecurityscannerV1alpha::FindingTypeStats::Representation + + end + end + + class ListFindingsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :findings, as: 'findings', class: Google::Apis::WebsecurityscannerV1alpha::Finding, decorator: Google::Apis::WebsecurityscannerV1alpha::Finding::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListScanConfigsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :scan_configs, as: 'scanConfigs', class: Google::Apis::WebsecurityscannerV1alpha::ScanConfig, decorator: Google::Apis::WebsecurityscannerV1alpha::ScanConfig::Representation + + end + end + + class ListScanRunsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :scan_runs, as: 'scanRuns', class: Google::Apis::WebsecurityscannerV1alpha::ScanRun, decorator: Google::Apis::WebsecurityscannerV1alpha::ScanRun::Representation + + end + end + + class OutdatedLibrary + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :learn_more_urls, as: 'learnMoreUrls' + property :library_name, as: 'libraryName' + property :version, as: 'version' + end + end + + class ScanConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :authentication, as: 'authentication', class: Google::Apis::WebsecurityscannerV1alpha::Authentication, decorator: Google::Apis::WebsecurityscannerV1alpha::Authentication::Representation + + collection :blacklist_patterns, as: 'blacklistPatterns' + property :display_name, as: 'displayName' + property :max_qps, as: 'maxQps' + property :name, as: 'name' + property :schedule, as: 'schedule', class: Google::Apis::WebsecurityscannerV1alpha::Schedule, decorator: Google::Apis::WebsecurityscannerV1alpha::Schedule::Representation + + collection :starting_urls, as: 'startingUrls' + collection :target_platforms, as: 'targetPlatforms' + property :user_agent, as: 'userAgent' + end + end + + class ScanRun + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :end_time, as: 'endTime' + property :execution_state, as: 'executionState' + property :has_vulnerabilities, as: 'hasVulnerabilities' + property :name, as: 'name' + property :progress_percent, as: 'progressPercent' + property :result_state, as: 'resultState' + property :start_time, as: 'startTime' + property :urls_crawled_count, :numeric_string => true, as: 'urlsCrawledCount' + property :urls_tested_count, :numeric_string => true, as: 'urlsTestedCount' + end + end + + class Schedule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :interval_duration_days, as: 'intervalDurationDays' + property :schedule_time, as: 'scheduleTime' + end + end + + class StartScanRunRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class StopScanRunRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class ViolatingResource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :content_type, as: 'contentType' + property :resource_url, as: 'resourceUrl' + end + end + + class VulnerableParameters + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :parameter_names, as: 'parameterNames' + end + end + + class Xss + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :error_message, as: 'errorMessage' + collection :stack_traces, as: 'stackTraces' + end + end + end + end +end diff --git a/generated/google/apis/websecurityscanner_v1alpha/service.rb b/generated/google/apis/websecurityscanner_v1alpha/service.rb new file mode 100644 index 000000000..8d85ffa6f --- /dev/null +++ b/generated/google/apis/websecurityscanner_v1alpha/service.rb @@ -0,0 +1,548 @@ +# 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 WebsecurityscannerV1alpha + # Web Security Scanner API + # + # Web Security Scanner API (under development). + # + # @example + # require 'google/apis/websecurityscanner_v1alpha' + # + # Websecurityscanner = Google::Apis::WebsecurityscannerV1alpha # Alias the module + # service = Websecurityscanner::WebSecurityScannerService.new + # + # @see https://cloud.google.com/security-scanner/ + class WebSecurityScannerService < Google::Apis::Core::BaseService + # @return [String] + # API key. Your API key identifies your project and provides you with API access, + # quota, and reports. Required unless you provide an OAuth 2.0 token. + attr_accessor :key + + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + + def initialize + super('https://websecurityscanner.googleapis.com/', '') + @batch_path = 'batch' + end + + # Creates a new ScanConfig. + # @param [String] parent + # Required. + # The parent resource name where the scan is created, which should be a + # project resource name in the format 'projects/`projectId`'. + # @param [Google::Apis::WebsecurityscannerV1alpha::ScanConfig] scan_config_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::ScanConfig] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::WebsecurityscannerV1alpha::ScanConfig] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_scan_config(parent, scan_config_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha/{+parent}/scanConfigs', options) + command.request_representation = Google::Apis::WebsecurityscannerV1alpha::ScanConfig::Representation + command.request_object = scan_config_object + command.response_representation = Google::Apis::WebsecurityscannerV1alpha::ScanConfig::Representation + command.response_class = Google::Apis::WebsecurityscannerV1alpha::ScanConfig + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes an existing ScanConfig and its child resources. + # @param [String] name + # Required. + # The resource name of the ScanConfig to be deleted. The name follows the + # format of 'projects/`projectId`/scanConfigs/`scanConfigId`'. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::WebsecurityscannerV1alpha::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_scan_config(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1alpha/{+name}', options) + command.response_representation = Google::Apis::WebsecurityscannerV1alpha::Empty::Representation + command.response_class = Google::Apis::WebsecurityscannerV1alpha::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a ScanConfig. + # @param [String] name + # Required. + # The resource name of the ScanConfig to be returned. The name follows the + # format of 'projects/`projectId`/scanConfigs/`scanConfigId`'. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::ScanConfig] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::WebsecurityscannerV1alpha::ScanConfig] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_scan_config(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha/{+name}', options) + command.response_representation = Google::Apis::WebsecurityscannerV1alpha::ScanConfig::Representation + command.response_class = Google::Apis::WebsecurityscannerV1alpha::ScanConfig + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists ScanConfigs under a given project. + # @param [String] parent + # Required. + # The parent resource name, which should be a project resource name in the + # format 'projects/`projectId`'. + # @param [Fixnum] page_size + # The maximum number of ScanConfigs to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + # @param [String] page_token + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::ListScanConfigsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::WebsecurityscannerV1alpha::ListScanConfigsResponse] + # + # @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_project_scan_configs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha/{+parent}/scanConfigs', options) + command.response_representation = Google::Apis::WebsecurityscannerV1alpha::ListScanConfigsResponse::Representation + command.response_class = Google::Apis::WebsecurityscannerV1alpha::ListScanConfigsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a ScanConfig. This method support partial update of a ScanConfig. + # @param [String] name + # The resource name of the ScanConfig. The name follows the format of + # 'projects/`projectId`/scanConfigs/`scanConfigId`'. The ScanConfig IDs are + # generated by the system. + # @param [Google::Apis::WebsecurityscannerV1alpha::ScanConfig] scan_config_object + # @param [String] update_mask + # Required. + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf# + # fieldmask + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::ScanConfig] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::WebsecurityscannerV1alpha::ScanConfig] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_scan_config(name, scan_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1alpha/{+name}', options) + command.request_representation = Google::Apis::WebsecurityscannerV1alpha::ScanConfig::Representation + command.request_object = scan_config_object + command.response_representation = Google::Apis::WebsecurityscannerV1alpha::ScanConfig::Representation + command.response_class = Google::Apis::WebsecurityscannerV1alpha::ScanConfig + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Start a ScanRun according to the given ScanConfig. + # @param [String] name + # Required. + # The resource name of the ScanConfig to be used. The name follows the + # format of 'projects/`projectId`/scanConfigs/`scanConfigId`'. + # @param [Google::Apis::WebsecurityscannerV1alpha::StartScanRunRequest] start_scan_run_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. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::ScanRun] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::WebsecurityscannerV1alpha::ScanRun] + # + # @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_scan_config_scan_run(name, start_scan_run_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha/{+name}:start', options) + command.request_representation = Google::Apis::WebsecurityscannerV1alpha::StartScanRunRequest::Representation + command.request_object = start_scan_run_request_object + command.response_representation = Google::Apis::WebsecurityscannerV1alpha::ScanRun::Representation + command.response_class = Google::Apis::WebsecurityscannerV1alpha::ScanRun + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a ScanRun. + # @param [String] name + # Required. + # The resource name of the ScanRun to be returned. The name follows the + # format of + # 'projects/`projectId`/scanConfigs/`scanConfigId`/scanRuns/`scanRunId`'. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::ScanRun] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::WebsecurityscannerV1alpha::ScanRun] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_scan_config_scan_run(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha/{+name}', options) + command.response_representation = Google::Apis::WebsecurityscannerV1alpha::ScanRun::Representation + command.response_class = Google::Apis::WebsecurityscannerV1alpha::ScanRun + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists ScanRuns under a given ScanConfig, in descending order of ScanRun + # stop time. + # @param [String] parent + # Required. + # The parent resource name, which should be a scan resource name in the + # format 'projects/`projectId`/scanConfigs/`scanConfigId`'. + # @param [Fixnum] page_size + # The maximum number of ScanRuns to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + # @param [String] page_token + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::ListScanRunsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::WebsecurityscannerV1alpha::ListScanRunsResponse] + # + # @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_project_scan_config_scan_runs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha/{+parent}/scanRuns', options) + command.response_representation = Google::Apis::WebsecurityscannerV1alpha::ListScanRunsResponse::Representation + command.response_class = Google::Apis::WebsecurityscannerV1alpha::ListScanRunsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Stops a ScanRun. The stopped ScanRun is returned. + # @param [String] name + # Required. + # The resource name of the ScanRun to be stopped. The name follows the + # format of + # 'projects/`projectId`/scanConfigs/`scanConfigId`/scanRuns/`scanRunId`'. + # @param [Google::Apis::WebsecurityscannerV1alpha::StopScanRunRequest] stop_scan_run_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. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::ScanRun] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::WebsecurityscannerV1alpha::ScanRun] + # + # @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_scan_run(name, stop_scan_run_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha/{+name}:stop', options) + command.request_representation = Google::Apis::WebsecurityscannerV1alpha::StopScanRunRequest::Representation + command.request_object = stop_scan_run_request_object + command.response_representation = Google::Apis::WebsecurityscannerV1alpha::ScanRun::Representation + command.response_class = Google::Apis::WebsecurityscannerV1alpha::ScanRun + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # List CrawledUrls under a given ScanRun. + # @param [String] parent + # Required. + # The parent resource name, which should be a scan run resource name in the + # format + # 'projects/`projectId`/scanConfigs/`scanConfigId`/scanRuns/`scanRunId`'. + # @param [Fixnum] page_size + # The maximum number of CrawledUrls to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + # @param [String] page_token + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::ListCrawledUrlsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::WebsecurityscannerV1alpha::ListCrawledUrlsResponse] + # + # @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_project_scan_config_scan_run_crawled_urls(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha/{+parent}/crawledUrls', options) + command.response_representation = Google::Apis::WebsecurityscannerV1alpha::ListCrawledUrlsResponse::Representation + command.response_class = Google::Apis::WebsecurityscannerV1alpha::ListCrawledUrlsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # List all FindingTypeStats under a given ScanRun. + # @param [String] parent + # Required. + # The parent resource name, which should be a scan run resource name in the + # format + # 'projects/`projectId`/scanConfigs/`scanConfigId`/scanRuns/`scanRunId`'. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::ListFindingTypeStatsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::WebsecurityscannerV1alpha::ListFindingTypeStatsResponse] + # + # @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_project_scan_config_scan_run_finding_type_stats(parent, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha/{+parent}/findingTypeStats', options) + command.response_representation = Google::Apis::WebsecurityscannerV1alpha::ListFindingTypeStatsResponse::Representation + command.response_class = Google::Apis::WebsecurityscannerV1alpha::ListFindingTypeStatsResponse + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a Finding. + # @param [String] name + # Required. + # The resource name of the Finding to be returned. The name follows the + # format of + # 'projects/`projectId`/scanConfigs/`scanConfigId`/scanRuns/`scanRunId`/findings/ + # `findingId`'. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::Finding] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::WebsecurityscannerV1alpha::Finding] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_scan_config_scan_run_finding(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha/{+name}', options) + command.response_representation = Google::Apis::WebsecurityscannerV1alpha::Finding::Representation + command.response_class = Google::Apis::WebsecurityscannerV1alpha::Finding + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # List Findings under a given ScanRun. + # @param [String] parent + # Required. + # The parent resource name, which should be a scan run resource name in the + # format + # 'projects/`projectId`/scanConfigs/`scanConfigId`/scanRuns/`scanRunId`'. + # @param [String] filter + # The filter expression. The expression must be in the format: + # . + # Supported field: 'finding_type'. + # Supported operator: '='. + # @param [Fixnum] page_size + # The maximum number of Findings to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + # @param [String] page_token + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::ListFindingsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::WebsecurityscannerV1alpha::ListFindingsResponse] + # + # @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_project_scan_config_scan_run_findings(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha/{+parent}/findings', options) + command.response_representation = Google::Apis::WebsecurityscannerV1alpha::ListFindingsResponse::Representation + command.response_class = Google::Apis::WebsecurityscannerV1alpha::ListFindingsResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + end + end + end + end +end diff --git a/generated/google/apis/youtube_analytics_v2.rb b/generated/google/apis/youtube_analytics_v2.rb new file mode 100644 index 000000000..7bee370c3 --- /dev/null +++ b/generated/google/apis/youtube_analytics_v2.rb @@ -0,0 +1,46 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/youtube_analytics_v2/service.rb' +require 'google/apis/youtube_analytics_v2/classes.rb' +require 'google/apis/youtube_analytics_v2/representations.rb' + +module Google + module Apis + # YouTube Analytics API + # + # Retrieves your YouTube Analytics data. + # + # @see http://developers.google.com/youtube/analytics + module YoutubeAnalyticsV2 + VERSION = 'V2' + REVISION = '20180424' + + # Manage your YouTube account + AUTH_YOUTUBE = 'https://www.googleapis.com/auth/youtube' + + # View your YouTube account + AUTH_YOUTUBE_READONLY = 'https://www.googleapis.com/auth/youtube.readonly' + + # View and manage your assets and associated content on YouTube + AUTH_YOUTUBEPARTNER = 'https://www.googleapis.com/auth/youtubepartner' + + # View monetary and non-monetary YouTube Analytics reports for your YouTube content + AUTH_YT_ANALYTICS_MONETARY_READONLY = 'https://www.googleapis.com/auth/yt-analytics-monetary.readonly' + + # View YouTube Analytics reports for your YouTube content + AUTH_YT_ANALYTICS_READONLY = 'https://www.googleapis.com/auth/yt-analytics.readonly' + end + end +end diff --git a/generated/google/apis/youtube_analytics_v2/classes.rb b/generated/google/apis/youtube_analytics_v2/classes.rb new file mode 100644 index 000000000..94253e64b --- /dev/null +++ b/generated/google/apis/youtube_analytics_v2/classes.rb @@ -0,0 +1,532 @@ +# 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] + 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] + 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] + 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] + 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] + 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>] + 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 diff --git a/generated/google/apis/youtube_analytics_v2/representations.rb b/generated/google/apis/youtube_analytics_v2/representations.rb new file mode 100644 index 000000000..df654f90d --- /dev/null +++ b/generated/google/apis/youtube_analytics_v2/representations.rb @@ -0,0 +1,232 @@ +# 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 + + class EmptyResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ErrorProto + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Errors + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Group + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GroupContentDetails + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GroupItem + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GroupItemResource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GroupSnippet + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListGroupItemsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListGroupsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class QueryResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ResultTableColumnHeader + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class EmptyResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :errors, as: 'errors', class: Google::Apis::YoutubeAnalyticsV2::Errors, decorator: Google::Apis::YoutubeAnalyticsV2::Errors::Representation + + end + end + + class ErrorProto + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :argument, as: 'argument' + property :code, as: 'code' + property :debug_info, as: 'debugInfo' + property :domain, as: 'domain' + property :external_error_message, as: 'externalErrorMessage' + property :location, as: 'location' + property :location_type, as: 'locationType' + end + end + + class Errors + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + collection :error, as: 'error', class: Google::Apis::YoutubeAnalyticsV2::ErrorProto, decorator: Google::Apis::YoutubeAnalyticsV2::ErrorProto::Representation + + property :request_id, as: 'requestId' + end + end + + class Group + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :content_details, as: 'contentDetails', class: Google::Apis::YoutubeAnalyticsV2::GroupContentDetails, decorator: Google::Apis::YoutubeAnalyticsV2::GroupContentDetails::Representation + + property :errors, as: 'errors', class: Google::Apis::YoutubeAnalyticsV2::Errors, decorator: Google::Apis::YoutubeAnalyticsV2::Errors::Representation + + property :etag, as: 'etag' + property :id, as: 'id' + property :kind, as: 'kind' + property :snippet, as: 'snippet', class: Google::Apis::YoutubeAnalyticsV2::GroupSnippet, decorator: Google::Apis::YoutubeAnalyticsV2::GroupSnippet::Representation + + end + end + + class GroupContentDetails + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :item_count, :numeric_string => true, as: 'itemCount' + property :item_type, as: 'itemType' + end + end + + class GroupItem + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :errors, as: 'errors', class: Google::Apis::YoutubeAnalyticsV2::Errors, decorator: Google::Apis::YoutubeAnalyticsV2::Errors::Representation + + property :etag, as: 'etag' + property :group_id, as: 'groupId' + property :id, as: 'id' + property :kind, as: 'kind' + property :resource, as: 'resource', class: Google::Apis::YoutubeAnalyticsV2::GroupItemResource, decorator: Google::Apis::YoutubeAnalyticsV2::GroupItemResource::Representation + + end + end + + class GroupItemResource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :id, as: 'id' + property :kind, as: 'kind' + end + end + + class GroupSnippet + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :published_at, as: 'publishedAt' + property :title, as: 'title' + end + end + + class ListGroupItemsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :errors, as: 'errors', class: Google::Apis::YoutubeAnalyticsV2::Errors, decorator: Google::Apis::YoutubeAnalyticsV2::Errors::Representation + + property :etag, as: 'etag' + collection :items, as: 'items', class: Google::Apis::YoutubeAnalyticsV2::GroupItem, decorator: Google::Apis::YoutubeAnalyticsV2::GroupItem::Representation + + property :kind, as: 'kind' + end + end + + class ListGroupsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :errors, as: 'errors', class: Google::Apis::YoutubeAnalyticsV2::Errors, decorator: Google::Apis::YoutubeAnalyticsV2::Errors::Representation + + property :etag, as: 'etag' + collection :items, as: 'items', class: Google::Apis::YoutubeAnalyticsV2::Group, decorator: Google::Apis::YoutubeAnalyticsV2::Group::Representation + + property :kind, as: 'kind' + property :next_page_token, as: 'nextPageToken' + end + end + + class QueryResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :column_headers, as: 'columnHeaders', class: Google::Apis::YoutubeAnalyticsV2::ResultTableColumnHeader, decorator: Google::Apis::YoutubeAnalyticsV2::ResultTableColumnHeader::Representation + + property :errors, as: 'errors', class: Google::Apis::YoutubeAnalyticsV2::Errors, decorator: Google::Apis::YoutubeAnalyticsV2::Errors::Representation + + property :kind, as: 'kind' + collection :rows, as: 'rows', :class => Array do + include Representable::JSON::Collection + items + end + + end + end + + class ResultTableColumnHeader + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :column_type, as: 'columnType' + property :data_type, as: 'dataType' + property :name, as: 'name' + end + end + end + end +end diff --git a/generated/google/apis/youtube_analytics_v2/service.rb b/generated/google/apis/youtube_analytics_v2/service.rb new file mode 100644 index 000000000..bbe784488 --- /dev/null +++ b/generated/google/apis/youtube_analytics_v2/service.rb @@ -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 YoutubeAnalyticsV2 + # YouTube Analytics API + # + # Retrieves your YouTube Analytics data. + # + # @example + # require 'google/apis/youtube_analytics_v2' + # + # YoutubeAnalytics = Google::Apis::YoutubeAnalyticsV2 # Alias the module + # service = YoutubeAnalytics::YouTubeAnalyticsService.new + # + # @see http://developers.google.com/youtube/analytics + class YouTubeAnalyticsService < Google::Apis::Core::BaseService + # @return [String] + # API key. Your API key identifies your project and provides you with API access, + # quota, and reports. Required unless you provide an OAuth 2.0 token. + attr_accessor :key + + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + + def initialize + super('https://youtubeanalytics.googleapis.com/', '') + @batch_path = 'batch' + end + + # Removes an item from a group. + # @param [String] id + # The `id` parameter specifies the YouTube group item ID of the group item + # that is being deleted. + # @param [String] on_behalf_of_content_owner + # This parameter can only be used in a properly authorized request. **Note:** + # This parameter is intended exclusively for YouTube content partners that + # own and manage many different YouTube channels. + # The `onBehalfOfContentOwner` parameter indicates that the request's + # authorization credentials identify a YouTube user who is acting on behalf + # of the content owner specified in the parameter value. It allows content + # owners to authenticate once and get access to all their video and channel + # data, without having to provide authentication credentials for each + # individual channel. The account that the user authenticates with must be + # linked to the specified YouTube content owner. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::YoutubeAnalyticsV2::EmptyResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::YoutubeAnalyticsV2::EmptyResponse] + # + # @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_group_item(id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2/groupItems', options) + command.response_representation = Google::Apis::YoutubeAnalyticsV2::EmptyResponse::Representation + command.response_class = Google::Apis::YoutubeAnalyticsV2::EmptyResponse + command.query['id'] = id unless id.nil? + command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a group item. + # @param [Google::Apis::YoutubeAnalyticsV2::GroupItem] group_item_object + # @param [String] on_behalf_of_content_owner + # This parameter can only be used in a properly authorized request. **Note:** + # This parameter is intended exclusively for YouTube content partners that + # own and manage many different YouTube channels. + # The `onBehalfOfContentOwner` parameter indicates that the request's + # authorization credentials identify a YouTube user who is acting on behalf + # of the content owner specified in the parameter value. It allows content + # owners to authenticate once and get access to all their video and channel + # data, without having to provide authentication credentials for each + # individual channel. The account that the user authenticates with must be + # linked to the specified YouTube content owner. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::YoutubeAnalyticsV2::GroupItem] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::YoutubeAnalyticsV2::GroupItem] + # + # @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_group_item(group_item_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/groupItems', options) + command.request_representation = Google::Apis::YoutubeAnalyticsV2::GroupItem::Representation + command.request_object = group_item_object + command.response_representation = Google::Apis::YoutubeAnalyticsV2::GroupItem::Representation + command.response_class = Google::Apis::YoutubeAnalyticsV2::GroupItem + command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns a collection of group items that match the API request parameters. + # @param [String] group_id + # The `groupId` parameter specifies the unique ID of the group for which you + # want to retrieve group items. + # @param [String] on_behalf_of_content_owner + # This parameter can only be used in a properly authorized request. **Note:** + # This parameter is intended exclusively for YouTube content partners that + # own and manage many different YouTube channels. + # The `onBehalfOfContentOwner` parameter indicates that the request's + # authorization credentials identify a YouTube user who is acting on behalf + # of the content owner specified in the parameter value. It allows content + # owners to authenticate once and get access to all their video and channel + # data, without having to provide authentication credentials for each + # individual channel. The account that the user authenticates with must be + # linked to the specified YouTube content owner. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::YoutubeAnalyticsV2::ListGroupItemsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::YoutubeAnalyticsV2::ListGroupItemsResponse] + # + # @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_group_items(group_id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/groupItems', options) + command.response_representation = Google::Apis::YoutubeAnalyticsV2::ListGroupItemsResponse::Representation + command.response_class = Google::Apis::YoutubeAnalyticsV2::ListGroupItemsResponse + command.query['groupId'] = group_id unless group_id.nil? + command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a group. + # @param [String] id + # The `id` parameter specifies the YouTube group ID of the group that is + # being deleted. + # @param [String] on_behalf_of_content_owner + # This parameter can only be used in a properly authorized request. **Note:** + # This parameter is intended exclusively for YouTube content partners that + # own and manage many different YouTube channels. + # The `onBehalfOfContentOwner` parameter indicates that the request's + # authorization credentials identify a YouTube user who is acting on behalf + # of the content owner specified in the parameter value. It allows content + # owners to authenticate once and get access to all their video and channel + # data, without having to provide authentication credentials for each + # individual channel. The account that the user authenticates with must be + # linked to the specified YouTube content owner. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::YoutubeAnalyticsV2::EmptyResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::YoutubeAnalyticsV2::EmptyResponse] + # + # @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_group(id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2/groups', options) + command.response_representation = Google::Apis::YoutubeAnalyticsV2::EmptyResponse::Representation + command.response_class = Google::Apis::YoutubeAnalyticsV2::EmptyResponse + command.query['id'] = id unless id.nil? + command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a group. + # @param [Google::Apis::YoutubeAnalyticsV2::Group] group_object + # @param [String] on_behalf_of_content_owner + # This parameter can only be used in a properly authorized request. **Note:** + # This parameter is intended exclusively for YouTube content partners that + # own and manage many different YouTube channels. + # The `onBehalfOfContentOwner` parameter indicates that the request's + # authorization credentials identify a YouTube user who is acting on behalf + # of the content owner specified in the parameter value. It allows content + # owners to authenticate once and get access to all their video and channel + # data, without having to provide authentication credentials for each + # individual channel. The account that the user authenticates with must be + # linked to the specified YouTube content owner. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::YoutubeAnalyticsV2::Group] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::YoutubeAnalyticsV2::Group] + # + # @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_group(group_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/groups', options) + command.request_representation = Google::Apis::YoutubeAnalyticsV2::Group::Representation + command.request_object = group_object + command.response_representation = Google::Apis::YoutubeAnalyticsV2::Group::Representation + command.response_class = Google::Apis::YoutubeAnalyticsV2::Group + command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns a collection of groups that match the API request parameters. For + # example, you can retrieve all groups that the authenticated user owns, + # or you can retrieve one or more groups by their unique IDs. + # @param [String] id + # The `id` parameter specifies a comma-separated list of the YouTube group + # ID(s) for the resource(s) that are being retrieved. Each group must be + # owned by the authenticated user. In a `group` resource, the `id` property + # specifies the group's YouTube group ID. + # Note that if you do not specify a value for the `id` parameter, then you + # must set the `mine` parameter to `true`. + # @param [Boolean] mine + # This parameter can only be used in a properly authorized request. Set this + # parameter's value to true to retrieve all groups owned by the authenticated + # user. + # @param [String] on_behalf_of_content_owner + # This parameter can only be used in a properly authorized request. **Note:** + # This parameter is intended exclusively for YouTube content partners that + # own and manage many different YouTube channels. + # The `onBehalfOfContentOwner` parameter indicates that the request's + # authorization credentials identify a YouTube user who is acting on behalf + # of the content owner specified in the parameter value. It allows content + # owners to authenticate once and get access to all their video and channel + # data, without having to provide authentication credentials for each + # individual channel. The account that the user authenticates with must be + # linked to the specified YouTube content owner. + # @param [String] page_token + # The `pageToken` parameter identifies a specific page in the result set that + # should be returned. In an API response, the `nextPageToken` property + # identifies the next page that can be retrieved. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::YoutubeAnalyticsV2::ListGroupsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::YoutubeAnalyticsV2::ListGroupsResponse] + # + # @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_groups(id: nil, mine: nil, on_behalf_of_content_owner: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/groups', options) + command.response_representation = Google::Apis::YoutubeAnalyticsV2::ListGroupsResponse::Representation + command.response_class = Google::Apis::YoutubeAnalyticsV2::ListGroupsResponse + command.query['id'] = id unless id.nil? + command.query['mine'] = mine unless mine.nil? + command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Modifies a group. For example, you could change a group's title. + # @param [Google::Apis::YoutubeAnalyticsV2::Group] group_object + # @param [String] on_behalf_of_content_owner + # This parameter can only be used in a properly authorized request. **Note:** + # This parameter is intended exclusively for YouTube content partners that + # own and manage many different YouTube channels. + # The `onBehalfOfContentOwner` parameter indicates that the request's + # authorization credentials identify a YouTube user who is acting on behalf + # of the content owner specified in the parameter value. It allows content + # owners to authenticate once and get access to all their video and channel + # data, without having to provide authentication credentials for each + # individual channel. The account that the user authenticates with must be + # linked to the specified YouTube content owner. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::YoutubeAnalyticsV2::Group] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::YoutubeAnalyticsV2::Group] + # + # @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_group(group_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'v2/groups', options) + command.request_representation = Google::Apis::YoutubeAnalyticsV2::Group::Representation + command.request_object = group_object + command.response_representation = Google::Apis::YoutubeAnalyticsV2::Group::Representation + command.response_class = Google::Apis::YoutubeAnalyticsV2::Group + command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Retrieve your YouTube Analytics reports. + # @param [String] currency + # The currency to which financial metrics should be converted. The default is + # US Dollar (USD). If the result contains no financial metrics, this flag + # will be ignored. Responds with an error if the specified currency is not + # recognized.", + # pattern: [A-Z]`3` + # @param [String] dimensions + # A comma-separated list of YouTube Analytics dimensions, such as `views` or + # `ageGroup,gender`. See the [Available + # Reports](/youtube/analytics/v2/available_reports) document for a list of + # the reports that you can retrieve and the dimensions used for those + # reports. Also see the [Dimensions](/youtube/analytics/v2/dimsmets/dims) + # document for definitions of those dimensions." + # pattern: [0-9a-zA-Z,]+ + # @param [String] end_date + # The end date for fetching YouTube Analytics data. The value should be in + # `YYYY-MM-DD` format. + # required: true, pattern: [0-9]`4`-[0-9]`2`-[0-9]`2` + # @param [String] filters + # A list of filters that should be applied when retrieving YouTube Analytics + # data. The [Available Reports](/youtube/analytics/v2/available_reports) + # document identifies the dimensions that can be used to filter each report, + # and the [Dimensions](/youtube/analytics/v2/dimsmets/dims) document defines + # those dimensions. If a request uses multiple filters, join them together + # with a semicolon (`;`), and the returned result table will satisfy both + # filters. For example, a filters parameter value of + # `video==dMH0bHeiRNg;country==IT` restricts the result set to include data + # for the given video in Italy.", + # @param [String] ids + # Identifies the YouTube channel or content owner for which you are + # retrieving YouTube Analytics data. + # - To request data for a YouTube user, set the `ids` parameter value to + # `channel==CHANNEL_ID`, where `CHANNEL_ID` specifies the unique YouTube + # channel ID. + # - To request data for a YouTube CMS content owner, set the `ids` parameter + # value to `contentOwner==OWNER_NAME`, where `OWNER_NAME` is the CMS name + # of the content owner. + # required: true, pattern: [a-zA-Z]+==[a-zA-Z0-9_+-]+ + # @param [Boolean] include_historical_channel_data + # If set to true historical data (i.e. channel data from before the linking + # of the channel to the content owner) will be retrieved.", + # @param [Fixnum] max_results + # The maximum number of rows to include in the response.", + # minValue: 1 + # @param [String] metrics + # A comma-separated list of YouTube Analytics metrics, such as `views` or + # `likes,dislikes`. See the + # [Available Reports](/youtube/analytics/v2/available_reports) document for + # a list of the reports that you can retrieve and the metrics + # available in each report, and see the + # [Metrics](/youtube/analytics/v2/dimsmets/mets) document for definitions of + # those metrics. + # required: true, pattern: [0-9a-zA-Z,]+ + # @param [String] sort + # A comma-separated list of dimensions or metrics that determine the sort + # order for YouTube Analytics data. By default the sort order is ascending. + # The '`-`' prefix causes descending sort order.", + # pattern: [-0-9a-zA-Z,]+ + # @param [String] start_date + # The start date for fetching YouTube Analytics data. The value should be in + # `YYYY-MM-DD` format. + # required: true, pattern: "[0-9]`4`-[0-9]`2`-[0-9]`2` + # @param [Fixnum] start_index + # An index of the first entity to retrieve. Use this parameter as a + # pagination mechanism along with the max-results parameter (one-based, + # inclusive).", + # minValue: 1 + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::YoutubeAnalyticsV2::QueryResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::YoutubeAnalyticsV2::QueryResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def query_report(currency: nil, dimensions: nil, end_date: nil, filters: nil, ids: nil, include_historical_channel_data: nil, max_results: nil, metrics: nil, sort: nil, start_date: nil, start_index: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/reports', options) + command.response_representation = Google::Apis::YoutubeAnalyticsV2::QueryResponse::Representation + command.response_class = Google::Apis::YoutubeAnalyticsV2::QueryResponse + command.query['currency'] = currency unless currency.nil? + command.query['dimensions'] = dimensions unless dimensions.nil? + command.query['endDate'] = end_date unless end_date.nil? + command.query['filters'] = filters unless filters.nil? + command.query['ids'] = ids unless ids.nil? + command.query['includeHistoricalChannelData'] = include_historical_channel_data unless include_historical_channel_data.nil? + command.query['maxResults'] = max_results unless max_results.nil? + command.query['metrics'] = metrics unless metrics.nil? + command.query['sort'] = sort unless sort.nil? + command.query['startDate'] = start_date unless start_date.nil? + command.query['startIndex'] = start_index unless start_index.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + end + end + end + end +end