Autogenerated update (2018-03-10)
Update: - cloudbilling_v1 - ml_v1 - serviceusage_v1beta1 - sourcerepo_v1 - youtube_partner_v1
This commit is contained in:
parent
ed4e714183
commit
398c04f16e
|
@ -12706,10 +12706,23 @@
|
|||
"/cloudbilling:v1/AggregationInfo/aggregationCount": aggregation_count
|
||||
"/cloudbilling:v1/AggregationInfo/aggregationInterval": aggregation_interval
|
||||
"/cloudbilling:v1/AggregationInfo/aggregationLevel": aggregation_level
|
||||
"/cloudbilling:v1/AuditConfig": audit_config
|
||||
"/cloudbilling:v1/AuditConfig/auditLogConfigs": audit_log_configs
|
||||
"/cloudbilling:v1/AuditConfig/auditLogConfigs/audit_log_config": audit_log_config
|
||||
"/cloudbilling:v1/AuditConfig/service": service
|
||||
"/cloudbilling:v1/AuditLogConfig": audit_log_config
|
||||
"/cloudbilling:v1/AuditLogConfig/exemptedMembers": exempted_members
|
||||
"/cloudbilling:v1/AuditLogConfig/exemptedMembers/exempted_member": exempted_member
|
||||
"/cloudbilling:v1/AuditLogConfig/logType": log_type
|
||||
"/cloudbilling:v1/BillingAccount": billing_account
|
||||
"/cloudbilling:v1/BillingAccount/displayName": display_name
|
||||
"/cloudbilling:v1/BillingAccount/masterBillingAccount": master_billing_account
|
||||
"/cloudbilling:v1/BillingAccount/name": name
|
||||
"/cloudbilling:v1/BillingAccount/open": open
|
||||
"/cloudbilling:v1/Binding": binding
|
||||
"/cloudbilling:v1/Binding/members": members
|
||||
"/cloudbilling:v1/Binding/members/member": member
|
||||
"/cloudbilling:v1/Binding/role": role
|
||||
"/cloudbilling:v1/Category": category
|
||||
"/cloudbilling:v1/Category/resourceFamily": resource_family
|
||||
"/cloudbilling:v1/Category/resourceGroup": resource_group
|
||||
|
@ -12735,6 +12748,13 @@
|
|||
"/cloudbilling:v1/Money/currencyCode": currency_code
|
||||
"/cloudbilling:v1/Money/nanos": nanos
|
||||
"/cloudbilling:v1/Money/units": units
|
||||
"/cloudbilling:v1/Policy": policy
|
||||
"/cloudbilling:v1/Policy/auditConfigs": audit_configs
|
||||
"/cloudbilling:v1/Policy/auditConfigs/audit_config": audit_config
|
||||
"/cloudbilling:v1/Policy/bindings": bindings
|
||||
"/cloudbilling:v1/Policy/bindings/binding": binding
|
||||
"/cloudbilling:v1/Policy/etag": etag
|
||||
"/cloudbilling:v1/Policy/version": version
|
||||
"/cloudbilling:v1/PricingExpression": pricing_expression
|
||||
"/cloudbilling:v1/PricingExpression/baseUnit": base_unit
|
||||
"/cloudbilling:v1/PricingExpression/baseUnitConversionFactor": base_unit_conversion_factor
|
||||
|
@ -12759,6 +12779,9 @@
|
|||
"/cloudbilling:v1/Service/displayName": display_name
|
||||
"/cloudbilling:v1/Service/name": name
|
||||
"/cloudbilling:v1/Service/serviceId": service_id
|
||||
"/cloudbilling:v1/SetIamPolicyRequest": set_iam_policy_request
|
||||
"/cloudbilling:v1/SetIamPolicyRequest/policy": policy
|
||||
"/cloudbilling:v1/SetIamPolicyRequest/updateMask": update_mask
|
||||
"/cloudbilling:v1/Sku": sku
|
||||
"/cloudbilling:v1/Sku/category": category
|
||||
"/cloudbilling:v1/Sku/description": description
|
||||
|
@ -12769,18 +12792,35 @@
|
|||
"/cloudbilling:v1/Sku/serviceRegions": service_regions
|
||||
"/cloudbilling:v1/Sku/serviceRegions/service_region": service_region
|
||||
"/cloudbilling:v1/Sku/skuId": sku_id
|
||||
"/cloudbilling:v1/TestIamPermissionsRequest": test_iam_permissions_request
|
||||
"/cloudbilling:v1/TestIamPermissionsRequest/permissions": permissions
|
||||
"/cloudbilling:v1/TestIamPermissionsRequest/permissions/permission": permission
|
||||
"/cloudbilling:v1/TestIamPermissionsResponse": test_iam_permissions_response
|
||||
"/cloudbilling:v1/TestIamPermissionsResponse/permissions": permissions
|
||||
"/cloudbilling:v1/TestIamPermissionsResponse/permissions/permission": permission
|
||||
"/cloudbilling:v1/TierRate": tier_rate
|
||||
"/cloudbilling:v1/TierRate/startUsageAmount": start_usage_amount
|
||||
"/cloudbilling:v1/TierRate/unitPrice": unit_price
|
||||
"/cloudbilling:v1/cloudbilling.billingAccounts.create": create_billing_account
|
||||
"/cloudbilling:v1/cloudbilling.billingAccounts.get": get_billing_account
|
||||
"/cloudbilling:v1/cloudbilling.billingAccounts.get/name": name
|
||||
"/cloudbilling:v1/cloudbilling.billingAccounts.getIamPolicy": get_billing_account_iam_policy
|
||||
"/cloudbilling:v1/cloudbilling.billingAccounts.getIamPolicy/resource": resource
|
||||
"/cloudbilling:v1/cloudbilling.billingAccounts.list": list_billing_accounts
|
||||
"/cloudbilling:v1/cloudbilling.billingAccounts.list/filter": filter
|
||||
"/cloudbilling:v1/cloudbilling.billingAccounts.list/pageSize": page_size
|
||||
"/cloudbilling:v1/cloudbilling.billingAccounts.list/pageToken": page_token
|
||||
"/cloudbilling:v1/cloudbilling.billingAccounts.patch": patch_billing_account
|
||||
"/cloudbilling:v1/cloudbilling.billingAccounts.patch/name": name
|
||||
"/cloudbilling:v1/cloudbilling.billingAccounts.patch/updateMask": update_mask
|
||||
"/cloudbilling:v1/cloudbilling.billingAccounts.projects.list": list_billing_account_projects
|
||||
"/cloudbilling:v1/cloudbilling.billingAccounts.projects.list/name": name
|
||||
"/cloudbilling:v1/cloudbilling.billingAccounts.projects.list/pageSize": page_size
|
||||
"/cloudbilling:v1/cloudbilling.billingAccounts.projects.list/pageToken": page_token
|
||||
"/cloudbilling:v1/cloudbilling.billingAccounts.setIamPolicy": set_billing_account_iam_policy
|
||||
"/cloudbilling:v1/cloudbilling.billingAccounts.setIamPolicy/resource": resource
|
||||
"/cloudbilling:v1/cloudbilling.billingAccounts.testIamPermissions": test_billing_account_iam_permissions
|
||||
"/cloudbilling:v1/cloudbilling.billingAccounts.testIamPermissions/resource": resource
|
||||
"/cloudbilling:v1/cloudbilling.projects.getBillingInfo": get_project_billing_info
|
||||
"/cloudbilling:v1/cloudbilling.projects.getBillingInfo/name": name
|
||||
"/cloudbilling:v1/cloudbilling.projects.updateBillingInfo": update_project_billing_info
|
||||
|
@ -54657,6 +54697,7 @@
|
|||
"/ml:v1/GoogleCloudMlV1__Version/description": description
|
||||
"/ml:v1/GoogleCloudMlV1__Version/errorMessage": error_message
|
||||
"/ml:v1/GoogleCloudMlV1__Version/etag": etag
|
||||
"/ml:v1/GoogleCloudMlV1__Version/framework": framework
|
||||
"/ml:v1/GoogleCloudMlV1__Version/isDefault": is_default
|
||||
"/ml:v1/GoogleCloudMlV1__Version/labels": labels
|
||||
"/ml:v1/GoogleCloudMlV1__Version/labels/label": label
|
||||
|
@ -56273,6 +56314,125 @@
|
|||
"/pagespeedonline:v2/pagespeedonline.pagespeedapi.runpagespeed/url": url
|
||||
"/pagespeedonline:v2/quotaUser": quota_user
|
||||
"/pagespeedonline:v2/userIp": user_ip
|
||||
"/pagespeedonline:v4/PagespeedApiFormatStringV4": pagespeed_api_format_string_v4
|
||||
"/pagespeedonline:v4/PagespeedApiFormatStringV4/args": args
|
||||
"/pagespeedonline:v4/PagespeedApiFormatStringV4/args/arg": arg
|
||||
"/pagespeedonline:v4/PagespeedApiFormatStringV4/args/arg/key": key
|
||||
"/pagespeedonline:v4/PagespeedApiFormatStringV4/args/arg/rects": rects
|
||||
"/pagespeedonline:v4/PagespeedApiFormatStringV4/args/arg/rects/rect": rect
|
||||
"/pagespeedonline:v4/PagespeedApiFormatStringV4/args/arg/rects/rect/height": height
|
||||
"/pagespeedonline:v4/PagespeedApiFormatStringV4/args/arg/rects/rect/left": left
|
||||
"/pagespeedonline:v4/PagespeedApiFormatStringV4/args/arg/rects/rect/top": top
|
||||
"/pagespeedonline:v4/PagespeedApiFormatStringV4/args/arg/rects/rect/width": width
|
||||
"/pagespeedonline:v4/PagespeedApiFormatStringV4/args/arg/secondary_rects": secondary_rects
|
||||
"/pagespeedonline:v4/PagespeedApiFormatStringV4/args/arg/secondary_rects/secondary_rect": secondary_rect
|
||||
"/pagespeedonline:v4/PagespeedApiFormatStringV4/args/arg/secondary_rects/secondary_rect/height": height
|
||||
"/pagespeedonline:v4/PagespeedApiFormatStringV4/args/arg/secondary_rects/secondary_rect/left": left
|
||||
"/pagespeedonline:v4/PagespeedApiFormatStringV4/args/arg/secondary_rects/secondary_rect/top": top
|
||||
"/pagespeedonline:v4/PagespeedApiFormatStringV4/args/arg/secondary_rects/secondary_rect/width": width
|
||||
"/pagespeedonline:v4/PagespeedApiFormatStringV4/args/arg/type": type
|
||||
"/pagespeedonline:v4/PagespeedApiFormatStringV4/args/arg/value": value
|
||||
"/pagespeedonline:v4/PagespeedApiFormatStringV4/format": format
|
||||
"/pagespeedonline:v4/PagespeedApiImageV4": pagespeed_api_image_v4
|
||||
"/pagespeedonline:v4/PagespeedApiImageV4/data": data
|
||||
"/pagespeedonline:v4/PagespeedApiImageV4/height": height
|
||||
"/pagespeedonline:v4/PagespeedApiImageV4/key": key
|
||||
"/pagespeedonline:v4/PagespeedApiImageV4/mime_type": mime_type
|
||||
"/pagespeedonline:v4/PagespeedApiImageV4/page_rect": page_rect
|
||||
"/pagespeedonline:v4/PagespeedApiImageV4/page_rect/height": height
|
||||
"/pagespeedonline:v4/PagespeedApiImageV4/page_rect/left": left
|
||||
"/pagespeedonline:v4/PagespeedApiImageV4/page_rect/top": top
|
||||
"/pagespeedonline:v4/PagespeedApiImageV4/page_rect/width": width
|
||||
"/pagespeedonline:v4/PagespeedApiImageV4/width": width
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4": pagespeed_api_pagespeed_response_v4
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/captchaResult": captcha_result
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/formattedResults": formatted_results
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/formattedResults/locale": locale
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/formattedResults/ruleResults": rule_results
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/formattedResults/ruleResults/rule_result": rule_result
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/formattedResults/ruleResults/rule_result/beta": beta
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/formattedResults/ruleResults/rule_result/groups": groups
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/formattedResults/ruleResults/rule_result/groups/group": group
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/formattedResults/ruleResults/rule_result/localizedRuleName": localized_rule_name
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/formattedResults/ruleResults/rule_result/ruleImpact": rule_impact
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/formattedResults/ruleResults/rule_result/summary": summary
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/formattedResults/ruleResults/rule_result/urlBlocks": url_blocks
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/formattedResults/ruleResults/rule_result/urlBlocks/url_block": url_block
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/formattedResults/ruleResults/rule_result/urlBlocks/url_block/header": header
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/formattedResults/ruleResults/rule_result/urlBlocks/url_block/urls": urls
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/formattedResults/ruleResults/rule_result/urlBlocks/url_block/urls/url": url
|
||||
? "/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/formattedResults/ruleResults/rule_result/urlBlocks/url_block/urls/url/details"
|
||||
: details
|
||||
? "/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/formattedResults/ruleResults/rule_result/urlBlocks/url_block/urls/url/details/detail"
|
||||
: detail
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/formattedResults/ruleResults/rule_result/urlBlocks/url_block/urls/url/result": result
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/id": id
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/invalidRules": invalid_rules
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/invalidRules/invalid_rule": invalid_rule
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/kind": kind
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/loadingExperience": loading_experience
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/loadingExperience/id": id
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/loadingExperience/initial_url": initial_url
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/loadingExperience/metrics": metrics
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/loadingExperience/metrics/metric": metric
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/loadingExperience/metrics/metric/category": category
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/loadingExperience/metrics/metric/distributions": distributions
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/loadingExperience/metrics/metric/distributions/distribution": distribution
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/loadingExperience/metrics/metric/distributions/distribution/max": max
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/loadingExperience/metrics/metric/distributions/distribution/min": min
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/loadingExperience/metrics/metric/distributions/distribution/proportion": proportion
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/loadingExperience/metrics/metric/median": median
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/loadingExperience/overall_category": overall_category
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/pageStats": page_stats
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/pageStats/cms": cms
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/pageStats/cssResponseBytes": css_response_bytes
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/pageStats/flashResponseBytes": flash_response_bytes
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/pageStats/htmlResponseBytes": html_response_bytes
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/pageStats/imageResponseBytes": image_response_bytes
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/pageStats/javascriptResponseBytes": javascript_response_bytes
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/pageStats/numRenderBlockingRoundTrips": num_render_blocking_round_trips
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/pageStats/numTotalRoundTrips": num_total_round_trips
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/pageStats/numberCssResources": number_css_resources
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/pageStats/numberHosts": number_hosts
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/pageStats/numberJsResources": number_js_resources
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/pageStats/numberResources": number_resources
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/pageStats/numberRobotedResources": number_roboted_resources
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/pageStats/numberStaticResources": number_static_resources
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/pageStats/numberTransientFetchFailureResources": number_transient_fetch_failure_resources
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/pageStats/otherResponseBytes": other_response_bytes
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/pageStats/overTheWireResponseBytes": over_the_wire_response_bytes
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/pageStats/robotedUrls": roboted_urls
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/pageStats/robotedUrls/roboted_url": roboted_url
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/pageStats/textResponseBytes": text_response_bytes
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/pageStats/totalRequestBytes": total_request_bytes
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/pageStats/transientFetchFailureUrls": transient_fetch_failure_urls
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/pageStats/transientFetchFailureUrls/transient_fetch_failure_url": transient_fetch_failure_url
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/responseCode": response_code
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/ruleGroups": rule_groups
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/ruleGroups/rule_group": rule_group
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/ruleGroups/rule_group/pass": pass
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/ruleGroups/rule_group/score": score
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/screenshot": screenshot
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/snapshots": snapshots
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/snapshots/snapshot": snapshot
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/title": title
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/version": version
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/version/major": major
|
||||
"/pagespeedonline:v4/PagespeedApiPagespeedResponseV4/version/minor": minor
|
||||
"/pagespeedonline:v4/fields": fields
|
||||
"/pagespeedonline:v4/key": key
|
||||
"/pagespeedonline:v4/pagespeedonline.pagespeedapi.runpagespeed": runpagespeed_pagespeedapi
|
||||
"/pagespeedonline:v4/pagespeedonline.pagespeedapi.runpagespeed/filter_third_party_resources": filter_third_party_resources
|
||||
"/pagespeedonline:v4/pagespeedonline.pagespeedapi.runpagespeed/locale": locale
|
||||
"/pagespeedonline:v4/pagespeedonline.pagespeedapi.runpagespeed/rule": rule
|
||||
"/pagespeedonline:v4/pagespeedonline.pagespeedapi.runpagespeed/screenshot": screenshot
|
||||
"/pagespeedonline:v4/pagespeedonline.pagespeedapi.runpagespeed/snapshots": snapshots
|
||||
"/pagespeedonline:v4/pagespeedonline.pagespeedapi.runpagespeed/strategy": strategy
|
||||
"/pagespeedonline:v4/pagespeedonline.pagespeedapi.runpagespeed/url": url
|
||||
"/pagespeedonline:v4/pagespeedonline.pagespeedapi.runpagespeed/utm_campaign": utm_campaign
|
||||
"/pagespeedonline:v4/pagespeedonline.pagespeedapi.runpagespeed/utm_source": utm_source
|
||||
"/pagespeedonline:v4/quotaUser": quota_user
|
||||
"/pagespeedonline:v4/userIp": user_ip
|
||||
"/partners:v2/AdWordsManagerAccountInfo": ad_words_manager_account_info
|
||||
"/partners:v2/AdWordsManagerAccountInfo/customerName": customer_name
|
||||
"/partners:v2/AdWordsManagerAccountInfo/id": id
|
||||
|
|
|
@ -18,7 +18,7 @@ require 'google/apis/cloudbilling_v1/representations.rb'
|
|||
|
||||
module Google
|
||||
module Apis
|
||||
# Google Cloud Billing API
|
||||
# Cloud Billing API
|
||||
#
|
||||
# Allows developers to manage billing for their Google Cloud Platform projects
|
||||
# programmatically.
|
||||
|
@ -26,7 +26,7 @@ module Google
|
|||
# @see https://cloud.google.com/billing/
|
||||
module CloudbillingV1
|
||||
VERSION = 'V1'
|
||||
REVISION = '20180116'
|
||||
REVISION = '20180307'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
|
|
@ -55,18 +55,145 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
# A billing account in [Google Cloud
|
||||
# Console](https://console.cloud.google.com/). You can assign a billing account
|
||||
# to one or more projects.
|
||||
# Specifies the audit configuration for a service.
|
||||
# The configuration determines which permission types are logged, and what
|
||||
# identities, if any, are exempted from logging.
|
||||
# An AuditConfig must have one or more AuditLogConfigs.
|
||||
# If there are AuditConfigs for both `allServices` and a specific service,
|
||||
# the union of the two AuditConfigs is used for that service: the log_types
|
||||
# specified in each AuditConfig are enabled, and the exempted_members in each
|
||||
# AuditLogConfig are exempted.
|
||||
# Example Policy with multiple AuditConfigs:
|
||||
# `
|
||||
# "audit_configs": [
|
||||
# `
|
||||
# "service": "allServices"
|
||||
# "audit_log_configs": [
|
||||
# `
|
||||
# "log_type": "DATA_READ",
|
||||
# "exempted_members": [
|
||||
# "user:foo@gmail.com"
|
||||
# ]
|
||||
# `,
|
||||
# `
|
||||
# "log_type": "DATA_WRITE",
|
||||
# `,
|
||||
# `
|
||||
# "log_type": "ADMIN_READ",
|
||||
# `
|
||||
# ]
|
||||
# `,
|
||||
# `
|
||||
# "service": "fooservice.googleapis.com"
|
||||
# "audit_log_configs": [
|
||||
# `
|
||||
# "log_type": "DATA_READ",
|
||||
# `,
|
||||
# `
|
||||
# "log_type": "DATA_WRITE",
|
||||
# "exempted_members": [
|
||||
# "user:bar@gmail.com"
|
||||
# ]
|
||||
# `
|
||||
# ]
|
||||
# `
|
||||
# ]
|
||||
# `
|
||||
# For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
|
||||
# logging. It also exempts foo@gmail.com from DATA_READ logging, and
|
||||
# bar@gmail.com from DATA_WRITE logging.
|
||||
class AuditConfig
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The configuration for logging of each type of permission.
|
||||
# Next ID: 4
|
||||
# Corresponds to the JSON property `auditLogConfigs`
|
||||
# @return [Array<Google::Apis::CloudbillingV1::AuditLogConfig>]
|
||||
attr_accessor :audit_log_configs
|
||||
|
||||
# Specifies a service that will be enabled for audit logging.
|
||||
# For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
|
||||
# `allServices` is a special value that covers all services.
|
||||
# Corresponds to the JSON property `service`
|
||||
# @return [String]
|
||||
attr_accessor :service
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
|
||||
@service = args[:service] if args.key?(:service)
|
||||
end
|
||||
end
|
||||
|
||||
# Provides the configuration for logging a type of permissions.
|
||||
# Example:
|
||||
# `
|
||||
# "audit_log_configs": [
|
||||
# `
|
||||
# "log_type": "DATA_READ",
|
||||
# "exempted_members": [
|
||||
# "user:foo@gmail.com"
|
||||
# ]
|
||||
# `,
|
||||
# `
|
||||
# "log_type": "DATA_WRITE",
|
||||
# `
|
||||
# ]
|
||||
# `
|
||||
# This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
|
||||
# foo@gmail.com from DATA_READ logging.
|
||||
class AuditLogConfig
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Specifies the identities that do not cause logging for this type of
|
||||
# permission.
|
||||
# Follows the same format of Binding.members.
|
||||
# Corresponds to the JSON property `exemptedMembers`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :exempted_members
|
||||
|
||||
# The log type that this config enables.
|
||||
# Corresponds to the JSON property `logType`
|
||||
# @return [String]
|
||||
attr_accessor :log_type
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@exempted_members = args[:exempted_members] if args.key?(:exempted_members)
|
||||
@log_type = args[:log_type] if args.key?(:log_type)
|
||||
end
|
||||
end
|
||||
|
||||
# A billing account in [GCP Console](https://console.cloud.google.com/).
|
||||
# You can assign a billing account to one or more projects.
|
||||
class BillingAccount
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The display name given to the billing account, such as `My Billing
|
||||
# Account`. This name is displayed in the Google Cloud Console.
|
||||
# Account`. This name is displayed in the GCP Console.
|
||||
# Corresponds to the JSON property `displayName`
|
||||
# @return [String]
|
||||
attr_accessor :display_name
|
||||
|
||||
# If this account is a
|
||||
# [subaccount](https://cloud.google.com/billing/docs/concepts), then this
|
||||
# will be the resource name of the master billing account that it is being
|
||||
# resold through.
|
||||
# Otherwise this will be empty.
|
||||
# > This field is currently in
|
||||
# > [Beta](https://cloud.google.com/terms/launch-stages).
|
||||
# Corresponds to the JSON property `masterBillingAccount`
|
||||
# @return [String]
|
||||
attr_accessor :master_billing_account
|
||||
|
||||
# The resource name of the billing account. The resource name has the form
|
||||
# `billingAccounts/`billing_account_id``. For example,
|
||||
# `billingAccounts/012345-567890-ABCDEF` would be the resource name for
|
||||
|
@ -90,11 +217,52 @@ module Google
|
|||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@display_name = args[:display_name] if args.key?(:display_name)
|
||||
@master_billing_account = args[:master_billing_account] if args.key?(:master_billing_account)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@open = args[:open] if args.key?(:open)
|
||||
end
|
||||
end
|
||||
|
||||
# Associates `members` with a `role`.
|
||||
class Binding
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Specifies the identities requesting access for a Cloud Platform resource.
|
||||
# `members` can have the following values:
|
||||
# * `allUsers`: A special identifier that represents anyone who is
|
||||
# on the internet; with or without a Google account.
|
||||
# * `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`.
|
||||
# * `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.
|
||||
# For example, `admins@example.com`.
|
||||
# * `domain:`domain``: A Google Apps domain name that represents all the
|
||||
# users of that domain. For example, `google.com` or `example.com`.
|
||||
# Corresponds to the JSON property `members`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :members
|
||||
|
||||
# Role that is assigned to `members`.
|
||||
# For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
|
||||
# Required
|
||||
# Corresponds to the JSON property `role`
|
||||
# @return [String]
|
||||
attr_accessor :role
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@members = args[:members] if args.key?(:members)
|
||||
@role = args[:role] if args.key?(:role)
|
||||
end
|
||||
end
|
||||
|
||||
# Represents the category hierarchy of a SKU.
|
||||
class Category
|
||||
include Google::Apis::Core::Hashable
|
||||
|
@ -281,6 +449,78 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
# 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
|
||||
# `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**
|
||||
# `
|
||||
# "bindings": [
|
||||
# `
|
||||
# "role": "roles/owner",
|
||||
# "members": [
|
||||
# "user:mike@example.com",
|
||||
# "group:admins@example.com",
|
||||
# "domain:google.com",
|
||||
# "serviceAccount:my-other-app@appspot.gserviceaccount.com",
|
||||
# ]
|
||||
# `,
|
||||
# `
|
||||
# "role": "roles/viewer",
|
||||
# "members": ["user:sean@example.com"]
|
||||
# `
|
||||
# ]
|
||||
# `
|
||||
# For a description of IAM and its features, see the
|
||||
# [IAM developer's guide](https://cloud.google.com/iam/docs).
|
||||
class Policy
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Specifies cloud audit logging configuration for this policy.
|
||||
# Corresponds to the JSON property `auditConfigs`
|
||||
# @return [Array<Google::Apis::CloudbillingV1::AuditConfig>]
|
||||
attr_accessor :audit_configs
|
||||
|
||||
# Associates a list of `members` to a `role`.
|
||||
# `bindings` with no members will result in an error.
|
||||
# Corresponds to the JSON property `bindings`
|
||||
# @return [Array<Google::Apis::CloudbillingV1::Binding>]
|
||||
attr_accessor :bindings
|
||||
|
||||
# `etag` is used for optimistic concurrency control as a way to help
|
||||
# prevent simultaneous updates of a policy from overwriting each other.
|
||||
# It is strongly suggested that systems make use of the `etag` in the
|
||||
# read-modify-write cycle to perform policy updates in order to avoid race
|
||||
# conditions: An `etag` is returned in the response to `getIamPolicy`, and
|
||||
# systems are expected to put that etag in the request to `setIamPolicy` to
|
||||
# ensure that their change will be applied to the same version of the policy.
|
||||
# If no `etag` is provided in the call to `setIamPolicy`, then the existing
|
||||
# policy is overwritten blindly.
|
||||
# Corresponds to the JSON property `etag`
|
||||
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
||||
# @return [String]
|
||||
attr_accessor :etag
|
||||
|
||||
# Deprecated.
|
||||
# Corresponds to the JSON property `version`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :version
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@audit_configs = args[:audit_configs] if args.key?(:audit_configs)
|
||||
@bindings = args[:bindings] if args.key?(:bindings)
|
||||
@etag = args[:etag] if args.key?(:etag)
|
||||
@version = args[:version] if args.key?(:version)
|
||||
end
|
||||
end
|
||||
|
||||
# Expresses a mathematical pricing formula. For Example:-
|
||||
# `usage_unit: GBy`
|
||||
# `tiered_rates:`
|
||||
|
@ -420,7 +660,7 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
# Encapsulation of billing information for a Cloud Console project. A project
|
||||
# Encapsulation of billing information for a GCP Console project. A project
|
||||
# has at most one associated billing account at a time (but a billing account
|
||||
# can be assigned to multiple projects).
|
||||
class ProjectBillingInfo
|
||||
|
@ -502,6 +742,60 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
# Request message for `SetIamPolicy` method.
|
||||
class SetIamPolicyRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# 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
|
||||
# `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**
|
||||
# `
|
||||
# "bindings": [
|
||||
# `
|
||||
# "role": "roles/owner",
|
||||
# "members": [
|
||||
# "user:mike@example.com",
|
||||
# "group:admins@example.com",
|
||||
# "domain:google.com",
|
||||
# "serviceAccount:my-other-app@appspot.gserviceaccount.com",
|
||||
# ]
|
||||
# `,
|
||||
# `
|
||||
# "role": "roles/viewer",
|
||||
# "members": ["user:sean@example.com"]
|
||||
# `
|
||||
# ]
|
||||
# `
|
||||
# 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`
|
||||
# @return [Google::Apis::CloudbillingV1::Policy]
|
||||
attr_accessor :policy
|
||||
|
||||
# OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
|
||||
# the fields in the mask will be modified. If no mask is provided, the
|
||||
# following default mask is used:
|
||||
# paths: "bindings, etag"
|
||||
# This field is only used by Cloud IAM.
|
||||
# Corresponds to the JSON property `updateMask`
|
||||
# @return [String]
|
||||
attr_accessor :update_mask
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@policy = args[:policy] if args.key?(:policy)
|
||||
@update_mask = args[:update_mask] if args.key?(:update_mask)
|
||||
end
|
||||
end
|
||||
|
||||
# Encapsulates a single SKU in Google Cloud Platform
|
||||
class Sku
|
||||
include Google::Apis::Core::Hashable
|
||||
|
@ -563,6 +857,48 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
# Request message for `TestIamPermissions` method.
|
||||
class TestIamPermissionsRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The set of permissions to check for the `resource`. Permissions with
|
||||
# wildcards (such as '*' or 'storage.*') are not allowed. For more
|
||||
# information see
|
||||
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
||||
# Corresponds to the JSON property `permissions`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :permissions
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@permissions = args[:permissions] if args.key?(:permissions)
|
||||
end
|
||||
end
|
||||
|
||||
# Response message for `TestIamPermissions` method.
|
||||
class TestIamPermissionsResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A subset of `TestPermissionsRequest.permissions` that the caller is
|
||||
# allowed.
|
||||
# Corresponds to the JSON property `permissions`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :permissions
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@permissions = args[:permissions] if args.key?(:permissions)
|
||||
end
|
||||
end
|
||||
|
||||
# The price rate indicating starting usage and its corresponding price.
|
||||
class TierRate
|
||||
include Google::Apis::Core::Hashable
|
||||
|
|
|
@ -28,12 +28,30 @@ module Google
|
|||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AuditConfig
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AuditLogConfig
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class BillingAccount
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Binding
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Category
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
|
@ -70,6 +88,12 @@ module Google
|
|||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Policy
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class PricingExpression
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
|
@ -94,12 +118,30 @@ module Google
|
|||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SetIamPolicyRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Sku
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class TestIamPermissionsRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class TestIamPermissionsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class TierRate
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
|
@ -115,15 +157,41 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
class AuditConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::CloudbillingV1::AuditLogConfig, decorator: Google::Apis::CloudbillingV1::AuditLogConfig::Representation
|
||||
|
||||
property :service, as: 'service'
|
||||
end
|
||||
end
|
||||
|
||||
class AuditLogConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :exempted_members, as: 'exemptedMembers'
|
||||
property :log_type, as: 'logType'
|
||||
end
|
||||
end
|
||||
|
||||
class BillingAccount
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :display_name, as: 'displayName'
|
||||
property :master_billing_account, as: 'masterBillingAccount'
|
||||
property :name, as: 'name'
|
||||
property :open, as: 'open'
|
||||
end
|
||||
end
|
||||
|
||||
class Binding
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :members, as: 'members'
|
||||
property :role, as: 'role'
|
||||
end
|
||||
end
|
||||
|
||||
class Category
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
|
@ -179,6 +247,18 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
class Policy
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :audit_configs, as: 'auditConfigs', class: Google::Apis::CloudbillingV1::AuditConfig, decorator: Google::Apis::CloudbillingV1::AuditConfig::Representation
|
||||
|
||||
collection :bindings, as: 'bindings', class: Google::Apis::CloudbillingV1::Binding, decorator: Google::Apis::CloudbillingV1::Binding::Representation
|
||||
|
||||
property :etag, :base64 => true, as: 'etag'
|
||||
property :version, as: 'version'
|
||||
end
|
||||
end
|
||||
|
||||
class PricingExpression
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
|
@ -225,6 +305,15 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
class SetIamPolicyRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :policy, as: 'policy', class: Google::Apis::CloudbillingV1::Policy, decorator: Google::Apis::CloudbillingV1::Policy::Representation
|
||||
|
||||
property :update_mask, as: 'updateMask'
|
||||
end
|
||||
end
|
||||
|
||||
class Sku
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
|
@ -240,6 +329,20 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
class TestIamPermissionsRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :permissions, as: 'permissions'
|
||||
end
|
||||
end
|
||||
|
||||
class TestIamPermissionsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :permissions, as: 'permissions'
|
||||
end
|
||||
end
|
||||
|
||||
class TierRate
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
|
|
|
@ -20,7 +20,7 @@ require 'google/apis/errors'
|
|||
module Google
|
||||
module Apis
|
||||
module CloudbillingV1
|
||||
# Google Cloud Billing API
|
||||
# Cloud Billing API
|
||||
#
|
||||
# Allows developers to manage billing for their Google Cloud Platform projects
|
||||
# programmatically.
|
||||
|
@ -48,9 +48,47 @@ module Google
|
|||
@batch_path = 'batch'
|
||||
end
|
||||
|
||||
# Creates a billing account.
|
||||
# This method can only be used to create
|
||||
# [billing subaccounts](https://cloud.google.com/billing/docs/concepts).
|
||||
# When creating a subaccount, the current authenticated user must have the
|
||||
# `billing.accounts.update` IAM permission on the master account, which is
|
||||
# typically given to billing account
|
||||
# [administrators](https://cloud.google.com/billing/docs/how-to/billing-access).
|
||||
# > This method is currently in
|
||||
# > [Beta](https://cloud.google.com/terms/launch-stages).
|
||||
# @param [Google::Apis::CloudbillingV1::BillingAccount] billing_account_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::CloudbillingV1::BillingAccount] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudbillingV1::BillingAccount]
|
||||
#
|
||||
# @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_billing_account(billing_account_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/billingAccounts', options)
|
||||
command.request_representation = Google::Apis::CloudbillingV1::BillingAccount::Representation
|
||||
command.request_object = billing_account_object
|
||||
command.response_representation = Google::Apis::CloudbillingV1::BillingAccount::Representation
|
||||
command.response_class = Google::Apis::CloudbillingV1::BillingAccount
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets information about a billing account. The current authenticated user
|
||||
# must be an [owner of the billing
|
||||
# account](https://support.google.com/cloud/answer/4430947).
|
||||
# must be a [viewer of the billing
|
||||
# account](https://cloud.google.com/billing/docs/how-to/billing-access).
|
||||
# @param [String] name
|
||||
# The resource name of the billing account to retrieve. For example,
|
||||
# `billingAccounts/012345-567890-ABCDEF`.
|
||||
|
@ -81,8 +119,54 @@ module Google
|
|||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists the billing accounts that the current authenticated user
|
||||
# [owns](https://support.google.com/cloud/answer/4430947).
|
||||
# Gets the access control policy for a billing account.
|
||||
# The caller must have the `billing.accounts.getIamPolicy` permission on the
|
||||
# account, which is often given to billing account
|
||||
# [viewers](https://cloud.google.com/billing/docs/how-to/billing-access).
|
||||
# > This method is currently in
|
||||
# > [Beta](https://cloud.google.com/terms/launch-stages).
|
||||
# @param [String] resource
|
||||
# REQUIRED: The resource for which the policy is being requested.
|
||||
# See the operation documentation for the appropriate value for this field.
|
||||
# @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::CloudbillingV1::Policy] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudbillingV1::Policy]
|
||||
#
|
||||
# @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_billing_account_iam_policy(resource, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
|
||||
command.response_representation = Google::Apis::CloudbillingV1::Policy::Representation
|
||||
command.response_class = Google::Apis::CloudbillingV1::Policy
|
||||
command.params['resource'] = resource unless resource.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 the billing accounts that the current authenticated user has
|
||||
# permission to [view](https://cloud.google.com/billing/docs/how-to/billing-
|
||||
# access).
|
||||
# @param [String] filter
|
||||
# Options for how to filter the returned billing accounts.
|
||||
# Currently this only supports filtering for
|
||||
# [subaccounts](https://cloud.google.com/billing/docs/concepts) under a
|
||||
# single provided reseller billing account.
|
||||
# (e.g. "master_billing_account=billingAccounts/012345-678901-ABCDEF").
|
||||
# Boolean algebra and other fields are not currently supported.
|
||||
# > This field is currently in
|
||||
# > [Beta](https://cloud.google.com/terms/launch-stages).
|
||||
# @param [Fixnum] page_size
|
||||
# Requested page size. The maximum page size is 100; this is also the
|
||||
# default.
|
||||
|
@ -107,10 +191,11 @@ 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_billing_accounts(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
def list_billing_accounts(filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/billingAccounts', options)
|
||||
command.response_representation = Google::Apis::CloudbillingV1::ListBillingAccountsResponse::Representation
|
||||
command.response_class = Google::Apis::CloudbillingV1::ListBillingAccountsResponse
|
||||
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?
|
||||
|
@ -118,10 +203,132 @@ module Google
|
|||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Updates a billing account's fields.
|
||||
# Currently the only field that can be edited is `display_name`.
|
||||
# The current authenticated user must have the `billing.accounts.update`
|
||||
# IAM permission, which is typically given to the
|
||||
# [administrator](https://cloud.google.com/billing/docs/how-to/billing-access)
|
||||
# of the billing account.
|
||||
# > This method is currently in
|
||||
# > [Beta](https://cloud.google.com/terms/launch-stages).
|
||||
# @param [String] name
|
||||
# The name of the billing account resource to be updated.
|
||||
# @param [Google::Apis::CloudbillingV1::BillingAccount] billing_account_object
|
||||
# @param [String] update_mask
|
||||
# The update mask applied to the resource.
|
||||
# Only "display_name" is currently supported.
|
||||
# @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::CloudbillingV1::BillingAccount] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudbillingV1::BillingAccount]
|
||||
#
|
||||
# @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_billing_account(name, billing_account_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:patch, 'v1/{+name}', options)
|
||||
command.request_representation = Google::Apis::CloudbillingV1::BillingAccount::Representation
|
||||
command.request_object = billing_account_object
|
||||
command.response_representation = Google::Apis::CloudbillingV1::BillingAccount::Representation
|
||||
command.response_class = Google::Apis::CloudbillingV1::BillingAccount
|
||||
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
|
||||
|
||||
# Sets the access control policy for a billing account. Replaces any existing
|
||||
# policy.
|
||||
# The caller must have the `billing.accounts.setIamPolicy` permission on the
|
||||
# account, which is often given to billing account
|
||||
# [administrators](https://cloud.google.com/billing/docs/how-to/billing-access).
|
||||
# > This method is currently in
|
||||
# > [Beta](https://cloud.google.com/terms/launch-stages).
|
||||
# @param [String] resource
|
||||
# REQUIRED: The resource for which the policy is being specified.
|
||||
# See the operation documentation for the appropriate value for this field.
|
||||
# @param [Google::Apis::CloudbillingV1::SetIamPolicyRequest] set_iam_policy_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::CloudbillingV1::Policy] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudbillingV1::Policy]
|
||||
#
|
||||
# @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 set_billing_account_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
|
||||
command.request_representation = Google::Apis::CloudbillingV1::SetIamPolicyRequest::Representation
|
||||
command.request_object = set_iam_policy_request_object
|
||||
command.response_representation = Google::Apis::CloudbillingV1::Policy::Representation
|
||||
command.response_class = Google::Apis::CloudbillingV1::Policy
|
||||
command.params['resource'] = resource unless resource.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Tests the access control policy for a billing account. This method takes
|
||||
# the resource and a set of permissions as input and returns the subset of
|
||||
# the input permissions that the caller is allowed for that resource.
|
||||
# > This method is currently in
|
||||
# > [Beta](https://cloud.google.com/terms/launch-stages).
|
||||
# @param [String] resource
|
||||
# REQUIRED: The resource for which the policy detail is being requested.
|
||||
# See the operation documentation for the appropriate value for this field.
|
||||
# @param [Google::Apis::CloudbillingV1::TestIamPermissionsRequest] test_iam_permissions_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::CloudbillingV1::TestIamPermissionsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudbillingV1::TestIamPermissionsResponse]
|
||||
#
|
||||
# @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 test_billing_account_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
|
||||
command.request_representation = Google::Apis::CloudbillingV1::TestIamPermissionsRequest::Representation
|
||||
command.request_object = test_iam_permissions_request_object
|
||||
command.response_representation = Google::Apis::CloudbillingV1::TestIamPermissionsResponse::Representation
|
||||
command.response_class = Google::Apis::CloudbillingV1::TestIamPermissionsResponse
|
||||
command.params['resource'] = resource unless resource.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 the projects associated with a billing account. The current
|
||||
# authenticated user must have the "billing.resourceAssociations.list" IAM
|
||||
# authenticated user must have the `billing.resourceAssociations.list` IAM
|
||||
# permission, which is often given to billing account
|
||||
# [viewers](https://support.google.com/cloud/answer/4430947).
|
||||
# [viewers](https://cloud.google.com/billing/docs/how-to/billing-access).
|
||||
# @param [String] name
|
||||
# The resource name of the billing account associated with the projects that
|
||||
# you want to list. For example, `billingAccounts/012345-567890-ABCDEF`.
|
||||
|
@ -203,13 +410,13 @@ module Google
|
|||
# billing account, this method changes the billing account used for resource
|
||||
# usage charges.
|
||||
# *Note:* Incurred charges that have not yet been reported in the transaction
|
||||
# history of the Google Cloud Console may be billed to the new billing
|
||||
# history of the GCP Console might be billed to the new billing
|
||||
# account, even if the charge occurred before the new billing account was
|
||||
# assigned to the project.
|
||||
# The current authenticated user must have ownership privileges for both the
|
||||
# [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo
|
||||
# ) and the [billing
|
||||
# account](https://support.google.com/cloud/answer/4430947).
|
||||
# account](https://cloud.google.com/billing/docs/how-to/billing-access).
|
||||
# You can disable billing on the project by setting the
|
||||
# `billing_account_name` field to empty. This action disassociates the
|
||||
# current billing account from the project. Any billable activity of your
|
||||
|
|
|
@ -18,14 +18,14 @@ require 'google/apis/ml_v1/representations.rb'
|
|||
|
||||
module Google
|
||||
module Apis
|
||||
# Google Cloud Machine Learning Engine
|
||||
# Cloud Machine Learning Engine
|
||||
#
|
||||
# An API to enable creating and using machine learning models.
|
||||
#
|
||||
# @see https://cloud.google.com/ml/
|
||||
module MlV1
|
||||
VERSION = 'V1'
|
||||
REVISION = '20180228'
|
||||
REVISION = '20180306'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
|
|
@ -593,7 +593,6 @@ module Google
|
|||
# information about all of the versions of a given model by calling
|
||||
# [projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.
|
||||
# versions/list).
|
||||
# LINT.IfChange
|
||||
# Corresponds to the JSON property `defaultVersion`
|
||||
# @return [Google::Apis::MlV1::GoogleCloudMlV1Version]
|
||||
attr_accessor :default_version
|
||||
|
@ -691,7 +690,6 @@ module Google
|
|||
# information about all of the versions of a given model by calling
|
||||
# [projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.
|
||||
# versions/list).
|
||||
# LINT.IfChange
|
||||
# Corresponds to the JSON property `version`
|
||||
# @return [Google::Apis::MlV1::GoogleCloudMlV1Version]
|
||||
attr_accessor :version
|
||||
|
@ -1001,7 +999,7 @@ module Google
|
|||
|
||||
# Optional. A Google Cloud Storage path in which to store training outputs
|
||||
# and other data needed for training. This path is passed to your TensorFlow
|
||||
# program as the 'job_dir' command-line argument. The benefit of specifying
|
||||
# program as the '--job-dir' command-line argument. The benefit of specifying
|
||||
# this field is that Cloud ML validates the path for use in training.
|
||||
# Corresponds to the JSON property `jobDir`
|
||||
# @return [String]
|
||||
|
@ -1220,7 +1218,6 @@ module Google
|
|||
# information about all of the versions of a given model by calling
|
||||
# [projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.
|
||||
# versions/list).
|
||||
# LINT.IfChange
|
||||
class GoogleCloudMlV1Version
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
|
@ -1260,6 +1257,12 @@ module Google
|
|||
# @return [String]
|
||||
attr_accessor :error_message
|
||||
|
||||
# The ML framework used to train this version of the model. If not specified,
|
||||
# defaults to `TENSORFLOW`
|
||||
# Corresponds to the JSON property `framework`
|
||||
# @return [String]
|
||||
attr_accessor :framework
|
||||
|
||||
# Output only. If true, this version will be used to handle prediction
|
||||
# requests that do not specify a version.
|
||||
# You can change the default version by calling
|
||||
|
@ -1308,6 +1311,7 @@ module Google
|
|||
@deployment_uri = args[:deployment_uri] if args.key?(:deployment_uri)
|
||||
@description = args[:description] if args.key?(:description)
|
||||
@error_message = args[:error_message] if args.key?(:error_message)
|
||||
@framework = args[:framework] if args.key?(:framework)
|
||||
@is_default = args[:is_default] if args.key?(:is_default)
|
||||
@last_use_time = args[:last_use_time] if args.key?(:last_use_time)
|
||||
@manual_scaling = args[:manual_scaling] if args.key?(:manual_scaling)
|
||||
|
|
|
@ -520,6 +520,7 @@ module Google
|
|||
property :deployment_uri, as: 'deploymentUri'
|
||||
property :description, as: 'description'
|
||||
property :error_message, as: 'errorMessage'
|
||||
property :framework, as: 'framework'
|
||||
property :is_default, as: 'isDefault'
|
||||
property :last_use_time, as: 'lastUseTime'
|
||||
property :manual_scaling, as: 'manualScaling', class: Google::Apis::MlV1::GoogleCloudMlV1ManualScaling, decorator: Google::Apis::MlV1::GoogleCloudMlV1ManualScaling::Representation
|
||||
|
|
|
@ -20,7 +20,7 @@ require 'google/apis/errors'
|
|||
module Google
|
||||
module Apis
|
||||
module MlV1
|
||||
# Google Cloud Machine Learning Engine
|
||||
# Cloud Machine Learning Engine
|
||||
#
|
||||
# An API to enable creating and using machine learning models.
|
||||
#
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
# 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_v4/service.rb'
|
||||
require 'google/apis/pagespeedonline_v4/classes.rb'
|
||||
require 'google/apis/pagespeedonline_v4/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.
|
||||
#
|
||||
module PagespeedonlineV4
|
||||
VERSION = 'V4'
|
||||
REVISION = '20180308'
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,795 @@
|
|||
# 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 PagespeedonlineV4
|
||||
|
||||
#
|
||||
class PagespeedApiFormatStringV4
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# List of arguments for the format string.
|
||||
# Corresponds to the JSON property `args`
|
||||
# @return [Array<Google::Apis::PagespeedonlineV4::PagespeedApiFormatStringV4::Arg>]
|
||||
attr_accessor :args
|
||||
|
||||
# A localized format string with ``FOO`` placeholders, where 'FOO' is the key of
|
||||
# the argument whose value should be substituted. For HYPERLINK arguments, the
|
||||
# format string will instead contain ``BEGIN_FOO`` and ``END_FOO`` for the
|
||||
# argument with key 'FOO'.
|
||||
# Corresponds to the JSON property `format`
|
||||
# @return [String]
|
||||
attr_accessor :format
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@args = args[:args] if args.key?(:args)
|
||||
@format = args[:format] if args.key?(:format)
|
||||
end
|
||||
|
||||
#
|
||||
class Arg
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The placeholder key for this arg, as a string.
|
||||
# Corresponds to the JSON property `key`
|
||||
# @return [String]
|
||||
attr_accessor :key
|
||||
|
||||
# The screen rectangles being referred to, with dimensions measured in CSS
|
||||
# pixels. This is only ever used for SNAPSHOT_RECT arguments. If this is absent
|
||||
# for a SNAPSHOT_RECT argument, it means that that argument refers to the entire
|
||||
# snapshot.
|
||||
# Corresponds to the JSON property `rects`
|
||||
# @return [Array<Google::Apis::PagespeedonlineV4::PagespeedApiFormatStringV4::Arg::Rect>]
|
||||
attr_accessor :rects
|
||||
|
||||
# Secondary screen rectangles being referred to, with dimensions measured in CSS
|
||||
# pixels. This is only ever used for SNAPSHOT_RECT arguments.
|
||||
# Corresponds to the JSON property `secondary_rects`
|
||||
# @return [Array<Google::Apis::PagespeedonlineV4::PagespeedApiFormatStringV4::Arg::SecondaryRect>]
|
||||
attr_accessor :secondary_rects
|
||||
|
||||
# Type of argument. One of URL, STRING_LITERAL, INT_LITERAL, BYTES, DURATION,
|
||||
# VERBATIM_STRING, PERCENTAGE, HYPERLINK, or SNAPSHOT_RECT.
|
||||
# Corresponds to the JSON property `type`
|
||||
# @return [String]
|
||||
attr_accessor :type
|
||||
|
||||
# Argument value, as a localized string.
|
||||
# Corresponds to the JSON property `value`
|
||||
# @return [String]
|
||||
attr_accessor :value
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@key = args[:key] if args.key?(:key)
|
||||
@rects = args[:rects] if args.key?(:rects)
|
||||
@secondary_rects = args[:secondary_rects] if args.key?(:secondary_rects)
|
||||
@type = args[:type] if args.key?(:type)
|
||||
@value = args[:value] if args.key?(:value)
|
||||
end
|
||||
|
||||
#
|
||||
class Rect
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `height`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :height
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `left`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :left
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `top`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :top
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `width`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :width
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@height = args[:height] if args.key?(:height)
|
||||
@left = args[:left] if args.key?(:left)
|
||||
@top = args[:top] if args.key?(:top)
|
||||
@width = args[:width] if args.key?(:width)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class SecondaryRect
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `height`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :height
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `left`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :left
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `top`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :top
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `width`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :width
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@height = args[:height] if args.key?(:height)
|
||||
@left = args[:left] if args.key?(:left)
|
||||
@top = args[:top] if args.key?(:top)
|
||||
@width = args[:width] if args.key?(:width)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class PagespeedApiImageV4
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Image data base64 encoded.
|
||||
# Corresponds to the JSON property `data`
|
||||
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
||||
# @return [String]
|
||||
attr_accessor :data
|
||||
|
||||
# Height of screenshot in pixels.
|
||||
# Corresponds to the JSON property `height`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :height
|
||||
|
||||
# Unique string key, if any, identifying this image.
|
||||
# Corresponds to the JSON property `key`
|
||||
# @return [String]
|
||||
attr_accessor :key
|
||||
|
||||
# Mime type of image data (e.g. "image/jpeg").
|
||||
# Corresponds to the JSON property `mime_type`
|
||||
# @return [String]
|
||||
attr_accessor :mime_type
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `page_rect`
|
||||
# @return [Google::Apis::PagespeedonlineV4::PagespeedApiImageV4::PageRect]
|
||||
attr_accessor :page_rect
|
||||
|
||||
# Width of screenshot in pixels.
|
||||
# Corresponds to the JSON property `width`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :width
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@data = args[:data] if args.key?(:data)
|
||||
@height = args[:height] if args.key?(:height)
|
||||
@key = args[:key] if args.key?(:key)
|
||||
@mime_type = args[:mime_type] if args.key?(:mime_type)
|
||||
@page_rect = args[:page_rect] if args.key?(:page_rect)
|
||||
@width = args[:width] if args.key?(:width)
|
||||
end
|
||||
|
||||
#
|
||||
class PageRect
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `height`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :height
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `left`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :left
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `top`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :top
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `width`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :width
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@height = args[:height] if args.key?(:height)
|
||||
@left = args[:left] if args.key?(:left)
|
||||
@top = args[:top] if args.key?(:top)
|
||||
@width = args[:width] if args.key?(:width)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class PagespeedApiPagespeedResponseV4
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The captcha verify result
|
||||
# Corresponds to the JSON property `captchaResult`
|
||||
# @return [String]
|
||||
attr_accessor :captcha_result
|
||||
|
||||
# Localized PageSpeed results. Contains a ruleResults entry for each PageSpeed
|
||||
# rule instantiated and run by the server.
|
||||
# Corresponds to the JSON property `formattedResults`
|
||||
# @return [Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::FormattedResults]
|
||||
attr_accessor :formatted_results
|
||||
|
||||
# Canonicalized and final URL for the document, after following page redirects (
|
||||
# if any).
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# List of rules that were specified in the request, but which the server did not
|
||||
# know how to instantiate.
|
||||
# Corresponds to the JSON property `invalidRules`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :invalid_rules
|
||||
|
||||
# Kind of result.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Metrics of end users' page loading experience.
|
||||
# Corresponds to the JSON property `loadingExperience`
|
||||
# @return [Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::LoadingExperience]
|
||||
attr_accessor :loading_experience
|
||||
|
||||
# Summary statistics for the page, such as number of JavaScript bytes, number of
|
||||
# HTML bytes, etc.
|
||||
# Corresponds to the JSON property `pageStats`
|
||||
# @return [Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::PageStats]
|
||||
attr_accessor :page_stats
|
||||
|
||||
# Response code for the document. 200 indicates a normal page load. 4xx/5xx
|
||||
# indicates an error.
|
||||
# Corresponds to the JSON property `responseCode`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :response_code
|
||||
|
||||
# A map with one entry for each rule group in these results.
|
||||
# Corresponds to the JSON property `ruleGroups`
|
||||
# @return [Hash<String,Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::RuleGroup>]
|
||||
attr_accessor :rule_groups
|
||||
|
||||
# Base64-encoded screenshot of the page that was analyzed.
|
||||
# Corresponds to the JSON property `screenshot`
|
||||
# @return [Google::Apis::PagespeedonlineV4::PagespeedApiImageV4]
|
||||
attr_accessor :screenshot
|
||||
|
||||
# Additional base64-encoded screenshots of the page, in various partial render
|
||||
# states.
|
||||
# Corresponds to the JSON property `snapshots`
|
||||
# @return [Array<Google::Apis::PagespeedonlineV4::PagespeedApiImageV4>]
|
||||
attr_accessor :snapshots
|
||||
|
||||
# Title of the page, as displayed in the browser's title bar.
|
||||
# Corresponds to the JSON property `title`
|
||||
# @return [String]
|
||||
attr_accessor :title
|
||||
|
||||
# The version of PageSpeed used to generate these results.
|
||||
# Corresponds to the JSON property `version`
|
||||
# @return [Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::Version]
|
||||
attr_accessor :version
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@captcha_result = args[:captcha_result] if args.key?(:captcha_result)
|
||||
@formatted_results = args[:formatted_results] if args.key?(:formatted_results)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@invalid_rules = args[:invalid_rules] if args.key?(:invalid_rules)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@loading_experience = args[:loading_experience] if args.key?(:loading_experience)
|
||||
@page_stats = args[:page_stats] if args.key?(:page_stats)
|
||||
@response_code = args[:response_code] if args.key?(:response_code)
|
||||
@rule_groups = args[:rule_groups] if args.key?(:rule_groups)
|
||||
@screenshot = args[:screenshot] if args.key?(:screenshot)
|
||||
@snapshots = args[:snapshots] if args.key?(:snapshots)
|
||||
@title = args[:title] if args.key?(:title)
|
||||
@version = args[:version] if args.key?(:version)
|
||||
end
|
||||
|
||||
# Localized PageSpeed results. Contains a ruleResults entry for each PageSpeed
|
||||
# rule instantiated and run by the server.
|
||||
class FormattedResults
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The locale of the formattedResults, e.g. "en_US".
|
||||
# Corresponds to the JSON property `locale`
|
||||
# @return [String]
|
||||
attr_accessor :locale
|
||||
|
||||
# Dictionary of formatted rule results, with one entry for each PageSpeed rule
|
||||
# instantiated and run by the server.
|
||||
# Corresponds to the JSON property `ruleResults`
|
||||
# @return [Hash<String,Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::FormattedResults::RuleResult>]
|
||||
attr_accessor :rule_results
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@locale = args[:locale] if args.key?(:locale)
|
||||
@rule_results = args[:rule_results] if args.key?(:rule_results)
|
||||
end
|
||||
|
||||
# The enum-like identifier for this rule. For instance "EnableKeepAlive" or "
|
||||
# AvoidCssImport". Not localized.
|
||||
class RuleResult
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Whether this rule is in 'beta'. Rules in beta are new rules that are being
|
||||
# tested, which do not impact the overall score.
|
||||
# Corresponds to the JSON property `beta`
|
||||
# @return [Boolean]
|
||||
attr_accessor :beta
|
||||
alias_method :beta?, :beta
|
||||
|
||||
# List of rule groups that this rule belongs to. Each entry in the list is one
|
||||
# of "SPEED", "USABILITY", or "SECURITY".
|
||||
# Corresponds to the JSON property `groups`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :groups
|
||||
|
||||
# Localized name of the rule, intended for presentation to a user.
|
||||
# Corresponds to the JSON property `localizedRuleName`
|
||||
# @return [String]
|
||||
attr_accessor :localized_rule_name
|
||||
|
||||
# The impact (unbounded floating point value) that implementing the suggestions
|
||||
# for this rule would have on making the page faster. Impact is comparable
|
||||
# between rules to determine which rule's suggestions would have a higher or
|
||||
# lower impact on making a page faster. For instance, if enabling compression
|
||||
# would save 1MB, while optimizing images would save 500kB, the enable
|
||||
# compression rule would have 2x the impact of the image optimization rule, all
|
||||
# other things being equal.
|
||||
# Corresponds to the JSON property `ruleImpact`
|
||||
# @return [Float]
|
||||
attr_accessor :rule_impact
|
||||
|
||||
# A brief summary description for the rule, indicating at a high level what
|
||||
# should be done to follow the rule and what benefit can be gained by doing so.
|
||||
# Corresponds to the JSON property `summary`
|
||||
# @return [Google::Apis::PagespeedonlineV4::PagespeedApiFormatStringV4]
|
||||
attr_accessor :summary
|
||||
|
||||
# List of blocks of URLs. Each block may contain a heading and a list of URLs.
|
||||
# Each URL may optionally include additional details.
|
||||
# Corresponds to the JSON property `urlBlocks`
|
||||
# @return [Array<Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::FormattedResults::RuleResult::UrlBlock>]
|
||||
attr_accessor :url_blocks
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@beta = args[:beta] if args.key?(:beta)
|
||||
@groups = args[:groups] if args.key?(:groups)
|
||||
@localized_rule_name = args[:localized_rule_name] if args.key?(:localized_rule_name)
|
||||
@rule_impact = args[:rule_impact] if args.key?(:rule_impact)
|
||||
@summary = args[:summary] if args.key?(:summary)
|
||||
@url_blocks = args[:url_blocks] if args.key?(:url_blocks)
|
||||
end
|
||||
|
||||
#
|
||||
class UrlBlock
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Heading to be displayed with the list of URLs.
|
||||
# Corresponds to the JSON property `header`
|
||||
# @return [Google::Apis::PagespeedonlineV4::PagespeedApiFormatStringV4]
|
||||
attr_accessor :header
|
||||
|
||||
# List of entries that provide information about URLs in the url block. Optional.
|
||||
# Corresponds to the JSON property `urls`
|
||||
# @return [Array<Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::FormattedResults::RuleResult::UrlBlock::Url>]
|
||||
attr_accessor :urls
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@header = args[:header] if args.key?(:header)
|
||||
@urls = args[:urls] if args.key?(:urls)
|
||||
end
|
||||
|
||||
#
|
||||
class Url
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# List of entries that provide additional details about a single URL. Optional.
|
||||
# Corresponds to the JSON property `details`
|
||||
# @return [Array<Google::Apis::PagespeedonlineV4::PagespeedApiFormatStringV4>]
|
||||
attr_accessor :details
|
||||
|
||||
# A format string that gives information about the URL, and a list of arguments
|
||||
# for that format string.
|
||||
# Corresponds to the JSON property `result`
|
||||
# @return [Google::Apis::PagespeedonlineV4::PagespeedApiFormatStringV4]
|
||||
attr_accessor :result
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@details = args[:details] if args.key?(:details)
|
||||
@result = args[:result] if args.key?(:result)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Metrics of end users' page loading experience.
|
||||
class LoadingExperience
|
||||
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::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::LoadingExperience::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::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::LoadingExperience::Metric::Distribution>]
|
||||
attr_accessor :distributions
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `median`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :median
|
||||
|
||||
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)
|
||||
@median = args[:median] if args.key?(:median)
|
||||
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
|
||||
|
||||
# Summary statistics for the page, such as number of JavaScript bytes, number of
|
||||
# HTML bytes, etc.
|
||||
class PageStats
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Content management system (CMS) used for the page.
|
||||
# Corresponds to the JSON property `cms`
|
||||
# @return [String]
|
||||
attr_accessor :cms
|
||||
|
||||
# Number of uncompressed response bytes for CSS resources on the page.
|
||||
# Corresponds to the JSON property `cssResponseBytes`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :css_response_bytes
|
||||
|
||||
# Number of response bytes for flash resources on the page.
|
||||
# Corresponds to the JSON property `flashResponseBytes`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :flash_response_bytes
|
||||
|
||||
# Number of uncompressed response bytes for the main HTML document and all
|
||||
# iframes on the page.
|
||||
# Corresponds to the JSON property `htmlResponseBytes`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :html_response_bytes
|
||||
|
||||
# Number of response bytes for image resources on the page.
|
||||
# Corresponds to the JSON property `imageResponseBytes`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :image_response_bytes
|
||||
|
||||
# Number of uncompressed response bytes for JS resources on the page.
|
||||
# Corresponds to the JSON property `javascriptResponseBytes`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :javascript_response_bytes
|
||||
|
||||
# The needed round trips to load render blocking resources
|
||||
# Corresponds to the JSON property `numRenderBlockingRoundTrips`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :num_render_blocking_round_trips
|
||||
|
||||
# The needed round trips to load the full page
|
||||
# Corresponds to the JSON property `numTotalRoundTrips`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :num_total_round_trips
|
||||
|
||||
# Number of CSS resources referenced by the page.
|
||||
# Corresponds to the JSON property `numberCssResources`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :number_css_resources
|
||||
|
||||
# Number of unique hosts referenced by the page.
|
||||
# Corresponds to the JSON property `numberHosts`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :number_hosts
|
||||
|
||||
# Number of JavaScript resources referenced by the page.
|
||||
# Corresponds to the JSON property `numberJsResources`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :number_js_resources
|
||||
|
||||
# Number of HTTP resources loaded by the page.
|
||||
# Corresponds to the JSON property `numberResources`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :number_resources
|
||||
|
||||
# Number of roboted resources.
|
||||
# Corresponds to the JSON property `numberRobotedResources`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :number_roboted_resources
|
||||
|
||||
# Number of static (i.e. cacheable) resources on the page.
|
||||
# Corresponds to the JSON property `numberStaticResources`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :number_static_resources
|
||||
|
||||
# Number of transient-failed resources.
|
||||
# Corresponds to the JSON property `numberTransientFetchFailureResources`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :number_transient_fetch_failure_resources
|
||||
|
||||
# Number of response bytes for other resources on the page.
|
||||
# Corresponds to the JSON property `otherResponseBytes`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :other_response_bytes
|
||||
|
||||
# Number of over-the-wire bytes, uses the default gzip compression strategy as
|
||||
# an estimation.
|
||||
# Corresponds to the JSON property `overTheWireResponseBytes`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :over_the_wire_response_bytes
|
||||
|
||||
# List of roboted urls.
|
||||
# Corresponds to the JSON property `robotedUrls`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :roboted_urls
|
||||
|
||||
# Number of uncompressed response bytes for text resources not covered by other
|
||||
# statistics (i.e non-HTML, non-script, non-CSS resources) on the page.
|
||||
# Corresponds to the JSON property `textResponseBytes`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :text_response_bytes
|
||||
|
||||
# Total size of all request bytes sent by the page.
|
||||
# Corresponds to the JSON property `totalRequestBytes`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :total_request_bytes
|
||||
|
||||
# List of transient fetch failure urls.
|
||||
# Corresponds to the JSON property `transientFetchFailureUrls`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :transient_fetch_failure_urls
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@cms = args[:cms] if args.key?(:cms)
|
||||
@css_response_bytes = args[:css_response_bytes] if args.key?(:css_response_bytes)
|
||||
@flash_response_bytes = args[:flash_response_bytes] if args.key?(:flash_response_bytes)
|
||||
@html_response_bytes = args[:html_response_bytes] if args.key?(:html_response_bytes)
|
||||
@image_response_bytes = args[:image_response_bytes] if args.key?(:image_response_bytes)
|
||||
@javascript_response_bytes = args[:javascript_response_bytes] if args.key?(:javascript_response_bytes)
|
||||
@num_render_blocking_round_trips = args[:num_render_blocking_round_trips] if args.key?(:num_render_blocking_round_trips)
|
||||
@num_total_round_trips = args[:num_total_round_trips] if args.key?(:num_total_round_trips)
|
||||
@number_css_resources = args[:number_css_resources] if args.key?(:number_css_resources)
|
||||
@number_hosts = args[:number_hosts] if args.key?(:number_hosts)
|
||||
@number_js_resources = args[:number_js_resources] if args.key?(:number_js_resources)
|
||||
@number_resources = args[:number_resources] if args.key?(:number_resources)
|
||||
@number_roboted_resources = args[:number_roboted_resources] if args.key?(:number_roboted_resources)
|
||||
@number_static_resources = args[:number_static_resources] if args.key?(:number_static_resources)
|
||||
@number_transient_fetch_failure_resources = args[:number_transient_fetch_failure_resources] if args.key?(:number_transient_fetch_failure_resources)
|
||||
@other_response_bytes = args[:other_response_bytes] if args.key?(:other_response_bytes)
|
||||
@over_the_wire_response_bytes = args[:over_the_wire_response_bytes] if args.key?(:over_the_wire_response_bytes)
|
||||
@roboted_urls = args[:roboted_urls] if args.key?(:roboted_urls)
|
||||
@text_response_bytes = args[:text_response_bytes] if args.key?(:text_response_bytes)
|
||||
@total_request_bytes = args[:total_request_bytes] if args.key?(:total_request_bytes)
|
||||
@transient_fetch_failure_urls = args[:transient_fetch_failure_urls] if args.key?(:transient_fetch_failure_urls)
|
||||
end
|
||||
end
|
||||
|
||||
# The name of this rule group: one of "SPEED", "USABILITY", or "SECURITY".
|
||||
class RuleGroup
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `pass`
|
||||
# @return [Boolean]
|
||||
attr_accessor :pass
|
||||
alias_method :pass?, :pass
|
||||
|
||||
# The score (0-100) for this rule group, which indicates how much better a page
|
||||
# could be in that category (e.g. how much faster, or how much more usable, or
|
||||
# how much more secure). A high score indicates little room for improvement,
|
||||
# while a lower score indicates more room for improvement.
|
||||
# Corresponds to the JSON property `score`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :score
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@pass = args[:pass] if args.key?(:pass)
|
||||
@score = args[:score] if args.key?(:score)
|
||||
end
|
||||
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,335 @@
|
|||
# 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 PagespeedonlineV4
|
||||
|
||||
class PagespeedApiFormatStringV4
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class Arg
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class Rect
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SecondaryRect
|
||||
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 PagespeedApiImageV4
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class PageRect
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class PagespeedApiPagespeedResponseV4
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class FormattedResults
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class RuleResult
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class UrlBlock
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class Url
|
||||
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
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class LoadingExperience
|
||||
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 PageStats
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class RuleGroup
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Version
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class PagespeedApiFormatStringV4
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :args, as: 'args', class: Google::Apis::PagespeedonlineV4::PagespeedApiFormatStringV4::Arg, decorator: Google::Apis::PagespeedonlineV4::PagespeedApiFormatStringV4::Arg::Representation
|
||||
|
||||
property :format, as: 'format'
|
||||
end
|
||||
|
||||
class Arg
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :key, as: 'key'
|
||||
collection :rects, as: 'rects', class: Google::Apis::PagespeedonlineV4::PagespeedApiFormatStringV4::Arg::Rect, decorator: Google::Apis::PagespeedonlineV4::PagespeedApiFormatStringV4::Arg::Rect::Representation
|
||||
|
||||
collection :secondary_rects, as: 'secondary_rects', class: Google::Apis::PagespeedonlineV4::PagespeedApiFormatStringV4::Arg::SecondaryRect, decorator: Google::Apis::PagespeedonlineV4::PagespeedApiFormatStringV4::Arg::SecondaryRect::Representation
|
||||
|
||||
property :type, as: 'type'
|
||||
property :value, as: 'value'
|
||||
end
|
||||
|
||||
class Rect
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :height, as: 'height'
|
||||
property :left, as: 'left'
|
||||
property :top, as: 'top'
|
||||
property :width, as: 'width'
|
||||
end
|
||||
end
|
||||
|
||||
class SecondaryRect
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :height, as: 'height'
|
||||
property :left, as: 'left'
|
||||
property :top, as: 'top'
|
||||
property :width, as: 'width'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class PagespeedApiImageV4
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :data, :base64 => true, as: 'data'
|
||||
property :height, as: 'height'
|
||||
property :key, as: 'key'
|
||||
property :mime_type, as: 'mime_type'
|
||||
property :page_rect, as: 'page_rect', class: Google::Apis::PagespeedonlineV4::PagespeedApiImageV4::PageRect, decorator: Google::Apis::PagespeedonlineV4::PagespeedApiImageV4::PageRect::Representation
|
||||
|
||||
property :width, as: 'width'
|
||||
end
|
||||
|
||||
class PageRect
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :height, as: 'height'
|
||||
property :left, as: 'left'
|
||||
property :top, as: 'top'
|
||||
property :width, as: 'width'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class PagespeedApiPagespeedResponseV4
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :captcha_result, as: 'captchaResult'
|
||||
property :formatted_results, as: 'formattedResults', class: Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::FormattedResults, decorator: Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::FormattedResults::Representation
|
||||
|
||||
property :id, as: 'id'
|
||||
collection :invalid_rules, as: 'invalidRules'
|
||||
property :kind, as: 'kind'
|
||||
property :loading_experience, as: 'loadingExperience', class: Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::LoadingExperience, decorator: Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::LoadingExperience::Representation
|
||||
|
||||
property :page_stats, as: 'pageStats', class: Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::PageStats, decorator: Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::PageStats::Representation
|
||||
|
||||
property :response_code, as: 'responseCode'
|
||||
hash :rule_groups, as: 'ruleGroups', class: Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::RuleGroup, decorator: Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::RuleGroup::Representation
|
||||
|
||||
property :screenshot, as: 'screenshot', class: Google::Apis::PagespeedonlineV4::PagespeedApiImageV4, decorator: Google::Apis::PagespeedonlineV4::PagespeedApiImageV4::Representation
|
||||
|
||||
collection :snapshots, as: 'snapshots', class: Google::Apis::PagespeedonlineV4::PagespeedApiImageV4, decorator: Google::Apis::PagespeedonlineV4::PagespeedApiImageV4::Representation
|
||||
|
||||
property :title, as: 'title'
|
||||
property :version, as: 'version', class: Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::Version, decorator: Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::Version::Representation
|
||||
|
||||
end
|
||||
|
||||
class FormattedResults
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :locale, as: 'locale'
|
||||
hash :rule_results, as: 'ruleResults', class: Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::FormattedResults::RuleResult, decorator: Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::FormattedResults::RuleResult::Representation
|
||||
|
||||
end
|
||||
|
||||
class RuleResult
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :beta, as: 'beta'
|
||||
collection :groups, as: 'groups'
|
||||
property :localized_rule_name, as: 'localizedRuleName'
|
||||
property :rule_impact, as: 'ruleImpact'
|
||||
property :summary, as: 'summary', class: Google::Apis::PagespeedonlineV4::PagespeedApiFormatStringV4, decorator: Google::Apis::PagespeedonlineV4::PagespeedApiFormatStringV4::Representation
|
||||
|
||||
collection :url_blocks, as: 'urlBlocks', class: Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::FormattedResults::RuleResult::UrlBlock, decorator: Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::FormattedResults::RuleResult::UrlBlock::Representation
|
||||
|
||||
end
|
||||
|
||||
class UrlBlock
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :header, as: 'header', class: Google::Apis::PagespeedonlineV4::PagespeedApiFormatStringV4, decorator: Google::Apis::PagespeedonlineV4::PagespeedApiFormatStringV4::Representation
|
||||
|
||||
collection :urls, as: 'urls', class: Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::FormattedResults::RuleResult::UrlBlock::Url, decorator: Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::FormattedResults::RuleResult::UrlBlock::Url::Representation
|
||||
|
||||
end
|
||||
|
||||
class Url
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :details, as: 'details', class: Google::Apis::PagespeedonlineV4::PagespeedApiFormatStringV4, decorator: Google::Apis::PagespeedonlineV4::PagespeedApiFormatStringV4::Representation
|
||||
|
||||
property :result, as: 'result', class: Google::Apis::PagespeedonlineV4::PagespeedApiFormatStringV4, decorator: Google::Apis::PagespeedonlineV4::PagespeedApiFormatStringV4::Representation
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class LoadingExperience
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, as: 'id'
|
||||
property :initial_url, as: 'initial_url'
|
||||
hash :metrics, as: 'metrics', class: Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::LoadingExperience::Metric, decorator: Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::LoadingExperience::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::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::LoadingExperience::Metric::Distribution, decorator: Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::LoadingExperience::Metric::Distribution::Representation
|
||||
|
||||
property :median, as: 'median'
|
||||
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 PageStats
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cms, as: 'cms'
|
||||
property :css_response_bytes, :numeric_string => true, as: 'cssResponseBytes'
|
||||
property :flash_response_bytes, :numeric_string => true, as: 'flashResponseBytes'
|
||||
property :html_response_bytes, :numeric_string => true, as: 'htmlResponseBytes'
|
||||
property :image_response_bytes, :numeric_string => true, as: 'imageResponseBytes'
|
||||
property :javascript_response_bytes, :numeric_string => true, as: 'javascriptResponseBytes'
|
||||
property :num_render_blocking_round_trips, as: 'numRenderBlockingRoundTrips'
|
||||
property :num_total_round_trips, as: 'numTotalRoundTrips'
|
||||
property :number_css_resources, as: 'numberCssResources'
|
||||
property :number_hosts, as: 'numberHosts'
|
||||
property :number_js_resources, as: 'numberJsResources'
|
||||
property :number_resources, as: 'numberResources'
|
||||
property :number_roboted_resources, as: 'numberRobotedResources'
|
||||
property :number_static_resources, as: 'numberStaticResources'
|
||||
property :number_transient_fetch_failure_resources, as: 'numberTransientFetchFailureResources'
|
||||
property :other_response_bytes, :numeric_string => true, as: 'otherResponseBytes'
|
||||
property :over_the_wire_response_bytes, :numeric_string => true, as: 'overTheWireResponseBytes'
|
||||
collection :roboted_urls, as: 'robotedUrls'
|
||||
property :text_response_bytes, :numeric_string => true, as: 'textResponseBytes'
|
||||
property :total_request_bytes, :numeric_string => true, as: 'totalRequestBytes'
|
||||
collection :transient_fetch_failure_urls, as: 'transientFetchFailureUrls'
|
||||
end
|
||||
end
|
||||
|
||||
class RuleGroup
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :pass, as: 'pass'
|
||||
property :score, as: 'score'
|
||||
end
|
||||
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,128 @@
|
|||
# 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 PagespeedonlineV4
|
||||
# PageSpeed Insights API
|
||||
#
|
||||
# Analyzes the performance of a web page and provides tailored suggestions to
|
||||
# make that page faster.
|
||||
#
|
||||
# @example
|
||||
# require 'google/apis/pagespeedonline_v4'
|
||||
#
|
||||
# Pagespeedonline = Google::Apis::PagespeedonlineV4 # Alias the module
|
||||
# service = Pagespeedonline::PagespeedonlineService.new
|
||||
#
|
||||
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]
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
attr_accessor :quota_user
|
||||
|
||||
# @return [String]
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
attr_accessor :user_ip
|
||||
|
||||
def initialize
|
||||
super('https://www.googleapis.com/', 'pagespeedonline/v4/')
|
||||
@batch_path = 'batch/pagespeedonline/v4'
|
||||
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 [Boolean] filter_third_party_resources
|
||||
# Indicates if third party resources should be filtered out before PageSpeed
|
||||
# analysis.
|
||||
# @param [String] locale
|
||||
# The locale used to localize formatted results
|
||||
# @param [Array<String>, String] rule
|
||||
# A PageSpeed rule to run; if none are given, all rules are run
|
||||
# @param [Boolean] screenshot
|
||||
# Indicates if binary data containing a screenshot should be included
|
||||
# @param [Boolean] snapshots
|
||||
# Indicates if binary data containing snapshot images should be included
|
||||
# @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
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
# @param [String] user_ip
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4]
|
||||
#
|
||||
# @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, filter_third_party_resources: nil, locale: nil, rule: nil, screenshot: nil, snapshots: 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::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::Representation
|
||||
command.response_class = Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4
|
||||
command.query['filter_third_party_resources'] = filter_third_party_resources unless filter_third_party_resources.nil?
|
||||
command.query['locale'] = locale unless locale.nil?
|
||||
command.query['rule'] = rule unless rule.nil?
|
||||
command.query['screenshot'] = screenshot unless screenshot.nil?
|
||||
command.query['snapshots'] = snapshots unless snapshots.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
|
|
@ -27,7 +27,7 @@ module Google
|
|||
# @see https://cloud.google.com/service-usage/
|
||||
module ServiceusageV1beta1
|
||||
VERSION = 'V1beta1'
|
||||
REVISION = '20180306'
|
||||
REVISION = '20180309'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
|
|
@ -297,6 +297,7 @@ module Google
|
|||
# @param [Fixnum] page_size
|
||||
# Requested size of the next page of data.
|
||||
# Requested page size cannot exceed 200.
|
||||
# If not set, the default page size is 50.
|
||||
# @param [String] page_token
|
||||
# Token identifying which result to start with, which is returned by a
|
||||
# previous list call.
|
||||
|
|
|
@ -25,7 +25,7 @@ module Google
|
|||
# @see https://cloud.google.com/source-repositories/docs/apis
|
||||
module SourcerepoV1
|
||||
VERSION = 'V1'
|
||||
REVISION = '20171215'
|
||||
REVISION = '20180226'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
|
|
@ -29,7 +29,7 @@ module Google
|
|||
# If there are AuditConfigs for both `allServices` and a specific service,
|
||||
# the union of the two AuditConfigs is used for that service: the log_types
|
||||
# specified in each AuditConfig are enabled, and the exempted_members in each
|
||||
# AuditConfig are exempted.
|
||||
# AuditLogConfig are exempted.
|
||||
# Example Policy with multiple AuditConfigs:
|
||||
# `
|
||||
# "audit_configs": [
|
||||
|
@ -78,11 +78,6 @@ module Google
|
|||
# @return [Array<Google::Apis::SourcerepoV1::AuditLogConfig>]
|
||||
attr_accessor :audit_log_configs
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `exemptedMembers`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :exempted_members
|
||||
|
||||
# Specifies a service that will be enabled for audit logging.
|
||||
# For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
|
||||
# `allServices` is a special value that covers all services.
|
||||
|
@ -97,7 +92,6 @@ module Google
|
|||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
|
||||
@exempted_members = args[:exempted_members] if args.key?(:exempted_members)
|
||||
@service = args[:service] if args.key?(:service)
|
||||
end
|
||||
end
|
||||
|
@ -149,14 +143,6 @@ module Google
|
|||
class Binding
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Represents an expression text. Example:
|
||||
# title: "User account presence"
|
||||
# description: "Determines whether the request has a user account"
|
||||
# expression: "size(request.user) > 0"
|
||||
# Corresponds to the JSON property `condition`
|
||||
# @return [Google::Apis::SourcerepoV1::Expr]
|
||||
attr_accessor :condition
|
||||
|
||||
# Specifies the identities requesting access for a Cloud Platform resource.
|
||||
# `members` can have the following values:
|
||||
# * `allUsers`: A special identifier that represents anyone who is
|
||||
|
@ -188,7 +174,6 @@ module Google
|
|||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@condition = args[:condition] if args.key?(:condition)
|
||||
@members = args[:members] if args.key?(:members)
|
||||
@role = args[:role] if args.key?(:role)
|
||||
end
|
||||
|
@ -213,53 +198,6 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
# Represents an expression text. Example:
|
||||
# title: "User account presence"
|
||||
# description: "Determines whether the request has a user account"
|
||||
# expression: "size(request.user) > 0"
|
||||
class Expr
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# An optional description of the expression. This is a longer text which
|
||||
# describes the expression, e.g. when hovered over it in a UI.
|
||||
# Corresponds to the JSON property `description`
|
||||
# @return [String]
|
||||
attr_accessor :description
|
||||
|
||||
# Textual representation of an expression in
|
||||
# Common Expression Language syntax.
|
||||
# The application context of the containing message determines which
|
||||
# well-known feature set of CEL is supported.
|
||||
# Corresponds to the JSON property `expression`
|
||||
# @return [String]
|
||||
attr_accessor :expression
|
||||
|
||||
# An optional string indicating the location of the expression for error
|
||||
# reporting, e.g. a file name and a position in the file.
|
||||
# Corresponds to the JSON property `location`
|
||||
# @return [String]
|
||||
attr_accessor :location
|
||||
|
||||
# An optional title for the expression, i.e. a short string describing
|
||||
# its purpose. This can be used e.g. in UIs which allow to enter the
|
||||
# expression.
|
||||
# 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)
|
||||
@expression = args[:expression] if args.key?(:expression)
|
||||
@location = args[:location] if args.key?(:location)
|
||||
@title = args[:title] if args.key?(:title)
|
||||
end
|
||||
end
|
||||
|
||||
# Response for ListRepos. The size is not set in the returned repositories.
|
||||
class ListReposResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
@ -349,7 +287,7 @@ module Google
|
|||
# ]
|
||||
# `
|
||||
# For a description of IAM and its features, see the
|
||||
# [IAM developer's guide](https://cloud.google.com/iam).
|
||||
# [IAM developer's guide](https://cloud.google.com/iam/docs).
|
||||
class Policy
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
|
@ -378,13 +316,7 @@ module Google
|
|||
# @return [String]
|
||||
attr_accessor :etag
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `iamOwned`
|
||||
# @return [Boolean]
|
||||
attr_accessor :iam_owned
|
||||
alias_method :iam_owned?, :iam_owned
|
||||
|
||||
# Version of the `Policy`. The default version is 0.
|
||||
# Deprecated.
|
||||
# Corresponds to the JSON property `version`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :version
|
||||
|
@ -398,7 +330,6 @@ module Google
|
|||
@audit_configs = args[:audit_configs] if args.key?(:audit_configs)
|
||||
@bindings = args[:bindings] if args.key?(:bindings)
|
||||
@etag = args[:etag] if args.key?(:etag)
|
||||
@iam_owned = args[:iam_owned] if args.key?(:iam_owned)
|
||||
@version = args[:version] if args.key?(:version)
|
||||
end
|
||||
end
|
||||
|
@ -474,7 +405,7 @@ module Google
|
|||
# ]
|
||||
# `
|
||||
# For a description of IAM and its features, see the
|
||||
# [IAM developer's guide](https://cloud.google.com/iam).
|
||||
# [IAM developer's guide](https://cloud.google.com/iam/docs).
|
||||
# Corresponds to the JSON property `policy`
|
||||
# @return [Google::Apis::SourcerepoV1::Policy]
|
||||
attr_accessor :policy
|
||||
|
|
|
@ -46,12 +46,6 @@ module Google
|
|||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Expr
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListReposResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
|
@ -99,7 +93,6 @@ module Google
|
|||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::SourcerepoV1::AuditLogConfig, decorator: Google::Apis::SourcerepoV1::AuditLogConfig::Representation
|
||||
|
||||
collection :exempted_members, as: 'exemptedMembers'
|
||||
property :service, as: 'service'
|
||||
end
|
||||
end
|
||||
|
@ -115,8 +108,6 @@ module Google
|
|||
class Binding
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :condition, as: 'condition', class: Google::Apis::SourcerepoV1::Expr, decorator: Google::Apis::SourcerepoV1::Expr::Representation
|
||||
|
||||
collection :members, as: 'members'
|
||||
property :role, as: 'role'
|
||||
end
|
||||
|
@ -128,16 +119,6 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
class Expr
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :description, as: 'description'
|
||||
property :expression, as: 'expression'
|
||||
property :location, as: 'location'
|
||||
property :title, as: 'title'
|
||||
end
|
||||
end
|
||||
|
||||
class ListReposResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
|
@ -164,7 +145,6 @@ module Google
|
|||
collection :bindings, as: 'bindings', class: Google::Apis::SourcerepoV1::Binding, decorator: Google::Apis::SourcerepoV1::Binding::Representation
|
||||
|
||||
property :etag, :base64 => true, as: 'etag'
|
||||
property :iam_owned, as: 'iamOwned'
|
||||
property :version, as: 'version'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -25,7 +25,7 @@ module Google
|
|||
# @see https://developers.google.com/youtube/partner/
|
||||
module YoutubePartnerV1
|
||||
VERSION = 'V1'
|
||||
REVISION = '20180226'
|
||||
REVISION = '20180305'
|
||||
|
||||
# View and manage your assets and associated content on YouTube
|
||||
AUTH_YOUTUBEPARTNER = 'https://www.googleapis.com/auth/youtubepartner'
|
||||
|
|
Loading…
Reference in New Issue