Autogenerated update (2018-11-23)
Update: - cloudsearch_v1
This commit is contained in:
parent
d656fe1cb7
commit
a9a2429c98
|
@ -16722,6 +16722,8 @@
|
|||
"/cloudsearch:v1/BooleanOperatorOptions/operatorName": operator_name
|
||||
"/cloudsearch:v1/BooleanPropertyOptions": boolean_property_options
|
||||
"/cloudsearch:v1/BooleanPropertyOptions/operatorOptions": operator_options
|
||||
"/cloudsearch:v1/CheckAccessResponse": check_access_response
|
||||
"/cloudsearch:v1/CheckAccessResponse/hasAccess": has_access
|
||||
"/cloudsearch:v1/CompositeFilter": composite_filter
|
||||
"/cloudsearch:v1/CompositeFilter/logicOperator": logic_operator
|
||||
"/cloudsearch:v1/CompositeFilter/subFilters": sub_filters
|
||||
|
@ -17152,6 +17154,14 @@
|
|||
"/cloudsearch:v1/SearchApplication/scoringConfig": scoring_config
|
||||
"/cloudsearch:v1/SearchApplication/sourceConfig": source_config
|
||||
"/cloudsearch:v1/SearchApplication/sourceConfig/source_config": source_config
|
||||
"/cloudsearch:v1/SearchItemsByViewUrlRequest": search_items_by_view_url_request
|
||||
"/cloudsearch:v1/SearchItemsByViewUrlRequest/debugOptions": debug_options
|
||||
"/cloudsearch:v1/SearchItemsByViewUrlRequest/pageToken": page_token
|
||||
"/cloudsearch:v1/SearchItemsByViewUrlRequest/viewUrl": view_url
|
||||
"/cloudsearch:v1/SearchItemsByViewUrlResponse": search_items_by_view_url_response
|
||||
"/cloudsearch:v1/SearchItemsByViewUrlResponse/items": items
|
||||
"/cloudsearch:v1/SearchItemsByViewUrlResponse/items/item": item
|
||||
"/cloudsearch:v1/SearchItemsByViewUrlResponse/nextPageToken": next_page_token
|
||||
"/cloudsearch:v1/SearchQualityMetadata": search_quality_metadata
|
||||
"/cloudsearch:v1/SearchQualityMetadata/quality": quality
|
||||
"/cloudsearch:v1/SearchRequest": search_request
|
||||
|
@ -17288,17 +17298,25 @@
|
|||
"/cloudsearch:v1/ValueFilter": value_filter
|
||||
"/cloudsearch:v1/ValueFilter/operatorName": operator_name
|
||||
"/cloudsearch:v1/ValueFilter/value": value
|
||||
"/cloudsearch:v1/cloudsearch.debug.datasources.items.checkAccess": check_debug_datasource_item_access
|
||||
"/cloudsearch:v1/cloudsearch.debug.datasources.items.checkAccess/debugOptions.enableDebugging": debug_options_enable_debugging
|
||||
"/cloudsearch:v1/cloudsearch.debug.datasources.items.checkAccess/name": name
|
||||
"/cloudsearch:v1/cloudsearch.debug.datasources.items.searchByViewUrl": search_debug_datasource_item_by_view_url
|
||||
"/cloudsearch:v1/cloudsearch.debug.datasources.items.searchByViewUrl/name": name
|
||||
"/cloudsearch:v1/cloudsearch.debug.datasources.items.unmappedids.list": list_debug_datasource_item_unmappedids
|
||||
"/cloudsearch:v1/cloudsearch.debug.datasources.items.unmappedids.list/debugOptions.enableDebugging": debug_options_enable_debugging
|
||||
"/cloudsearch:v1/cloudsearch.debug.datasources.items.unmappedids.list/pageSize": page_size
|
||||
"/cloudsearch:v1/cloudsearch.debug.datasources.items.unmappedids.list/pageToken": page_token
|
||||
"/cloudsearch:v1/cloudsearch.debug.datasources.items.unmappedids.list/parent": parent
|
||||
"/cloudsearch:v1/cloudsearch.debug.identitysources.items.listForunmappedidentity": list_debug_identitysource_item_forunmappedidentity
|
||||
"/cloudsearch:v1/cloudsearch.debug.identitysources.items.listForunmappedidentity/debugOptions.enableDebugging": debug_options_enable_debugging
|
||||
"/cloudsearch:v1/cloudsearch.debug.identitysources.items.listForunmappedidentity/groupResourceName": group_resource_name
|
||||
"/cloudsearch:v1/cloudsearch.debug.identitysources.items.listForunmappedidentity/pageSize": page_size
|
||||
"/cloudsearch:v1/cloudsearch.debug.identitysources.items.listForunmappedidentity/pageToken": page_token
|
||||
"/cloudsearch:v1/cloudsearch.debug.identitysources.items.listForunmappedidentity/parent": parent
|
||||
"/cloudsearch:v1/cloudsearch.debug.identitysources.items.listForunmappedidentity/userResourceName": user_resource_name
|
||||
"/cloudsearch:v1/cloudsearch.debug.identitysources.unmappedids.list": list_debug_identitysource_unmappedids
|
||||
"/cloudsearch:v1/cloudsearch.debug.identitysources.unmappedids.list/debugOptions.enableDebugging": debug_options_enable_debugging
|
||||
"/cloudsearch:v1/cloudsearch.debug.identitysources.unmappedids.list/pageSize": page_size
|
||||
"/cloudsearch:v1/cloudsearch.debug.identitysources.unmappedids.list/pageToken": page_token
|
||||
"/cloudsearch:v1/cloudsearch.debug.identitysources.unmappedids.list/parent": parent
|
||||
|
@ -74194,6 +74212,112 @@
|
|||
"/pagespeedonline:v4/pagespeedonline.pagespeedapi.runpagespeed/utm_source": utm_source
|
||||
"/pagespeedonline:v4/quotaUser": quota_user
|
||||
"/pagespeedonline:v4/userIp": user_ip
|
||||
"/pagespeedonline:v5/GoogleprotobufValue": googleprotobuf_value
|
||||
"/pagespeedonline:v5/LighthouseAuditResultV5": lighthouse_audit_result_v5
|
||||
"/pagespeedonline:v5/LighthouseAuditResultV5/description": description
|
||||
"/pagespeedonline:v5/LighthouseAuditResultV5/details": details
|
||||
"/pagespeedonline:v5/LighthouseAuditResultV5/details/detail": detail
|
||||
"/pagespeedonline:v5/LighthouseAuditResultV5/displayValue": display_value
|
||||
"/pagespeedonline:v5/LighthouseAuditResultV5/errorMessage": error_message
|
||||
"/pagespeedonline:v5/LighthouseAuditResultV5/explanation": explanation
|
||||
"/pagespeedonline:v5/LighthouseAuditResultV5/id": id
|
||||
"/pagespeedonline:v5/LighthouseAuditResultV5/score": score
|
||||
"/pagespeedonline:v5/LighthouseAuditResultV5/scoreDisplayMode": score_display_mode
|
||||
"/pagespeedonline:v5/LighthouseAuditResultV5/title": title
|
||||
"/pagespeedonline:v5/LighthouseAuditResultV5/warnings": warnings
|
||||
"/pagespeedonline:v5/LighthouseCategoryV5": lighthouse_category_v5
|
||||
"/pagespeedonline:v5/LighthouseCategoryV5/auditRefs": audit_refs
|
||||
"/pagespeedonline:v5/LighthouseCategoryV5/auditRefs/audit_ref": audit_ref
|
||||
"/pagespeedonline:v5/LighthouseCategoryV5/auditRefs/audit_ref/group": group
|
||||
"/pagespeedonline:v5/LighthouseCategoryV5/auditRefs/audit_ref/id": id
|
||||
"/pagespeedonline:v5/LighthouseCategoryV5/auditRefs/audit_ref/weight": weight
|
||||
"/pagespeedonline:v5/LighthouseCategoryV5/description": description
|
||||
"/pagespeedonline:v5/LighthouseCategoryV5/id": id
|
||||
"/pagespeedonline:v5/LighthouseCategoryV5/manualDescription": manual_description
|
||||
"/pagespeedonline:v5/LighthouseCategoryV5/score": score
|
||||
"/pagespeedonline:v5/LighthouseCategoryV5/title": title
|
||||
"/pagespeedonline:v5/LighthouseResultV5": lighthouse_result_v5
|
||||
"/pagespeedonline:v5/LighthouseResultV5/audits": audits
|
||||
"/pagespeedonline:v5/LighthouseResultV5/audits/audit": audit
|
||||
"/pagespeedonline:v5/LighthouseResultV5/categories": categories
|
||||
"/pagespeedonline:v5/LighthouseResultV5/categories/category": category
|
||||
"/pagespeedonline:v5/LighthouseResultV5/categoryGroups": category_groups
|
||||
"/pagespeedonline:v5/LighthouseResultV5/categoryGroups/category_group": category_group
|
||||
"/pagespeedonline:v5/LighthouseResultV5/categoryGroups/category_group/description": description
|
||||
"/pagespeedonline:v5/LighthouseResultV5/categoryGroups/category_group/title": title
|
||||
"/pagespeedonline:v5/LighthouseResultV5/configSettings": config_settings
|
||||
"/pagespeedonline:v5/LighthouseResultV5/configSettings/emulatedFormFactor": emulated_form_factor
|
||||
"/pagespeedonline:v5/LighthouseResultV5/configSettings/locale": locale
|
||||
"/pagespeedonline:v5/LighthouseResultV5/configSettings/onlyCategories": only_categories
|
||||
"/pagespeedonline:v5/LighthouseResultV5/environment": environment
|
||||
"/pagespeedonline:v5/LighthouseResultV5/environment/benchmarkIndex": benchmark_index
|
||||
"/pagespeedonline:v5/LighthouseResultV5/environment/hostUserAgent": host_user_agent
|
||||
"/pagespeedonline:v5/LighthouseResultV5/environment/networkUserAgent": network_user_agent
|
||||
"/pagespeedonline:v5/LighthouseResultV5/fetchTime": fetch_time
|
||||
"/pagespeedonline:v5/LighthouseResultV5/finalUrl": final_url
|
||||
"/pagespeedonline:v5/LighthouseResultV5/i18n": i18n
|
||||
"/pagespeedonline:v5/LighthouseResultV5/i18n/rendererFormattedStrings": renderer_formatted_strings
|
||||
"/pagespeedonline:v5/LighthouseResultV5/i18n/rendererFormattedStrings/auditGroupExpandTooltip": audit_group_expand_tooltip
|
||||
"/pagespeedonline:v5/LighthouseResultV5/i18n/rendererFormattedStrings/crcInitialNavigation": crc_initial_navigation
|
||||
"/pagespeedonline:v5/LighthouseResultV5/i18n/rendererFormattedStrings/crcLongestDurationLabel": crc_longest_duration_label
|
||||
"/pagespeedonline:v5/LighthouseResultV5/i18n/rendererFormattedStrings/errorLabel": error_label
|
||||
"/pagespeedonline:v5/LighthouseResultV5/i18n/rendererFormattedStrings/errorMissingAuditInfo": error_missing_audit_info
|
||||
"/pagespeedonline:v5/LighthouseResultV5/i18n/rendererFormattedStrings/labDataTitle": lab_data_title
|
||||
"/pagespeedonline:v5/LighthouseResultV5/i18n/rendererFormattedStrings/lsPerformanceCategoryDescription": ls_performance_category_description
|
||||
"/pagespeedonline:v5/LighthouseResultV5/i18n/rendererFormattedStrings/manualAuditsGroupTitle": manual_audits_group_title
|
||||
"/pagespeedonline:v5/LighthouseResultV5/i18n/rendererFormattedStrings/notApplicableAuditsGroupTitle": not_applicable_audits_group_title
|
||||
"/pagespeedonline:v5/LighthouseResultV5/i18n/rendererFormattedStrings/opportunityResourceColumnLabel": opportunity_resource_column_label
|
||||
"/pagespeedonline:v5/LighthouseResultV5/i18n/rendererFormattedStrings/opportunitySavingsColumnLabel": opportunity_savings_column_label
|
||||
"/pagespeedonline:v5/LighthouseResultV5/i18n/rendererFormattedStrings/passedAuditsGroupTitle": passed_audits_group_title
|
||||
"/pagespeedonline:v5/LighthouseResultV5/i18n/rendererFormattedStrings/scorescaleLabel": scorescale_label
|
||||
"/pagespeedonline:v5/LighthouseResultV5/i18n/rendererFormattedStrings/toplevelWarningsMessage": toplevel_warnings_message
|
||||
"/pagespeedonline:v5/LighthouseResultV5/i18n/rendererFormattedStrings/varianceDisclaimer": variance_disclaimer
|
||||
"/pagespeedonline:v5/LighthouseResultV5/i18n/rendererFormattedStrings/warningHeader": warning_header
|
||||
"/pagespeedonline:v5/LighthouseResultV5/lighthouseVersion": lighthouse_version
|
||||
"/pagespeedonline:v5/LighthouseResultV5/requestedUrl": requested_url
|
||||
"/pagespeedonline:v5/LighthouseResultV5/runWarnings": run_warnings
|
||||
"/pagespeedonline:v5/LighthouseResultV5/runWarnings/run_warning": run_warning
|
||||
"/pagespeedonline:v5/LighthouseResultV5/runtimeError": runtime_error
|
||||
"/pagespeedonline:v5/LighthouseResultV5/runtimeError/code": code
|
||||
"/pagespeedonline:v5/LighthouseResultV5/runtimeError/message": message
|
||||
"/pagespeedonline:v5/LighthouseResultV5/timing": timing
|
||||
"/pagespeedonline:v5/LighthouseResultV5/timing/total": total
|
||||
"/pagespeedonline:v5/LighthouseResultV5/userAgent": user_agent
|
||||
"/pagespeedonline:v5/PagespeedApiLoadingExperienceV5": pagespeed_api_loading_experience_v5
|
||||
"/pagespeedonline:v5/PagespeedApiLoadingExperienceV5/id": id
|
||||
"/pagespeedonline:v5/PagespeedApiLoadingExperienceV5/initial_url": initial_url
|
||||
"/pagespeedonline:v5/PagespeedApiLoadingExperienceV5/metrics": metrics
|
||||
"/pagespeedonline:v5/PagespeedApiLoadingExperienceV5/metrics/metric": metric
|
||||
"/pagespeedonline:v5/PagespeedApiLoadingExperienceV5/metrics/metric/category": category
|
||||
"/pagespeedonline:v5/PagespeedApiLoadingExperienceV5/metrics/metric/distributions": distributions
|
||||
"/pagespeedonline:v5/PagespeedApiLoadingExperienceV5/metrics/metric/distributions/distribution": distribution
|
||||
"/pagespeedonline:v5/PagespeedApiLoadingExperienceV5/metrics/metric/distributions/distribution/max": max
|
||||
"/pagespeedonline:v5/PagespeedApiLoadingExperienceV5/metrics/metric/distributions/distribution/min": min
|
||||
"/pagespeedonline:v5/PagespeedApiLoadingExperienceV5/metrics/metric/distributions/distribution/proportion": proportion
|
||||
"/pagespeedonline:v5/PagespeedApiLoadingExperienceV5/metrics/metric/percentile": percentile
|
||||
"/pagespeedonline:v5/PagespeedApiLoadingExperienceV5/overall_category": overall_category
|
||||
"/pagespeedonline:v5/PagespeedApiPagespeedResponseV5": pagespeed_api_pagespeed_response_v5
|
||||
"/pagespeedonline:v5/PagespeedApiPagespeedResponseV5/analysisUTCTimestamp": analysis_utc_timestamp
|
||||
"/pagespeedonline:v5/PagespeedApiPagespeedResponseV5/captchaResult": captcha_result
|
||||
"/pagespeedonline:v5/PagespeedApiPagespeedResponseV5/id": id
|
||||
"/pagespeedonline:v5/PagespeedApiPagespeedResponseV5/kind": kind
|
||||
"/pagespeedonline:v5/PagespeedApiPagespeedResponseV5/lighthouseResult": lighthouse_result
|
||||
"/pagespeedonline:v5/PagespeedApiPagespeedResponseV5/loadingExperience": loading_experience
|
||||
"/pagespeedonline:v5/PagespeedApiPagespeedResponseV5/originLoadingExperience": origin_loading_experience
|
||||
"/pagespeedonline:v5/PagespeedApiPagespeedResponseV5/version": version
|
||||
"/pagespeedonline:v5/PagespeedApiPagespeedResponseV5/version/major": major
|
||||
"/pagespeedonline:v5/PagespeedApiPagespeedResponseV5/version/minor": minor
|
||||
"/pagespeedonline:v5/fields": fields
|
||||
"/pagespeedonline:v5/key": key
|
||||
"/pagespeedonline:v5/pagespeedonline.pagespeedapi.runpagespeed": runpagespeed_pagespeedapi
|
||||
"/pagespeedonline:v5/pagespeedonline.pagespeedapi.runpagespeed/category": category
|
||||
"/pagespeedonline:v5/pagespeedonline.pagespeedapi.runpagespeed/locale": locale
|
||||
"/pagespeedonline:v5/pagespeedonline.pagespeedapi.runpagespeed/strategy": strategy
|
||||
"/pagespeedonline:v5/pagespeedonline.pagespeedapi.runpagespeed/url": url
|
||||
"/pagespeedonline:v5/pagespeedonline.pagespeedapi.runpagespeed/utm_campaign": utm_campaign
|
||||
"/pagespeedonline:v5/pagespeedonline.pagespeedapi.runpagespeed/utm_source": utm_source
|
||||
"/pagespeedonline:v5/quotaUser": quota_user
|
||||
"/pagespeedonline:v5/userIp": user_ip
|
||||
"/partners:v2/AdWordsManagerAccountInfo": ad_words_manager_account_info
|
||||
"/partners:v2/AdWordsManagerAccountInfo/customerName": customer_name
|
||||
"/partners:v2/AdWordsManagerAccountInfo/id": id
|
||||
|
|
|
@ -26,7 +26,7 @@ module Google
|
|||
# @see https://gsuite.google.com/products/cloud-search/
|
||||
module CloudsearchV1
|
||||
VERSION = 'V1'
|
||||
REVISION = '20181029'
|
||||
REVISION = '20181120'
|
||||
|
||||
# Index and serve your organization's data with Cloud Search
|
||||
AUTH_CLOUD_SEARCH = 'https://www.googleapis.com/auth/cloud_search'
|
||||
|
|
|
@ -73,6 +73,26 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
#
|
||||
class CheckAccessResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Returns true if principal has access. Returns false otherwise.
|
||||
# Corresponds to the JSON property `hasAccess`
|
||||
# @return [Boolean]
|
||||
attr_accessor :has_access
|
||||
alias_method :has_access?, :has_access
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@has_access = args[:has_access] if args.key?(:has_access)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class CompositeFilter
|
||||
include Google::Apis::Core::Hashable
|
||||
|
@ -3583,6 +3603,64 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
#
|
||||
class SearchItemsByViewUrlRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Shared request debug options for all cloudsearch RPC methods.
|
||||
# Corresponds to the JSON property `debugOptions`
|
||||
# @return [Google::Apis::CloudsearchV1::DebugOptions]
|
||||
attr_accessor :debug_options
|
||||
|
||||
# The next_page_token value returned from a previous request, if any.
|
||||
# Corresponds to the JSON property `pageToken`
|
||||
# @return [String]
|
||||
attr_accessor :page_token
|
||||
|
||||
# Specify the full view URL to find the corresponding item.
|
||||
# The maximum length is 2048 characters.
|
||||
# Corresponds to the JSON property `viewUrl`
|
||||
# @return [String]
|
||||
attr_accessor :view_url
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@debug_options = args[:debug_options] if args.key?(:debug_options)
|
||||
@page_token = args[:page_token] if args.key?(:page_token)
|
||||
@view_url = args[:view_url] if args.key?(:view_url)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class SearchItemsByViewUrlResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `items`
|
||||
# @return [Array<Google::Apis::CloudsearchV1::Item>]
|
||||
attr_accessor :items
|
||||
|
||||
# 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)
|
||||
@items = args[:items] if args.key?(:items)
|
||||
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
||||
end
|
||||
end
|
||||
|
||||
# Additional search quality metadata of the item.
|
||||
class SearchQualityMetadata
|
||||
include Google::Apis::Core::Hashable
|
||||
|
|
|
@ -34,6 +34,12 @@ module Google
|
|||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CheckAccessResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CompositeFilter
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
|
@ -634,6 +640,18 @@ module Google
|
|||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SearchItemsByViewUrlRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SearchItemsByViewUrlResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SearchQualityMetadata
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
|
@ -841,6 +859,13 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
class CheckAccessResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :has_access, as: 'hasAccess'
|
||||
end
|
||||
end
|
||||
|
||||
class CompositeFilter
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
|
@ -1824,6 +1849,25 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
class SearchItemsByViewUrlRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :debug_options, as: 'debugOptions', class: Google::Apis::CloudsearchV1::DebugOptions, decorator: Google::Apis::CloudsearchV1::DebugOptions::Representation
|
||||
|
||||
property :page_token, as: 'pageToken'
|
||||
property :view_url, as: 'viewUrl'
|
||||
end
|
||||
end
|
||||
|
||||
class SearchItemsByViewUrlResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :items, as: 'items', class: Google::Apis::CloudsearchV1::Item, decorator: Google::Apis::CloudsearchV1::Item::Representation
|
||||
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class SearchQualityMetadata
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
|
|
|
@ -48,10 +48,86 @@ module Google
|
|||
@batch_path = 'batch'
|
||||
end
|
||||
|
||||
# Checks whether an item is accessible by specified principal.
|
||||
# @param [String] name
|
||||
# Item name, format:
|
||||
# datasources/`source_id`/items/`item_id`
|
||||
# @param [Google::Apis::CloudsearchV1::Principal] principal_object
|
||||
# @param [Boolean] debug_options_enable_debugging
|
||||
# If set, the request will enable debugging features of Cloud Search.
|
||||
# Only turn on this field, if asked by Google to help with debugging.
|
||||
# @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::CloudsearchV1::CheckAccessResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudsearchV1::CheckAccessResponse]
|
||||
#
|
||||
# @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 check_debug_datasource_item_access(name, principal_object = nil, debug_options_enable_debugging: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/debug/{+name}:checkAccess', options)
|
||||
command.request_representation = Google::Apis::CloudsearchV1::Principal::Representation
|
||||
command.request_object = principal_object
|
||||
command.response_representation = Google::Apis::CloudsearchV1::CheckAccessResponse::Representation
|
||||
command.response_class = Google::Apis::CloudsearchV1::CheckAccessResponse
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['debugOptions.enableDebugging'] = debug_options_enable_debugging unless debug_options_enable_debugging.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Fetches the item whose viewUrl exactly matches that of the URL provided
|
||||
# in the request.
|
||||
# @param [String] name
|
||||
# Source name, format:
|
||||
# datasources/`source_id`
|
||||
# @param [Google::Apis::CloudsearchV1::SearchItemsByViewUrlRequest] search_items_by_view_url_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::CloudsearchV1::SearchItemsByViewUrlResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudsearchV1::SearchItemsByViewUrlResponse]
|
||||
#
|
||||
# @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 search_debug_datasource_item_by_view_url(name, search_items_by_view_url_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/debug/{+name}/items:searchByViewUrl', options)
|
||||
command.request_representation = Google::Apis::CloudsearchV1::SearchItemsByViewUrlRequest::Representation
|
||||
command.request_object = search_items_by_view_url_request_object
|
||||
command.response_representation = Google::Apis::CloudsearchV1::SearchItemsByViewUrlResponse::Representation
|
||||
command.response_class = Google::Apis::CloudsearchV1::SearchItemsByViewUrlResponse
|
||||
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 all unmapped identities for a specific item.
|
||||
# @param [String] parent
|
||||
# The name of the item, in the following format:
|
||||
# datasources/`source_id`/items/`ID`
|
||||
# @param [Boolean] debug_options_enable_debugging
|
||||
# If set, the request will enable debugging features of Cloud Search.
|
||||
# Only turn on this field, if asked by Google to help with debugging.
|
||||
# @param [Fixnum] page_size
|
||||
# Maximum number of items to fetch in a request.
|
||||
# Defaults to 100.
|
||||
|
@ -74,11 +150,12 @@ module Google
|
|||
# @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_debug_datasource_item_unmappedids(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
def list_debug_datasource_item_unmappedids(parent, debug_options_enable_debugging: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/debug/{+parent}/unmappedids', options)
|
||||
command.response_representation = Google::Apis::CloudsearchV1::ListUnmappedIdentitiesResponse::Representation
|
||||
command.response_class = Google::Apis::CloudsearchV1::ListUnmappedIdentitiesResponse
|
||||
command.params['parent'] = parent unless parent.nil?
|
||||
command.query['debugOptions.enableDebugging'] = debug_options_enable_debugging unless debug_options_enable_debugging.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?
|
||||
|
@ -90,6 +167,9 @@ module Google
|
|||
# @param [String] parent
|
||||
# The name of the identity source, in the following format:
|
||||
# identitysources/`source_id``
|
||||
# @param [Boolean] debug_options_enable_debugging
|
||||
# If set, the request will enable debugging features of Cloud Search.
|
||||
# Only turn on this field, if asked by Google to help with debugging.
|
||||
# @param [String] group_resource_name
|
||||
# @param [Fixnum] page_size
|
||||
# Maximum number of items to fetch in a request.
|
||||
|
@ -114,11 +194,12 @@ module Google
|
|||
# @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_debug_identitysource_item_forunmappedidentity(parent, group_resource_name: nil, page_size: nil, page_token: nil, user_resource_name: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
def list_debug_identitysource_item_forunmappedidentity(parent, debug_options_enable_debugging: nil, group_resource_name: nil, page_size: nil, page_token: nil, user_resource_name: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/debug/{+parent}/items:forunmappedidentity', options)
|
||||
command.response_representation = Google::Apis::CloudsearchV1::ListItemNamesForUnmappedIdentityResponse::Representation
|
||||
command.response_class = Google::Apis::CloudsearchV1::ListItemNamesForUnmappedIdentityResponse
|
||||
command.params['parent'] = parent unless parent.nil?
|
||||
command.query['debugOptions.enableDebugging'] = debug_options_enable_debugging unless debug_options_enable_debugging.nil?
|
||||
command.query['groupResourceName'] = group_resource_name unless group_resource_name.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
|
@ -132,6 +213,9 @@ module Google
|
|||
# @param [String] parent
|
||||
# The name of the identity source, in the following format:
|
||||
# identitysources/`source_id`
|
||||
# @param [Boolean] debug_options_enable_debugging
|
||||
# If set, the request will enable debugging features of Cloud Search.
|
||||
# Only turn on this field, if asked by Google to help with debugging.
|
||||
# @param [Fixnum] page_size
|
||||
# Maximum number of items to fetch in a request.
|
||||
# Defaults to 100.
|
||||
|
@ -156,11 +240,12 @@ module Google
|
|||
# @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_debug_identitysource_unmappedids(parent, page_size: nil, page_token: nil, resolution_status_code: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
def list_debug_identitysource_unmappedids(parent, debug_options_enable_debugging: nil, page_size: nil, page_token: nil, resolution_status_code: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/debug/{+parent}/unmappedids', options)
|
||||
command.response_representation = Google::Apis::CloudsearchV1::ListUnmappedIdentitiesResponse::Representation
|
||||
command.response_class = Google::Apis::CloudsearchV1::ListUnmappedIdentitiesResponse
|
||||
command.params['parent'] = parent unless parent.nil?
|
||||
command.query['debugOptions.enableDebugging'] = debug_options_enable_debugging unless debug_options_enable_debugging.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['resolutionStatusCode'] = resolution_status_code unless resolution_status_code.nil?
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
# 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/pagespeedonline_v5/service.rb'
|
||||
require 'google/apis/pagespeedonline_v5/classes.rb'
|
||||
require 'google/apis/pagespeedonline_v5/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# PageSpeed Insights API
|
||||
#
|
||||
# Analyzes the performance of a web page and provides tailored suggestions to
|
||||
# make that page faster.
|
||||
#
|
||||
# @see https://developers.google.com/speed/docs/insights/v5/get-started
|
||||
module PagespeedonlineV5
|
||||
VERSION = 'V5'
|
||||
REVISION = '20181120'
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,724 @@
|
|||
# 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 PagespeedonlineV5
|
||||
|
||||
#
|
||||
class LighthouseAuditResultV5
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The description of the audit.
|
||||
# Corresponds to the JSON property `description`
|
||||
# @return [String]
|
||||
attr_accessor :description
|
||||
|
||||
# Freeform details section of the audit.
|
||||
# Corresponds to the JSON property `details`
|
||||
# @return [Hash<String,Object>]
|
||||
attr_accessor :details
|
||||
|
||||
# The value that should be displayed on the UI for this audit.
|
||||
# Corresponds to the JSON property `displayValue`
|
||||
# @return [String]
|
||||
attr_accessor :display_value
|
||||
|
||||
# An error message from a thrown error inside the audit.
|
||||
# Corresponds to the JSON property `errorMessage`
|
||||
# @return [String]
|
||||
attr_accessor :error_message
|
||||
|
||||
# An explanation of the errors in the audit.
|
||||
# Corresponds to the JSON property `explanation`
|
||||
# @return [String]
|
||||
attr_accessor :explanation
|
||||
|
||||
# The audit's id.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `score`
|
||||
# @return [Object]
|
||||
attr_accessor :score
|
||||
|
||||
# The enumerated score display mode.
|
||||
# Corresponds to the JSON property `scoreDisplayMode`
|
||||
# @return [String]
|
||||
attr_accessor :score_display_mode
|
||||
|
||||
# The human readable title.
|
||||
# Corresponds to the JSON property `title`
|
||||
# @return [String]
|
||||
attr_accessor :title
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `warnings`
|
||||
# @return [Object]
|
||||
attr_accessor :warnings
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@description = args[:description] if args.key?(:description)
|
||||
@details = args[:details] if args.key?(:details)
|
||||
@display_value = args[:display_value] if args.key?(:display_value)
|
||||
@error_message = args[:error_message] if args.key?(:error_message)
|
||||
@explanation = args[:explanation] if args.key?(:explanation)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@score = args[:score] if args.key?(:score)
|
||||
@score_display_mode = args[:score_display_mode] if args.key?(:score_display_mode)
|
||||
@title = args[:title] if args.key?(:title)
|
||||
@warnings = args[:warnings] if args.key?(:warnings)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class LighthouseCategoryV5
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# An array of references to all the audit members of this category.
|
||||
# Corresponds to the JSON property `auditRefs`
|
||||
# @return [Array<Google::Apis::PagespeedonlineV5::LighthouseCategoryV5::AuditRef>]
|
||||
attr_accessor :audit_refs
|
||||
|
||||
# A more detailed description of the category and its importance.
|
||||
# Corresponds to the JSON property `description`
|
||||
# @return [String]
|
||||
attr_accessor :description
|
||||
|
||||
# The string identifier of the category.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# A description for the manual audits in the category.
|
||||
# Corresponds to the JSON property `manualDescription`
|
||||
# @return [String]
|
||||
attr_accessor :manual_description
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `score`
|
||||
# @return [Object]
|
||||
attr_accessor :score
|
||||
|
||||
# The human-friendly name of the category.
|
||||
# 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)
|
||||
@audit_refs = args[:audit_refs] if args.key?(:audit_refs)
|
||||
@description = args[:description] if args.key?(:description)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@manual_description = args[:manual_description] if args.key?(:manual_description)
|
||||
@score = args[:score] if args.key?(:score)
|
||||
@title = args[:title] if args.key?(:title)
|
||||
end
|
||||
|
||||
#
|
||||
class AuditRef
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The category group that the audit belongs to (optional).
|
||||
# Corresponds to the JSON property `group`
|
||||
# @return [String]
|
||||
attr_accessor :group
|
||||
|
||||
# The audit ref id.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# The weight this audit's score has on the overall category score.
|
||||
# Corresponds to the JSON property `weight`
|
||||
# @return [Float]
|
||||
attr_accessor :weight
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@group = args[:group] if args.key?(:group)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@weight = args[:weight] if args.key?(:weight)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class LighthouseResultV5
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Map of audits in the LHR.
|
||||
# Corresponds to the JSON property `audits`
|
||||
# @return [Hash<String,Google::Apis::PagespeedonlineV5::LighthouseAuditResultV5>]
|
||||
attr_accessor :audits
|
||||
|
||||
# Map of categories in the LHR.
|
||||
# Corresponds to the JSON property `categories`
|
||||
# @return [Hash<String,Google::Apis::PagespeedonlineV5::LighthouseCategoryV5>]
|
||||
attr_accessor :categories
|
||||
|
||||
# Map of category groups in the LHR.
|
||||
# Corresponds to the JSON property `categoryGroups`
|
||||
# @return [Hash<String,Google::Apis::PagespeedonlineV5::LighthouseResultV5::CategoryGroup>]
|
||||
attr_accessor :category_groups
|
||||
|
||||
# The configuration settings for this LHR.
|
||||
# Corresponds to the JSON property `configSettings`
|
||||
# @return [Google::Apis::PagespeedonlineV5::LighthouseResultV5::ConfigSettings]
|
||||
attr_accessor :config_settings
|
||||
|
||||
# Environment settings that were used when making this LHR.
|
||||
# Corresponds to the JSON property `environment`
|
||||
# @return [Google::Apis::PagespeedonlineV5::LighthouseResultV5::Environment]
|
||||
attr_accessor :environment
|
||||
|
||||
# The time that this run was fetched.
|
||||
# Corresponds to the JSON property `fetchTime`
|
||||
# @return [String]
|
||||
attr_accessor :fetch_time
|
||||
|
||||
# The final resolved url that was audited.
|
||||
# Corresponds to the JSON property `finalUrl`
|
||||
# @return [String]
|
||||
attr_accessor :final_url
|
||||
|
||||
# The internationalization strings that are required to render the LHR.
|
||||
# Corresponds to the JSON property `i18n`
|
||||
# @return [Google::Apis::PagespeedonlineV5::LighthouseResultV5::I18n]
|
||||
attr_accessor :i18n
|
||||
|
||||
# The lighthouse version that was used to generate this LHR.
|
||||
# Corresponds to the JSON property `lighthouseVersion`
|
||||
# @return [String]
|
||||
attr_accessor :lighthouse_version
|
||||
|
||||
# The original requested url.
|
||||
# Corresponds to the JSON property `requestedUrl`
|
||||
# @return [String]
|
||||
attr_accessor :requested_url
|
||||
|
||||
# List of all run warnings in the LHR. Will always output to at least `[]`.
|
||||
# Corresponds to the JSON property `runWarnings`
|
||||
# @return [Array<Object>]
|
||||
attr_accessor :run_warnings
|
||||
|
||||
# A top-level error message that, if present, indicates a serious enough problem
|
||||
# that this Lighthouse result may need to be discarded.
|
||||
# Corresponds to the JSON property `runtimeError`
|
||||
# @return [Google::Apis::PagespeedonlineV5::LighthouseResultV5::RuntimeError]
|
||||
attr_accessor :runtime_error
|
||||
|
||||
# Timing information for this LHR.
|
||||
# Corresponds to the JSON property `timing`
|
||||
# @return [Google::Apis::PagespeedonlineV5::LighthouseResultV5::Timing]
|
||||
attr_accessor :timing
|
||||
|
||||
# The user agent that was used to run this LHR.
|
||||
# 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)
|
||||
@audits = args[:audits] if args.key?(:audits)
|
||||
@categories = args[:categories] if args.key?(:categories)
|
||||
@category_groups = args[:category_groups] if args.key?(:category_groups)
|
||||
@config_settings = args[:config_settings] if args.key?(:config_settings)
|
||||
@environment = args[:environment] if args.key?(:environment)
|
||||
@fetch_time = args[:fetch_time] if args.key?(:fetch_time)
|
||||
@final_url = args[:final_url] if args.key?(:final_url)
|
||||
@i18n = args[:i18n] if args.key?(:i18n)
|
||||
@lighthouse_version = args[:lighthouse_version] if args.key?(:lighthouse_version)
|
||||
@requested_url = args[:requested_url] if args.key?(:requested_url)
|
||||
@run_warnings = args[:run_warnings] if args.key?(:run_warnings)
|
||||
@runtime_error = args[:runtime_error] if args.key?(:runtime_error)
|
||||
@timing = args[:timing] if args.key?(:timing)
|
||||
@user_agent = args[:user_agent] if args.key?(:user_agent)
|
||||
end
|
||||
|
||||
# A grouping contained in a category that groups similar audits together.
|
||||
class CategoryGroup
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# An optional human readable description of the category group.
|
||||
# Corresponds to the JSON property `description`
|
||||
# @return [String]
|
||||
attr_accessor :description
|
||||
|
||||
# The title of the category group.
|
||||
# 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)
|
||||
@description = args[:description] if args.key?(:description)
|
||||
@title = args[:title] if args.key?(:title)
|
||||
end
|
||||
end
|
||||
|
||||
# The configuration settings for this LHR.
|
||||
class ConfigSettings
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The form factor the emulation should use.
|
||||
# Corresponds to the JSON property `emulatedFormFactor`
|
||||
# @return [String]
|
||||
attr_accessor :emulated_form_factor
|
||||
|
||||
# The locale setting.
|
||||
# Corresponds to the JSON property `locale`
|
||||
# @return [String]
|
||||
attr_accessor :locale
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `onlyCategories`
|
||||
# @return [Object]
|
||||
attr_accessor :only_categories
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@emulated_form_factor = args[:emulated_form_factor] if args.key?(:emulated_form_factor)
|
||||
@locale = args[:locale] if args.key?(:locale)
|
||||
@only_categories = args[:only_categories] if args.key?(:only_categories)
|
||||
end
|
||||
end
|
||||
|
||||
# Environment settings that were used when making this LHR.
|
||||
class Environment
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The benchmark index number that indicates rough device class.
|
||||
# Corresponds to the JSON property `benchmarkIndex`
|
||||
# @return [Float]
|
||||
attr_accessor :benchmark_index
|
||||
|
||||
# The user agent string of the version of Chrome used.
|
||||
# Corresponds to the JSON property `hostUserAgent`
|
||||
# @return [String]
|
||||
attr_accessor :host_user_agent
|
||||
|
||||
# The user agent string that was sent over the network.
|
||||
# Corresponds to the JSON property `networkUserAgent`
|
||||
# @return [String]
|
||||
attr_accessor :network_user_agent
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@benchmark_index = args[:benchmark_index] if args.key?(:benchmark_index)
|
||||
@host_user_agent = args[:host_user_agent] if args.key?(:host_user_agent)
|
||||
@network_user_agent = args[:network_user_agent] if args.key?(:network_user_agent)
|
||||
end
|
||||
end
|
||||
|
||||
# The internationalization strings that are required to render the LHR.
|
||||
class I18n
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Internationalized strings that are formatted to the locale in configSettings.
|
||||
# Corresponds to the JSON property `rendererFormattedStrings`
|
||||
# @return [Google::Apis::PagespeedonlineV5::LighthouseResultV5::I18n::RendererFormattedStrings]
|
||||
attr_accessor :renderer_formatted_strings
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@renderer_formatted_strings = args[:renderer_formatted_strings] if args.key?(:renderer_formatted_strings)
|
||||
end
|
||||
|
||||
# Internationalized strings that are formatted to the locale in configSettings.
|
||||
class RendererFormattedStrings
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The tooltip text on an expandable chevron icon.
|
||||
# Corresponds to the JSON property `auditGroupExpandTooltip`
|
||||
# @return [String]
|
||||
attr_accessor :audit_group_expand_tooltip
|
||||
|
||||
# The label for the initial request in a critical request chain.
|
||||
# Corresponds to the JSON property `crcInitialNavigation`
|
||||
# @return [String]
|
||||
attr_accessor :crc_initial_navigation
|
||||
|
||||
# The label for values shown in the summary of critical request chains.
|
||||
# Corresponds to the JSON property `crcLongestDurationLabel`
|
||||
# @return [String]
|
||||
attr_accessor :crc_longest_duration_label
|
||||
|
||||
# The label shown next to an audit or metric that has had an error.
|
||||
# Corresponds to the JSON property `errorLabel`
|
||||
# @return [String]
|
||||
attr_accessor :error_label
|
||||
|
||||
# The error string shown next to an erroring audit.
|
||||
# Corresponds to the JSON property `errorMissingAuditInfo`
|
||||
# @return [String]
|
||||
attr_accessor :error_missing_audit_info
|
||||
|
||||
# The title of the lab data performance category.
|
||||
# Corresponds to the JSON property `labDataTitle`
|
||||
# @return [String]
|
||||
attr_accessor :lab_data_title
|
||||
|
||||
# The disclaimer shown under performance explaning that the network can vary.
|
||||
# Corresponds to the JSON property `lsPerformanceCategoryDescription`
|
||||
# @return [String]
|
||||
attr_accessor :ls_performance_category_description
|
||||
|
||||
# The heading shown above a list of audits that were not computerd in the run.
|
||||
# Corresponds to the JSON property `manualAuditsGroupTitle`
|
||||
# @return [String]
|
||||
attr_accessor :manual_audits_group_title
|
||||
|
||||
# The heading shown above a list of audits that do not apply to a page.
|
||||
# Corresponds to the JSON property `notApplicableAuditsGroupTitle`
|
||||
# @return [String]
|
||||
attr_accessor :not_applicable_audits_group_title
|
||||
|
||||
# The heading for the estimated page load savings opportunity of an audit.
|
||||
# Corresponds to the JSON property `opportunityResourceColumnLabel`
|
||||
# @return [String]
|
||||
attr_accessor :opportunity_resource_column_label
|
||||
|
||||
# The heading for the estimated page load savings of opportunity audits.
|
||||
# Corresponds to the JSON property `opportunitySavingsColumnLabel`
|
||||
# @return [String]
|
||||
attr_accessor :opportunity_savings_column_label
|
||||
|
||||
# The heading that is shown above a list of audits that are passing.
|
||||
# Corresponds to the JSON property `passedAuditsGroupTitle`
|
||||
# @return [String]
|
||||
attr_accessor :passed_audits_group_title
|
||||
|
||||
# The label that explains the score gauges scale (0-49, 50-89, 90-100).
|
||||
# Corresponds to the JSON property `scorescaleLabel`
|
||||
# @return [String]
|
||||
attr_accessor :scorescale_label
|
||||
|
||||
# The label shown preceding important warnings that may have invalidated an
|
||||
# entire report.
|
||||
# Corresponds to the JSON property `toplevelWarningsMessage`
|
||||
# @return [String]
|
||||
attr_accessor :toplevel_warnings_message
|
||||
|
||||
# The disclaimer shown below a performance metric value.
|
||||
# Corresponds to the JSON property `varianceDisclaimer`
|
||||
# @return [String]
|
||||
attr_accessor :variance_disclaimer
|
||||
|
||||
# The label shown above a bulleted list of warnings.
|
||||
# Corresponds to the JSON property `warningHeader`
|
||||
# @return [String]
|
||||
attr_accessor :warning_header
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@audit_group_expand_tooltip = args[:audit_group_expand_tooltip] if args.key?(:audit_group_expand_tooltip)
|
||||
@crc_initial_navigation = args[:crc_initial_navigation] if args.key?(:crc_initial_navigation)
|
||||
@crc_longest_duration_label = args[:crc_longest_duration_label] if args.key?(:crc_longest_duration_label)
|
||||
@error_label = args[:error_label] if args.key?(:error_label)
|
||||
@error_missing_audit_info = args[:error_missing_audit_info] if args.key?(:error_missing_audit_info)
|
||||
@lab_data_title = args[:lab_data_title] if args.key?(:lab_data_title)
|
||||
@ls_performance_category_description = args[:ls_performance_category_description] if args.key?(:ls_performance_category_description)
|
||||
@manual_audits_group_title = args[:manual_audits_group_title] if args.key?(:manual_audits_group_title)
|
||||
@not_applicable_audits_group_title = args[:not_applicable_audits_group_title] if args.key?(:not_applicable_audits_group_title)
|
||||
@opportunity_resource_column_label = args[:opportunity_resource_column_label] if args.key?(:opportunity_resource_column_label)
|
||||
@opportunity_savings_column_label = args[:opportunity_savings_column_label] if args.key?(:opportunity_savings_column_label)
|
||||
@passed_audits_group_title = args[:passed_audits_group_title] if args.key?(:passed_audits_group_title)
|
||||
@scorescale_label = args[:scorescale_label] if args.key?(:scorescale_label)
|
||||
@toplevel_warnings_message = args[:toplevel_warnings_message] if args.key?(:toplevel_warnings_message)
|
||||
@variance_disclaimer = args[:variance_disclaimer] if args.key?(:variance_disclaimer)
|
||||
@warning_header = args[:warning_header] if args.key?(:warning_header)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# A top-level error message that, if present, indicates a serious enough problem
|
||||
# that this Lighthouse result may need to be discarded.
|
||||
class RuntimeError
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The enumerated Lighthouse Error code.
|
||||
# Corresponds to the JSON property `code`
|
||||
# @return [String]
|
||||
attr_accessor :code
|
||||
|
||||
# A human readable message explaining the error code.
|
||||
# Corresponds to the JSON property `message`
|
||||
# @return [String]
|
||||
attr_accessor :message
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@code = args[:code] if args.key?(:code)
|
||||
@message = args[:message] if args.key?(:message)
|
||||
end
|
||||
end
|
||||
|
||||
# Timing information for this LHR.
|
||||
class Timing
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The total duration of Lighthouse's run.
|
||||
# Corresponds to the JSON property `total`
|
||||
# @return [Float]
|
||||
attr_accessor :total
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@total = args[:total] if args.key?(:total)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class PagespeedApiLoadingExperienceV5
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The url, pattern or origin which the metrics are on.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `initial_url`
|
||||
# @return [String]
|
||||
attr_accessor :initial_url
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `metrics`
|
||||
# @return [Hash<String,Google::Apis::PagespeedonlineV5::PagespeedApiLoadingExperienceV5::Metric>]
|
||||
attr_accessor :metrics
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `overall_category`
|
||||
# @return [String]
|
||||
attr_accessor :overall_category
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@initial_url = args[:initial_url] if args.key?(:initial_url)
|
||||
@metrics = args[:metrics] if args.key?(:metrics)
|
||||
@overall_category = args[:overall_category] if args.key?(:overall_category)
|
||||
end
|
||||
|
||||
# The type of the metric.
|
||||
class Metric
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `category`
|
||||
# @return [String]
|
||||
attr_accessor :category
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `distributions`
|
||||
# @return [Array<Google::Apis::PagespeedonlineV5::PagespeedApiLoadingExperienceV5::Metric::Distribution>]
|
||||
attr_accessor :distributions
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `percentile`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :percentile
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@category = args[:category] if args.key?(:category)
|
||||
@distributions = args[:distributions] if args.key?(:distributions)
|
||||
@percentile = args[:percentile] if args.key?(:percentile)
|
||||
end
|
||||
|
||||
#
|
||||
class Distribution
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `max`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :max
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `min`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :min
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `proportion`
|
||||
# @return [Float]
|
||||
attr_accessor :proportion
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@max = args[:max] if args.key?(:max)
|
||||
@min = args[:min] if args.key?(:min)
|
||||
@proportion = args[:proportion] if args.key?(:proportion)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class PagespeedApiPagespeedResponseV5
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The UTC timestamp of this analysis.
|
||||
# Corresponds to the JSON property `analysisUTCTimestamp`
|
||||
# @return [String]
|
||||
attr_accessor :analysis_utc_timestamp
|
||||
|
||||
# The captcha verify result
|
||||
# Corresponds to the JSON property `captchaResult`
|
||||
# @return [String]
|
||||
attr_accessor :captcha_result
|
||||
|
||||
# Canonicalized and final URL for the document, after following page redirects (
|
||||
# if any).
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# Kind of result.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Lighthouse response for the audit url as an object.
|
||||
# Corresponds to the JSON property `lighthouseResult`
|
||||
# @return [Google::Apis::PagespeedonlineV5::LighthouseResultV5]
|
||||
attr_accessor :lighthouse_result
|
||||
|
||||
# Metrics of end users' page loading experience.
|
||||
# Corresponds to the JSON property `loadingExperience`
|
||||
# @return [Google::Apis::PagespeedonlineV5::PagespeedApiLoadingExperienceV5]
|
||||
attr_accessor :loading_experience
|
||||
|
||||
# Metrics of the aggregated page loading experience of the origin
|
||||
# Corresponds to the JSON property `originLoadingExperience`
|
||||
# @return [Google::Apis::PagespeedonlineV5::PagespeedApiLoadingExperienceV5]
|
||||
attr_accessor :origin_loading_experience
|
||||
|
||||
# The version of PageSpeed used to generate these results.
|
||||
# Corresponds to the JSON property `version`
|
||||
# @return [Google::Apis::PagespeedonlineV5::PagespeedApiPagespeedResponseV5::Version]
|
||||
attr_accessor :version
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@analysis_utc_timestamp = args[:analysis_utc_timestamp] if args.key?(:analysis_utc_timestamp)
|
||||
@captcha_result = args[:captcha_result] if args.key?(:captcha_result)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@lighthouse_result = args[:lighthouse_result] if args.key?(:lighthouse_result)
|
||||
@loading_experience = args[:loading_experience] if args.key?(:loading_experience)
|
||||
@origin_loading_experience = args[:origin_loading_experience] if args.key?(:origin_loading_experience)
|
||||
@version = args[:version] if args.key?(:version)
|
||||
end
|
||||
|
||||
# The version of PageSpeed used to generate these results.
|
||||
class Version
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The major version number of PageSpeed used to generate these results.
|
||||
# Corresponds to the JSON property `major`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :major
|
||||
|
||||
# The minor version number of PageSpeed used to generate these results.
|
||||
# Corresponds to the JSON property `minor`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :minor
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@major = args[:major] if args.key?(:major)
|
||||
@minor = args[:minor] if args.key?(:minor)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,315 @@
|
|||
# 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 PagespeedonlineV5
|
||||
|
||||
class LighthouseAuditResultV5
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class LighthouseCategoryV5
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class AuditRef
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class LighthouseResultV5
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class CategoryGroup
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ConfigSettings
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Environment
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class I18n
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class RendererFormattedStrings
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class RuntimeError
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Timing
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class PagespeedApiLoadingExperienceV5
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class Metric
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class Distribution
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class PagespeedApiPagespeedResponseV5
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class Version
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class LighthouseAuditResultV5
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :description, as: 'description'
|
||||
hash :details, as: 'details'
|
||||
property :display_value, as: 'displayValue'
|
||||
property :error_message, as: 'errorMessage'
|
||||
property :explanation, as: 'explanation'
|
||||
property :id, as: 'id'
|
||||
property :score, as: 'score'
|
||||
property :score_display_mode, as: 'scoreDisplayMode'
|
||||
property :title, as: 'title'
|
||||
property :warnings, as: 'warnings'
|
||||
end
|
||||
end
|
||||
|
||||
class LighthouseCategoryV5
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :audit_refs, as: 'auditRefs', class: Google::Apis::PagespeedonlineV5::LighthouseCategoryV5::AuditRef, decorator: Google::Apis::PagespeedonlineV5::LighthouseCategoryV5::AuditRef::Representation
|
||||
|
||||
property :description, as: 'description'
|
||||
property :id, as: 'id'
|
||||
property :manual_description, as: 'manualDescription'
|
||||
property :score, as: 'score'
|
||||
property :title, as: 'title'
|
||||
end
|
||||
|
||||
class AuditRef
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :group, as: 'group'
|
||||
property :id, as: 'id'
|
||||
property :weight, as: 'weight'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class LighthouseResultV5
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
hash :audits, as: 'audits', class: Google::Apis::PagespeedonlineV5::LighthouseAuditResultV5, decorator: Google::Apis::PagespeedonlineV5::LighthouseAuditResultV5::Representation
|
||||
|
||||
hash :categories, as: 'categories', class: Google::Apis::PagespeedonlineV5::LighthouseCategoryV5, decorator: Google::Apis::PagespeedonlineV5::LighthouseCategoryV5::Representation
|
||||
|
||||
hash :category_groups, as: 'categoryGroups', class: Google::Apis::PagespeedonlineV5::LighthouseResultV5::CategoryGroup, decorator: Google::Apis::PagespeedonlineV5::LighthouseResultV5::CategoryGroup::Representation
|
||||
|
||||
property :config_settings, as: 'configSettings', class: Google::Apis::PagespeedonlineV5::LighthouseResultV5::ConfigSettings, decorator: Google::Apis::PagespeedonlineV5::LighthouseResultV5::ConfigSettings::Representation
|
||||
|
||||
property :environment, as: 'environment', class: Google::Apis::PagespeedonlineV5::LighthouseResultV5::Environment, decorator: Google::Apis::PagespeedonlineV5::LighthouseResultV5::Environment::Representation
|
||||
|
||||
property :fetch_time, as: 'fetchTime'
|
||||
property :final_url, as: 'finalUrl'
|
||||
property :i18n, as: 'i18n', class: Google::Apis::PagespeedonlineV5::LighthouseResultV5::I18n, decorator: Google::Apis::PagespeedonlineV5::LighthouseResultV5::I18n::Representation
|
||||
|
||||
property :lighthouse_version, as: 'lighthouseVersion'
|
||||
property :requested_url, as: 'requestedUrl'
|
||||
collection :run_warnings, as: 'runWarnings'
|
||||
property :runtime_error, as: 'runtimeError', class: Google::Apis::PagespeedonlineV5::LighthouseResultV5::RuntimeError, decorator: Google::Apis::PagespeedonlineV5::LighthouseResultV5::RuntimeError::Representation
|
||||
|
||||
property :timing, as: 'timing', class: Google::Apis::PagespeedonlineV5::LighthouseResultV5::Timing, decorator: Google::Apis::PagespeedonlineV5::LighthouseResultV5::Timing::Representation
|
||||
|
||||
property :user_agent, as: 'userAgent'
|
||||
end
|
||||
|
||||
class CategoryGroup
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :description, as: 'description'
|
||||
property :title, as: 'title'
|
||||
end
|
||||
end
|
||||
|
||||
class ConfigSettings
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :emulated_form_factor, as: 'emulatedFormFactor'
|
||||
property :locale, as: 'locale'
|
||||
property :only_categories, as: 'onlyCategories'
|
||||
end
|
||||
end
|
||||
|
||||
class Environment
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :benchmark_index, as: 'benchmarkIndex'
|
||||
property :host_user_agent, as: 'hostUserAgent'
|
||||
property :network_user_agent, as: 'networkUserAgent'
|
||||
end
|
||||
end
|
||||
|
||||
class I18n
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :renderer_formatted_strings, as: 'rendererFormattedStrings', class: Google::Apis::PagespeedonlineV5::LighthouseResultV5::I18n::RendererFormattedStrings, decorator: Google::Apis::PagespeedonlineV5::LighthouseResultV5::I18n::RendererFormattedStrings::Representation
|
||||
|
||||
end
|
||||
|
||||
class RendererFormattedStrings
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :audit_group_expand_tooltip, as: 'auditGroupExpandTooltip'
|
||||
property :crc_initial_navigation, as: 'crcInitialNavigation'
|
||||
property :crc_longest_duration_label, as: 'crcLongestDurationLabel'
|
||||
property :error_label, as: 'errorLabel'
|
||||
property :error_missing_audit_info, as: 'errorMissingAuditInfo'
|
||||
property :lab_data_title, as: 'labDataTitle'
|
||||
property :ls_performance_category_description, as: 'lsPerformanceCategoryDescription'
|
||||
property :manual_audits_group_title, as: 'manualAuditsGroupTitle'
|
||||
property :not_applicable_audits_group_title, as: 'notApplicableAuditsGroupTitle'
|
||||
property :opportunity_resource_column_label, as: 'opportunityResourceColumnLabel'
|
||||
property :opportunity_savings_column_label, as: 'opportunitySavingsColumnLabel'
|
||||
property :passed_audits_group_title, as: 'passedAuditsGroupTitle'
|
||||
property :scorescale_label, as: 'scorescaleLabel'
|
||||
property :toplevel_warnings_message, as: 'toplevelWarningsMessage'
|
||||
property :variance_disclaimer, as: 'varianceDisclaimer'
|
||||
property :warning_header, as: 'warningHeader'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class RuntimeError
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :code, as: 'code'
|
||||
property :message, as: 'message'
|
||||
end
|
||||
end
|
||||
|
||||
class Timing
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :total, as: 'total'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class PagespeedApiLoadingExperienceV5
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, as: 'id'
|
||||
property :initial_url, as: 'initial_url'
|
||||
hash :metrics, as: 'metrics', class: Google::Apis::PagespeedonlineV5::PagespeedApiLoadingExperienceV5::Metric, decorator: Google::Apis::PagespeedonlineV5::PagespeedApiLoadingExperienceV5::Metric::Representation
|
||||
|
||||
property :overall_category, as: 'overall_category'
|
||||
end
|
||||
|
||||
class Metric
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :category, as: 'category'
|
||||
collection :distributions, as: 'distributions', class: Google::Apis::PagespeedonlineV5::PagespeedApiLoadingExperienceV5::Metric::Distribution, decorator: Google::Apis::PagespeedonlineV5::PagespeedApiLoadingExperienceV5::Metric::Distribution::Representation
|
||||
|
||||
property :percentile, as: 'percentile'
|
||||
end
|
||||
|
||||
class Distribution
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :max, as: 'max'
|
||||
property :min, as: 'min'
|
||||
property :proportion, as: 'proportion'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class PagespeedApiPagespeedResponseV5
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :analysis_utc_timestamp, as: 'analysisUTCTimestamp'
|
||||
property :captcha_result, as: 'captchaResult'
|
||||
property :id, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
property :lighthouse_result, as: 'lighthouseResult', class: Google::Apis::PagespeedonlineV5::LighthouseResultV5, decorator: Google::Apis::PagespeedonlineV5::LighthouseResultV5::Representation
|
||||
|
||||
property :loading_experience, as: 'loadingExperience', class: Google::Apis::PagespeedonlineV5::PagespeedApiLoadingExperienceV5, decorator: Google::Apis::PagespeedonlineV5::PagespeedApiLoadingExperienceV5::Representation
|
||||
|
||||
property :origin_loading_experience, as: 'originLoadingExperience', class: Google::Apis::PagespeedonlineV5::PagespeedApiLoadingExperienceV5, decorator: Google::Apis::PagespeedonlineV5::PagespeedApiLoadingExperienceV5::Representation
|
||||
|
||||
property :version, as: 'version', class: Google::Apis::PagespeedonlineV5::PagespeedApiPagespeedResponseV5::Version, decorator: Google::Apis::PagespeedonlineV5::PagespeedApiPagespeedResponseV5::Version::Representation
|
||||
|
||||
end
|
||||
|
||||
class Version
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :major, as: 'major'
|
||||
property :minor, as: 'minor'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,116 @@
|
|||
# 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 PagespeedonlineV5
|
||||
# PageSpeed Insights API
|
||||
#
|
||||
# Analyzes the performance of a web page and provides tailored suggestions to
|
||||
# make that page faster.
|
||||
#
|
||||
# @example
|
||||
# require 'google/apis/pagespeedonline_v5'
|
||||
#
|
||||
# Pagespeedonline = Google::Apis::PagespeedonlineV5 # Alias the module
|
||||
# service = Pagespeedonline::PagespeedonlineService.new
|
||||
#
|
||||
# @see https://developers.google.com/speed/docs/insights/v5/get-started
|
||||
class PagespeedonlineService < 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]
|
||||
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
||||
# characters.
|
||||
attr_accessor :quota_user
|
||||
|
||||
# @return [String]
|
||||
# Deprecated. Please use quotaUser instead.
|
||||
attr_accessor :user_ip
|
||||
|
||||
def initialize
|
||||
super('https://www.googleapis.com/', 'pagespeedonline/v5/')
|
||||
@batch_path = 'batch/pagespeedonline/v5'
|
||||
end
|
||||
|
||||
# Runs PageSpeed analysis on the page at the specified URL, and returns
|
||||
# PageSpeed scores, a list of suggestions to make that page faster, and other
|
||||
# information.
|
||||
# @param [String] url
|
||||
# The URL to fetch and analyze
|
||||
# @param [Array<String>, String] category
|
||||
# A Lighthouse category to run; if none are given, only Performance category
|
||||
# will be run
|
||||
# @param [String] locale
|
||||
# The locale used to localize formatted results
|
||||
# @param [String] strategy
|
||||
# The analysis strategy (desktop or mobile) to use, and desktop is the default
|
||||
# @param [String] utm_campaign
|
||||
# Campaign name for analytics.
|
||||
# @param [String] utm_source
|
||||
# Campaign source for analytics.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
||||
# characters.
|
||||
# @param [String] user_ip
|
||||
# Deprecated. Please use quotaUser instead.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PagespeedonlineV5::PagespeedApiPagespeedResponseV5] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PagespeedonlineV5::PagespeedApiPagespeedResponseV5]
|
||||
#
|
||||
# @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 runpagespeed_pagespeedapi(url, category: nil, locale: nil, strategy: nil, utm_campaign: nil, utm_source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'runPagespeed', options)
|
||||
command.response_representation = Google::Apis::PagespeedonlineV5::PagespeedApiPagespeedResponseV5::Representation
|
||||
command.response_class = Google::Apis::PagespeedonlineV5::PagespeedApiPagespeedResponseV5
|
||||
command.query['category'] = category unless category.nil?
|
||||
command.query['locale'] = locale unless locale.nil?
|
||||
command.query['strategy'] = strategy unless strategy.nil?
|
||||
command.query['url'] = url unless url.nil?
|
||||
command.query['utm_campaign'] = utm_campaign unless utm_campaign.nil?
|
||||
command.query['utm_source'] = utm_source unless utm_source.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def apply_command_defaults(command)
|
||||
command.query['key'] = key unless key.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue